|
|
|
@ -31,11 +31,11 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
|
|
|
|
|
/** |
|
|
|
|
* 对话框高度输入框 |
|
|
|
|
*/ |
|
|
|
|
private UISpinner heightTextFiled; |
|
|
|
|
private UISpinner heightSpinner; |
|
|
|
|
/** |
|
|
|
|
* 对话框宽度输入框 |
|
|
|
|
*/ |
|
|
|
|
private UISpinner widthTextFiled; |
|
|
|
|
private UISpinner widthSpinner; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public AbstractHyperNorthPane() { |
|
|
|
@ -60,12 +60,12 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
|
|
|
|
|
|
|
|
|
|
final JPanel newWindowConfPane = new JPanel(new BorderLayout()); |
|
|
|
|
UILabel heightLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Height")); |
|
|
|
|
heightTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_H_VALUE); |
|
|
|
|
heightSpinner = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_H_VALUE); |
|
|
|
|
UILabel widthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Designer_Width")); |
|
|
|
|
widthTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_V_VALUE); |
|
|
|
|
widthSpinner = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_V_VALUE); |
|
|
|
|
newWindowConfPane.add(column(10, |
|
|
|
|
row(cell(heightLabel).weight(0.2), cell(heightTextFiled).weight(0.8)), |
|
|
|
|
row(cell(widthLabel).weight(0.2), cell(widthTextFiled).weight(0.8)) |
|
|
|
|
row(cell(heightLabel).weight(0.2), cell(heightSpinner).weight(0.8)), |
|
|
|
|
row(cell(widthLabel).weight(0.2), cell(widthSpinner).weight(0.8)) |
|
|
|
|
).getComponent()); |
|
|
|
|
|
|
|
|
|
JPanel centerPanel = new JPanel(new BorderLayout()); |
|
|
|
@ -104,28 +104,28 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
|
|
|
|
|
this.targetFrameComboBox = targetFrameComboBox; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public UISpinner getHeightTextFiled() { |
|
|
|
|
return heightTextFiled; |
|
|
|
|
public UISpinner getHeightSpinner() { |
|
|
|
|
return heightSpinner; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setHeightTextFiled(UISpinner heightTextFiled) { |
|
|
|
|
this.heightTextFiled = heightTextFiled; |
|
|
|
|
public void setHeightSpinner(UISpinner heightSpinner) { |
|
|
|
|
this.heightSpinner = heightSpinner; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public UISpinner getWidthTextFiled() { |
|
|
|
|
return widthTextFiled; |
|
|
|
|
public UISpinner getWidthSpinner() { |
|
|
|
|
return widthSpinner; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setWidthTextFiled(UISpinner widthTextFiled) { |
|
|
|
|
this.widthTextFiled = widthTextFiled; |
|
|
|
|
public void setWidthSpinner(UISpinner widthSpinner) { |
|
|
|
|
this.widthSpinner = widthSpinner; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void populateBean(T link) { |
|
|
|
|
String name = link.getTargetFrame(); |
|
|
|
|
targetFrameComboBox.setSelectedIndex(HyperlinkTargetFrame.convert(name)); |
|
|
|
|
heightTextFiled.setValue(link.getHeight() == 0 ? DEFAULT_H_VALUE : link.getHeight()); |
|
|
|
|
widthTextFiled.setValue(link.getWidth() == 0 ? DEFAULT_V_VALUE : link.getWidth()); |
|
|
|
|
heightSpinner.setValue(link.getHeight() == 0 ? DEFAULT_H_VALUE : link.getHeight()); |
|
|
|
|
widthSpinner.setValue(link.getWidth() == 0 ? DEFAULT_V_VALUE : link.getWidth()); |
|
|
|
|
populateSubHyperlinkBean(link); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -145,8 +145,8 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
|
|
|
|
|
public void updateBean(T link) { |
|
|
|
|
updateSubHyperlinkBean(link); |
|
|
|
|
link.setTargetFrame(HyperlinkTargetFrame.parse(targetFrameComboBox.getSelectedIndex()).getName()); |
|
|
|
|
link.setHeight(Utils.objectToNumber(heightTextFiled.getValue(), false).intValue()); |
|
|
|
|
link.setWidth(Utils.objectToNumber(widthTextFiled.getValue(), false).intValue()); |
|
|
|
|
link.setHeight(Utils.objectToNumber(heightSpinner.getValue(), false).intValue()); |
|
|
|
|
link.setWidth(Utils.objectToNumber(widthSpinner.getValue(), false).intValue()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|