Browse Source

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

master
kerry 8 years ago
parent
commit
07b771326a
  1. 2
      designer_base/src/com/fr/design/hyperlink/AbstractHyperlinkPane.java
  2. 44
      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) { public void updateBean(T link) {
updateSubHyperlinkBean(link); updateSubHyperlinkBean(link);
link.setTargetFrame((String) targetFrameComboBox.getSelectedItem()); link.setTargetFrame(HyperlinkTargetFrame.getName(targetFrameComboBox.getSelectedIndex()));
link.setHeight(Utils.objectToNumber(heightTextFiled.getText(), false).intValue()); link.setHeight(Utils.objectToNumber(heightTextFiled.getText(), false).intValue());
link.setWidth(Utils.objectToNumber(widthTextFiled.getText(), false).intValue()); link.setWidth(Utils.objectToNumber(widthTextFiled.getText(), false).intValue());
} }

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

@ -0,0 +1,44 @@
package com.fr.design.hyperlink;
/**
* Created by ibm on 2016/10/13.
*/
public enum HyperlinkTargetFrame {
BLANK_FRAME("_blank", 0), DIALOG_FRAME("_dialog", 1), SELF_FRAME("_self", 2);
private String name;
private int index;
HyperlinkTargetFrame(String name, int index) {
this.name = name;
this.index = index;
}
public static String getName(int index) {
for (HyperlinkTargetFrame hyperlinkTargetFrame : HyperlinkTargetFrame.values()) {
if (hyperlinkTargetFrame.getIndex() == index) {
return hyperlinkTargetFrame.name;
}
}
return null;
}
public int getIndex() {
return index;
}
public void setIndex(int index) {
this.index = index;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
Loading…
Cancel
Save