Browse Source

REPORT-338 日文设计器,超链接对话框选项无效。

master
kerry 8 years ago
parent
commit
e792684366
  1. 2
      designer_base/src/com/fr/design/hyperlink/AbstractHyperlinkPane.java
  2. 12
      designer_base/src/com/fr/design/hyperlink/HyperlinkTargetFrame.java

2
designer_base/src/com/fr/design/hyperlink/AbstractHyperlinkPane.java

@ -127,7 +127,7 @@ public abstract class AbstractHyperlinkPane<T extends Hyperlink> extends BasicBe
public void updateBean(T link) {
updateSubHyperlinkBean(link);
link.setTargetFrame(HyperlinkTargetFrame.getName(targetFrameComboBox.getSelectedIndex()));
link.setTargetFrame(HyperlinkTargetFrame.parse(targetFrameComboBox.getSelectedIndex()).getName());
link.setHeight(Utils.objectToNumber(heightTextFiled.getText(), false).intValue());
link.setWidth(Utils.objectToNumber(widthTextFiled.getText(), false).intValue());
}

12
designer_base/src/com/fr/design/hyperlink/HyperlinkTargetFrame.java

@ -8,22 +8,26 @@ public enum HyperlinkTargetFrame {
private String name;
private int index;
private static HyperlinkTargetFrame[] arrayOfValues;
HyperlinkTargetFrame(String name, int index) {
this.name = name;
this.index = index;
}
public static String getName(int index) {
public static HyperlinkTargetFrame parse(int index) {
if (arrayOfValues == null) {
arrayOfValues = HyperlinkTargetFrame.values();
}
for (HyperlinkTargetFrame hyperlinkTargetFrame : HyperlinkTargetFrame.values()) {
if (hyperlinkTargetFrame.getIndex() == index) {
return hyperlinkTargetFrame.name;
return hyperlinkTargetFrame;
}
}
return null;
return BLANK_FRAME;
}
public int getIndex() {
return index;
}

Loading…
Cancel
Save