Browse Source

Merge pull request #376 in BA/design from ~KERRY/design:dev to dev

* commit 'e79268436682c6c45114f27157d5b4940e498053':
  REPORT-338 日文设计器,超链接对话框选项无效。
  REPORT-338  日文设计器,超链接对话框选项无效。
master
superman 8 years ago
parent
commit
228798f229
  1. 2
      designer_base/src/com/fr/design/hyperlink/AbstractHyperlinkPane.java
  2. 48
      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.parse(targetFrameComboBox.getSelectedIndex()).getName());
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());
} }

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

@ -0,0 +1,48 @@
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;
private static HyperlinkTargetFrame[] arrayOfValues;
HyperlinkTargetFrame(String name, int index) {
this.name = name;
this.index = index;
}
public static HyperlinkTargetFrame parse(int index) {
if (arrayOfValues == null) {
arrayOfValues = HyperlinkTargetFrame.values();
}
for (HyperlinkTargetFrame hyperlinkTargetFrame : HyperlinkTargetFrame.values()) {
if (hyperlinkTargetFrame.getIndex() == index) {
return hyperlinkTargetFrame;
}
}
return BLANK_FRAME;
}
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