|
|
@ -41,7 +41,54 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor> |
|
|
|
private JPanel limitNumberPane; |
|
|
|
private JPanel limitNumberPane; |
|
|
|
private WaterMarkDictPane waterMarkDictPane; |
|
|
|
private WaterMarkDictPane waterMarkDictPane; |
|
|
|
|
|
|
|
|
|
|
|
private ActionListener actionListener1 = new ActionListener() { |
|
|
|
private ActionListener actionListener1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ActionListener actionListener2; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ActionListener actionListener3; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ActionListener actionListener4 ; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ChangeListener changeListener1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ChangeListener changeListener2 ; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public NumberEditorDefinePane() { |
|
|
|
|
|
|
|
super(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public String title4PopupWindow() { |
|
|
|
|
|
|
|
return "number"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
protected JPanel setFirstContentPane() { |
|
|
|
|
|
|
|
// richer:数字的允许直接编辑没有意义
|
|
|
|
|
|
|
|
waterMarkDictPane = new WaterMarkDictPane(); |
|
|
|
|
|
|
|
formWidgetValuePane = new FormWidgetValuePane(creator.toData(), false); |
|
|
|
|
|
|
|
double f = TableLayout.FILL; |
|
|
|
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
|
|
|
new Component[]{new UILabel(Inter.getLocText("FR-Designer-Estate_Widget_Value")), formWidgetValuePane}, |
|
|
|
|
|
|
|
new Component[]{new UILabel(Inter.getLocText("FR-Designer_WaterMark")), waterMarkDictPane}, |
|
|
|
|
|
|
|
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Font-Size")), fontSizePane} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
double[] rowSize = {p, p, p, p, p}; |
|
|
|
|
|
|
|
double[] columnSize = {p,f}; |
|
|
|
|
|
|
|
int[][] rowCount = {{1, 3},{1, 1},{1, 1}}; |
|
|
|
|
|
|
|
JPanel advancePane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7); |
|
|
|
|
|
|
|
JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
|
|
|
advancePane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); |
|
|
|
|
|
|
|
boundsPane.add(advancePane); |
|
|
|
|
|
|
|
return boundsPane; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void initListeners(){ |
|
|
|
|
|
|
|
actionListener1 = new ActionListener() { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
if (allowDecimalsCheckBox.isSelected()) { |
|
|
|
if (allowDecimalsCheckBox.isSelected()) { |
|
|
|
limitNumberPane.setVisible(true); |
|
|
|
limitNumberPane.setVisible(true); |
|
|
@ -51,7 +98,7 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor> |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
private ActionListener actionListener2 = new ActionListener() { |
|
|
|
actionListener2 = new ActionListener() { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
@ -78,7 +125,7 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor> |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ActionListener actionListener3 = new ActionListener() { |
|
|
|
actionListener3 = new ActionListener() { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
if (setMaxValueCheckBox.isSelected()) { |
|
|
|
if (setMaxValueCheckBox.isSelected()) { |
|
|
|
maxValueSpinner.setEnabled(true); |
|
|
|
maxValueSpinner.setEnabled(true); |
|
|
@ -98,7 +145,7 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor> |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ActionListener actionListener4 = new ActionListener() { |
|
|
|
actionListener4 = new ActionListener() { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
if (setMinValueCheckBox.isSelected()) { |
|
|
|
if (setMinValueCheckBox.isSelected()) { |
|
|
|
minValueSpinner.setEnabled(true); |
|
|
|
minValueSpinner.setEnabled(true); |
|
|
@ -117,7 +164,7 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor> |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
private ChangeListener changeListener1 = new ChangeListener() { |
|
|
|
changeListener1 = new ChangeListener() { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
@ -129,7 +176,7 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor> |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
private ChangeListener changeListener2 = new ChangeListener() { |
|
|
|
changeListener2 = new ChangeListener() { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
@ -140,41 +187,10 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor> |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
public NumberEditorDefinePane() { |
|
|
|
|
|
|
|
super(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public String title4PopupWindow() { |
|
|
|
|
|
|
|
return "number"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
protected JPanel setFirstContentPane() { |
|
|
|
|
|
|
|
// richer:数字的允许直接编辑没有意义
|
|
|
|
|
|
|
|
waterMarkDictPane = new WaterMarkDictPane(); |
|
|
|
|
|
|
|
formWidgetValuePane = new FormWidgetValuePane(creator.toData(), false); |
|
|
|
|
|
|
|
double f = TableLayout.FILL; |
|
|
|
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
|
|
|
new Component[]{new UILabel(Inter.getLocText("FR-Designer-Estate_Widget_Value")), formWidgetValuePane}, |
|
|
|
|
|
|
|
new Component[]{new UILabel(Inter.getLocText("FR-Designer_WaterMark")), waterMarkDictPane}, |
|
|
|
|
|
|
|
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Font-Size")), fontSizePane} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
double[] rowSize = {p, p, p, p, p}; |
|
|
|
|
|
|
|
double[] columnSize = {p,f}; |
|
|
|
|
|
|
|
int[][] rowCount = {{1, 3},{1, 1},{1, 1}}; |
|
|
|
|
|
|
|
JPanel advancePane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7); |
|
|
|
|
|
|
|
JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
|
|
|
advancePane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); |
|
|
|
|
|
|
|
boundsPane.add(advancePane); |
|
|
|
|
|
|
|
return boundsPane; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public JPanel setValidatePane() { |
|
|
|
public JPanel setValidatePane() { |
|
|
|
|
|
|
|
initListeners(); |
|
|
|
// super.addValidatePane();
|
|
|
|
// super.addValidatePane();
|
|
|
|
this.allowDecimalsCheckBox = new UICheckBox(Inter.getLocText("Allow_Decimals")); |
|
|
|
this.allowDecimalsCheckBox = new UICheckBox(Inter.getLocText("Allow_Decimals")); |
|
|
|
this.decimalLength = new com.fr.design.editor.editor.IntegerEditor(); |
|
|
|
this.decimalLength = new com.fr.design.editor.editor.IntegerEditor(); |
|
|
@ -218,7 +234,7 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor> |
|
|
|
double[] rowSize = {p, p, p, p, p}; |
|
|
|
double[] rowSize = {p, p, p, p, p}; |
|
|
|
double[] columnSize = {p,f}; |
|
|
|
double[] columnSize = {p,f}; |
|
|
|
int[][] rowCount = {{1, 1},{1, 1},{1, 1},{1, 1},{1, 1}}; |
|
|
|
int[][] rowCount = {{1, 1},{1, 1},{1, 1},{1, 1},{1, 1}}; |
|
|
|
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 3); |
|
|
|
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7); |
|
|
|
panel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); |
|
|
|
panel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); |
|
|
|
return panel; |
|
|
|
return panel; |
|
|
|
|
|
|
|
|
|
|
|