Browse Source

REPORT-3293 调整border 控件对齐

master
kerry 7 years ago
parent
commit
031eab728e
  1. 85
      designer/src/com/fr/design/widget/CellWidgetCardPane.java
  2. 2
      designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java
  3. 3
      designer/src/com/fr/design/widget/ui/ButtonGroupDictPane.java
  4. 10
      designer/src/com/fr/design/widget/ui/CheckBoxGroupDefinePane.java
  5. 1
      designer/src/com/fr/design/widget/ui/ComboCheckBoxDefinePane.java
  6. 4
      designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java
  7. 5
      designer/src/com/fr/design/widget/ui/DirectWriteEditorDefinePane.java
  8. 12
      designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java
  9. 3
      designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java
  10. 1
      designer/src/com/fr/design/widget/ui/MultiFileEditorPane.java
  11. 5
      designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java
  12. 8
      designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java
  13. 1
      designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java
  14. 2
      designer/src/com/fr/design/widget/ui/btn/DefineDeleteColumnRowPane.java
  15. 6
      designer/src/com/fr/design/widget/ui/btn/FreeButtonDetailPane.java
  16. 8
      designer_base/src/com/fr/design/gui/itree/refreshabletree/TreeRootPane.java
  17. 2
      designer_base/src/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java
  18. 2
      designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java

85
designer/src/com/fr/design/widget/CellWidgetCardPane.java

@ -3,14 +3,11 @@ package com.fr.design.widget;
import com.fr.design.data.DataCreatorUI; import com.fr.design.data.DataCreatorUI;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.TreeSettingPane;
import com.fr.design.gui.ibutton.UIHeadGroup; import com.fr.design.gui.ibutton.UIHeadGroup;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.present.dict.DictionaryPane;
import com.fr.design.widget.ui.BasicWidgetPropertySettingPane; import com.fr.design.widget.ui.BasicWidgetPropertySettingPane;
import com.fr.form.event.Listener; import com.fr.form.event.Listener;
import com.fr.form.ui.NoneWidget;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.general.Inter; import com.fr.general.Inter;
@ -36,14 +33,6 @@ public class CellWidgetCardPane extends BasicPane {
private JPanel attriCardPane; private JPanel attriCardPane;
private CardLayout attriCardLayout; private CardLayout attriCardLayout;
//数字字典属性容器
private JPanel dictTabPane;
private JPanel dictCardPane;
private CardLayout dictCardLayout;
//构建树属性容器
private JPanel treeTabPane;
//事件属性容器 //事件属性容器
private JPanel eventTabPane; private JPanel eventTabPane;
private WidgetEventPane eventPane; private WidgetEventPane eventPane;
@ -52,11 +41,6 @@ public class CellWidgetCardPane extends BasicPane {
public CellWidgetCardPane(ElementCasePane pane) { public CellWidgetCardPane(ElementCasePane pane) {
this.pane = pane; this.pane = pane;
// this.initComponents(pane);
}
public BasicWidgetPropertySettingPane initBasicWidgetPropertyPane() {
return new BasicWidgetPropertySettingPane();
} }
@ -88,16 +72,6 @@ public class CellWidgetCardPane extends BasicPane {
tabsHeaderIconPane.setNeedLeftRightOutLine(false); tabsHeaderIconPane.setNeedLeftRightOutLine(false);
this.add(tabsHeaderIconPane, BorderLayout.NORTH); this.add(tabsHeaderIconPane, BorderLayout.NORTH);
//数据字典
dictTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
dictCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
dictTabPane.add(dictCardPane, BorderLayout.CENTER);
dictCardLayout = new CardLayout();
dictCardPane.setLayout(dictCardLayout);
//构建树
treeTabPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
widgetPropertyPane = new BasicWidgetPropertySettingPane(); widgetPropertyPane = new BasicWidgetPropertySettingPane();
UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Basic"), 280, 24, widgetPropertyPane); UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Basic"), 280, 24, widgetPropertyPane);
@ -124,31 +98,12 @@ public class CellWidgetCardPane extends BasicPane {
public void populate(Widget cellWidget) { public void populate(Widget cellWidget) {
initComponents(pane); initComponents(pane);
// super.populate(cellWidget);
currentEditorDefinePane = null; currentEditorDefinePane = null;
if (cellWidget instanceof NoneWidget) {
// this.tabbedPane.setEnabled(false);
} else {
// this.tabbedPane.setEnabled(true);
}
WidgetDefinePaneFactory.RN rn = WidgetDefinePaneFactory.createWidgetDefinePane(cellWidget, new Operator() { WidgetDefinePaneFactory.RN rn = WidgetDefinePaneFactory.createWidgetDefinePane(cellWidget, new Operator() {
@Override @Override
public void did(DataCreatorUI ui, String cardName) { public void did(DataCreatorUI ui, String cardName) {
if (ui == null) { //todo
removeDictAttriPane();
removeTreeAttriPane();
}
if (ui instanceof DictionaryPane) {
removeDictAttriPane();
removeTreeAttriPane();
showDictPane(ui, cardName);
} else if (ui instanceof TreeSettingPane) {
removeDictAttriPane();
removeTreeAttriPane();
showTreePane(ui);
}
} }
}); });
DataModify<? extends Widget> definePane = rn.getDefinePane(); DataModify<? extends Widget> definePane = rn.getDefinePane();
@ -160,19 +115,6 @@ public class CellWidgetCardPane extends BasicPane {
tabsHeaderIconPane.setSelectedIndex(0); tabsHeaderIconPane.setSelectedIndex(0);
} }
private void showDictPane(DataCreatorUI ui, String cardName) {
dictCardPane.removeAll();
dictCardPane.add(ui.toSwingComponent(), cardName);
dictCardLayout.show(dictCardPane, cardName);
addDictAttriPane();
}
private void showTreePane(DataCreatorUI ui) {
treeTabPane.removeAll();
treeTabPane.add(ui.toSwingComponent());
addTreeAttriPane();
}
public Widget update() { public Widget update() {
if (currentEditorDefinePane == null) { if (currentEditorDefinePane == null) {
return null; return null;
@ -182,7 +124,6 @@ public class CellWidgetCardPane extends BasicPane {
return null; return null;
} }
widgetPropertyPane.update(widget); widgetPropertyPane.update(widget);
// super.update(widget);
Listener[] listener = eventPane == null ? new Listener[0] : eventPane.updateListeners(); Listener[] listener = eventPane == null ? new Listener[0] : eventPane.updateListeners();
widget.clearListeners(); widget.clearListeners();
@ -203,28 +144,4 @@ public class CellWidgetCardPane extends BasicPane {
eventPane.checkValid(); eventPane.checkValid();
} }
private void addDictAttriPane() {
center.add(this.dictTabPane, Inter.getLocText("FR-Designer_DS_Dictionary"));
reInitHeaderPane(this.dictTabPane);
}
private void addTreeAttriPane() {
center.add(this.dictTabPane, Inter.getLocText("FR-Designer_Create_Tree"));
reInitHeaderPane(this.treeTabPane);
}
private void removeDictAttriPane() {
center.remove(this.dictTabPane);
}
private void removeTreeAttriPane() {
center.remove(this.treeTabPane);
}
private void reInitHeaderPane(JPanel jPanel) {
paneList.add(jPanel);
// tabsHeaderIconPane = new
}
} }

2
designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java

@ -25,6 +25,8 @@ public class BasicWidgetPropertySettingPane extends BasicPane {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
enableCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Visible"), true); enableCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Visible"), true);
visibleCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Widget-Visible"), true); visibleCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Widget-Visible"), true);
enableCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
visibleCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
widgetNameComboBox = new ParameterTreeComboBox(); widgetNameComboBox = new ParameterTreeComboBox();
widgetNameComboBox.refreshTree(); widgetNameComboBox.refreshTree();
double f = TableLayout.FILL; double f = TableLayout.FILL;

3
designer/src/com/fr/design/widget/ui/ButtonGroupDictPane.java

@ -39,6 +39,7 @@ public class ButtonGroupDictPane extends JPanel {
dictPane = new AccessibleDictionaryEditor(); dictPane = new AccessibleDictionaryEditor();
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
adaptiveCheckbox = new UICheckBox(Inter.getLocText("Adaptive"), true); adaptiveCheckbox = new UICheckBox(Inter.getLocText("Adaptive"), true);
adaptiveCheckbox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
adaptiveCheckbox.addActionListener(new ActionListener() { adaptiveCheckbox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
columnSpinner.setVisible(!adaptiveCheckbox.isSelected()); columnSpinner.setVisible(!adaptiveCheckbox.isSelected());
@ -57,7 +58,7 @@ public class ButtonGroupDictPane extends JPanel {
{adaptiveCheckbox, columnLabel, columnSpinner} {adaptiveCheckbox, columnLabel, columnSpinner}
}; };
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, 16, 8); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, 16, 8);
panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
this.add(panel); this.add(panel);

10
designer/src/com/fr/design/widget/ui/CheckBoxGroupDefinePane.java

@ -19,8 +19,6 @@ import com.fr.form.ui.CheckBoxGroup;
import com.fr.general.Inter; import com.fr.general.Inter;
public class CheckBoxGroupDefinePane extends FieldEditorDefinePane<CheckBoxGroup> { public class CheckBoxGroupDefinePane extends FieldEditorDefinePane<CheckBoxGroup> {
private AccessibleDictionaryEditor dictPane;
CheckBoxDictPane checkBoxDictPane; CheckBoxDictPane checkBoxDictPane;
private UICheckBox checkbox; private UICheckBox checkbox;
@ -44,8 +42,8 @@ public class CheckBoxGroupDefinePane extends FieldEditorDefinePane<CheckBoxGroup
@Override @Override
protected JPanel setFirstContentPane() { protected JPanel setFirstContentPane() {
JPanel advancePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel advancePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
dictPane = new AccessibleDictionaryEditor();
checkbox = new UICheckBox(Inter.getLocText(new String[]{"Provide", "Choose_All"})); checkbox = new UICheckBox(Inter.getLocText(new String[]{"Provide", "Choose_All"}));
checkbox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
buttonGroupDictPane = new ButtonGroupDictPane(); buttonGroupDictPane = new ButtonGroupDictPane();
checkBoxDictPane = new CheckBoxDictPane(); checkBoxDictPane = new CheckBoxDictPane();
double f = TableLayout.FILL; double f = TableLayout.FILL;
@ -53,7 +51,6 @@ public class CheckBoxGroupDefinePane extends FieldEditorDefinePane<CheckBoxGroup
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{buttonGroupDictPane, null }, new Component[]{buttonGroupDictPane, null },
new Component[]{checkbox, null }, new Component[]{checkbox, null },
new Component[]{new UILabel(Inter.getLocText("FR-Designer_DS-Dictionary")), dictPane },
new Component[]{checkBoxDictPane, null }, new Component[]{checkBoxDictPane, null },
}; };
@ -61,7 +58,7 @@ public class CheckBoxGroupDefinePane extends FieldEditorDefinePane<CheckBoxGroup
double[] columnSize = {p, f}; double[] columnSize = {p, f};
int[][] rowCount = {{1, 1},{1, 1},{1,1},{1,1}}; int[][] rowCount = {{1, 1},{1, 1},{1,1},{1,1}};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7);
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); // panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
advancePane.add(panel); advancePane.add(panel);
return advancePane; return advancePane;
@ -69,7 +66,6 @@ public class CheckBoxGroupDefinePane extends FieldEditorDefinePane<CheckBoxGroup
@Override @Override
protected void populateSubFieldEditorBean(CheckBoxGroup ob) { protected void populateSubFieldEditorBean(CheckBoxGroup ob) {
this.dictPane.setValue(ob.getDictionary());
checkBoxDictPane.populate(ob); checkBoxDictPane.populate(ob);
checkbox.setSelected(ob.isChooseAll()); checkbox.setSelected(ob.isChooseAll());
this.buttonGroupDictPane.populate(ob); this.buttonGroupDictPane.populate(ob);
@ -78,8 +74,6 @@ public class CheckBoxGroupDefinePane extends FieldEditorDefinePane<CheckBoxGroup
@Override @Override
protected CheckBoxGroup updateSubFieldEditorBean() { protected CheckBoxGroup updateSubFieldEditorBean() {
CheckBoxGroup ob = new CheckBoxGroup(); CheckBoxGroup ob = new CheckBoxGroup();
ob.setDictionary((Dictionary) this.dictPane.getValue());
checkBoxDictPane.update(ob); checkBoxDictPane.update(ob);
ob.setChooseAll(checkbox.isSelected()); ob.setChooseAll(checkbox.isSelected());
this.buttonGroupDictPane.update(ob); this.buttonGroupDictPane.update(ob);

1
designer/src/com/fr/design/widget/ui/ComboCheckBoxDefinePane.java

@ -30,6 +30,7 @@ public class ComboCheckBoxDefinePane extends CustomWritableRepeatEditorPane<Comb
dictPane = new AccessibleDictionaryEditor(); dictPane = new AccessibleDictionaryEditor();
checkBoxDictPane = new CheckBoxDictPane(); checkBoxDictPane = new CheckBoxDictPane();
supportTagCheckBox = new UICheckBox(Inter.getLocText("Form-SupportTag"), true); supportTagCheckBox = new UICheckBox(Inter.getLocText("Form-SupportTag"), true);
supportTagCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
JPanel advancePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel advancePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
double f = TableLayout.FILL; double f = TableLayout.FILL;
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;

4
designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java

@ -32,6 +32,7 @@ public abstract class CustomWritableRepeatEditorPane<T extends CustomWriteAbleRe
this.customDataCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_CustomData"), false); this.customDataCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_CustomData"), false);
this.customDataCheckBox.setPreferredSize( this.customDataCheckBox.setPreferredSize(
new Dimension(CUSTOM_DATA_CHECK_BOX_WIDTH, CUSTOM_DATA_CHECK_BOX_HEIGHT)); new Dimension(CUSTOM_DATA_CHECK_BOX_WIDTH, CUSTOM_DATA_CHECK_BOX_HEIGHT));
this.customDataCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
JPanel otherContentPane = this.setForthContentPane(); JPanel otherContentPane = this.setForthContentPane();
return otherContentPane; return otherContentPane;
} }
@ -39,7 +40,8 @@ public abstract class CustomWritableRepeatEditorPane<T extends CustomWriteAbleRe
public JPanel setValidatePane(){ public JPanel setValidatePane(){
JPanel otherContentPane = super.setValidatePane(); JPanel otherContentPane = super.setValidatePane();
otherContentPane.add(GUICoreUtils.createFlowPane(new JComponent[]{customDataCheckBox}, FlowLayout.LEFT, 5)); JPanel jPanel = GUICoreUtils.createFlowPane(new JComponent[]{customDataCheckBox}, FlowLayout.LEFT, 0);
otherContentPane.add(jPanel, BorderLayout.CENTER);
return otherContentPane; return otherContentPane;
} }

5
designer/src/com/fr/design/widget/ui/DirectWriteEditorDefinePane.java

@ -42,8 +42,9 @@ public abstract class DirectWriteEditorDefinePane<T extends DirectWriteEditor> e
public JPanel setValidatePane(){ public JPanel setValidatePane(){
JPanel otherContentPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel otherContentPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
otherContentPane.add(GUICoreUtils.createFlowPane(new JComponent[]{directWriteCheckBox}, FlowLayout.LEFT, 5)); JPanel jPanel = GUICoreUtils.createFlowPane(new JComponent[]{directWriteCheckBox}, FlowLayout.LEFT, 0);
otherContentPane.add(jPanel, BorderLayout.NORTH);
return otherContentPane; return otherContentPane;
} }

12
designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java

@ -68,7 +68,6 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
@Override @Override
public void populateBean(T ob) { public void populateBean(T ob) {
this.allowBlankCheckBox.setSelected(ob.isAllowBlank()); this.allowBlankCheckBox.setSelected(ob.isAllowBlank());
// errorMsgTextField.setEnabled(!allowBlankCheckBox.isSelected());
this.errorMsgTextField.setText(ob.getErrorMessage()); this.errorMsgTextField.setText(ob.getErrorMessage());
populateSubFieldEditorBean(ob); populateSubFieldEditorBean(ob);
@ -101,7 +100,7 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
final UILabel uiLabel = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Error", "FR-Designer_Tooltips"})); final UILabel uiLabel = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Error", "FR-Designer_Tooltips"}));
errorMsgTextField = new UITextField(10); errorMsgTextField = new UITextField(10);
allowBlankCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Null")); allowBlankCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Null"));
allowBlankCheckBox.setBorder(BorderFactory.createEmptyBorder(5, 5, 0, 5)); allowBlankCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
allowBlankCheckBox.setPreferredSize(new Dimension(ALLOW_BLANK_CHECK_BOX_WIDTH, ALLOW_BLANK_CHECK_BOX_HEIGHT)); allowBlankCheckBox.setPreferredSize(new Dimension(ALLOW_BLANK_CHECK_BOX_WIDTH, ALLOW_BLANK_CHECK_BOX_HEIGHT));
allowBlankCheckBox.addItemListener(new ItemListener() { allowBlankCheckBox.addItemListener(new ItemListener() {
@ -141,15 +140,6 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Validate"), 280, 24, validatePane); UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Validate"), 280, 24, validatePane);
this.add(uiExpandablePane, BorderLayout.CENTER); this.add(uiExpandablePane, BorderLayout.CENTER);
// JPanel firstPane = GUICoreUtils.createFlowPane(new JComponent[]{allowBlankCheckBox}, FlowLayout.LEFT, 5);
// validatePane.add(firstPane);
// JPanel secondPane = new JPanel(FRGUIPaneFactory.createLabelFlowLayout());
// secondPane.add(new UILabel("错误提示" + ":"));
// secondPane.add(errorMsgTextField);
// JPanel secondPane = GUICoreUtils.createFlowPane(new JComponent[]{new UILabel(Inter.getLocText(new String[]{"Error", "Tooltips"}) + ":"), errorMsgTextField}, FlowLayout.LEFT, 24);
// secondPane.setPreferredSize(new Dimension(400, 23));
// validatePane.add(secondPane);
} }
public JPanel setValidatePane() { public JPanel setValidatePane() {

3
designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java

@ -1,6 +1,6 @@
package com.fr.design.widget.ui; package com.fr.design.widget.ui;
import javax.swing.JPanel; import javax.swing.*;
import com.fr.data.Dictionary; import com.fr.data.Dictionary;
import com.fr.design.data.DataCreatorUI; import com.fr.design.data.DataCreatorUI;
@ -38,6 +38,7 @@ public class ListEditorDefinePane extends WriteUnableRepeatEditorPane<ListEditor
JPanel contenter = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0(); JPanel contenter = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0();
JPanel centerPane = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0(); JPanel centerPane = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0();
centerPane.add(needHeadCheckBox = new UICheckBox(Inter.getLocText("List-Need_Head"))); centerPane.add(needHeadCheckBox = new UICheckBox(Inter.getLocText("List-Need_Head")));
needHeadCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
contenter.add(centerPane); contenter.add(centerPane);
return contenter; return contenter;
} }

1
designer/src/com/fr/design/widget/ui/MultiFileEditorPane.java

@ -33,6 +33,7 @@ public class MultiFileEditorPane extends FieldEditorDefinePane<MultiFileEditor>
JPanel contenter = new JPanel(new BorderLayout()); JPanel contenter = new JPanel(new BorderLayout());
singleFileCheckBox = new UICheckBox(Inter.getLocText("SINGLE_FILE_UPLOAD")); singleFileCheckBox = new UICheckBox(Inter.getLocText("SINGLE_FILE_UPLOAD"));
singleFileCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
acceptType = new DictionaryComboBox(DictionaryConstants.acceptTypes, DictionaryConstants.fileTypeDisplays); acceptType = new DictionaryComboBox(DictionaryConstants.acceptTypes, DictionaryConstants.fileTypeDisplays);
// acceptType.setPreferredSize(new Dimension(100, 20)); // acceptType.setPreferredSize(new Dimension(100, 20));
fileSizeField = new UISpinner(0, Integer.MAX_VALUE, 1, -1); fileSizeField = new UISpinner(0, Integer.MAX_VALUE, 1, -1);

5
designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java

@ -172,6 +172,7 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor>
public JPanel setValidatePane() { public JPanel setValidatePane() {
this.allowDecimalsCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Decimals")); this.allowDecimalsCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Decimals"));
allowDecimalsCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
this.decimalLength = new UIBasicSpinner(new SpinnerNumberModel(16, 0, Integer.MAX_VALUE, 1)); this.decimalLength = new UIBasicSpinner(new SpinnerNumberModel(16, 0, Integer.MAX_VALUE, 1));
this.decimalLength.setPreferredSize(new Dimension(155, 20)); this.decimalLength.setPreferredSize(new Dimension(155, 20));
@ -179,8 +180,10 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor>
this.allowNegativeCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Negative")); this.allowNegativeCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Negative"));
this.allowNegativeCheckBox.addActionListener(actionListener2); this.allowNegativeCheckBox.addActionListener(actionListener2);
allowNegativeCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
this.setMaxValueCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Max_Value"), false); this.setMaxValueCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Max_Value"), false);
setMaxValueCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
this.maxValueSpinner = new UIBasicSpinner(maxValueModel = new SpinnerNumberModel(0D, -Double.MAX_VALUE, Double.MAX_VALUE, 1D)); this.maxValueSpinner = new UIBasicSpinner(maxValueModel = new SpinnerNumberModel(0D, -Double.MAX_VALUE, Double.MAX_VALUE, 1D));
maxValueSpinner.setPreferredSize(new Dimension(155, 20)); maxValueSpinner.setPreferredSize(new Dimension(155, 20));
@ -190,6 +193,8 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor>
this.maxValueSpinner.addChangeListener(changeListener1); this.maxValueSpinner.addChangeListener(changeListener1);
this.setMinValueCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Min_Value"), false); this.setMinValueCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Min_Value"), false);
setMinValueCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
this.minValueSpinner = new UIBasicSpinner(minValueModel = new SpinnerNumberModel(0D, -Double.MAX_VALUE, Double.MAX_VALUE, 1D)); this.minValueSpinner = new UIBasicSpinner(minValueModel = new SpinnerNumberModel(0D, -Double.MAX_VALUE, Double.MAX_VALUE, 1D));
minValueSpinner.setPreferredSize(new Dimension(155, 20)); minValueSpinner.setPreferredSize(new Dimension(155, 20));
setNotAllowsInvalid(this.minValueSpinner); setNotAllowsInvalid(this.minValueSpinner);

8
designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java

@ -1,12 +1,14 @@
package com.fr.design.widget.ui; package com.fr.design.widget.ui;
import com.fr.design.gui.frpane.RegPane; import com.fr.design.gui.frpane.RegPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.form.ui.TextEditor; import com.fr.form.ui.TextEditor;
import com.fr.form.ui.reg.RegExp; import com.fr.form.ui.reg.RegExp;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.KeyAdapter; import java.awt.event.KeyAdapter;
@ -56,8 +58,10 @@ public class TextFieldEditorDefinePane extends FieldEditorDefinePane<TextEditor>
} }
}); });
JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
return waterMarkDictPane; jPanel.add(waterMarkDictPane, BorderLayout.CENTER);
waterMarkDictPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));
return jPanel;
} }
public JPanel setValidatePane(){ public JPanel setValidatePane(){

1
designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java

@ -25,6 +25,7 @@ public abstract class WriteUnableRepeatEditorPane<E extends WriteUnableRepeatEdi
protected JPanel setFirstContentPane() { protected JPanel setFirstContentPane() {
JPanel contentPane = FRGUIPaneFactory.createYBoxEmptyBorderPane(); JPanel contentPane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
removeRepeatCheckBox = new UICheckBox(Inter.getLocText("Form-Remove_Repeat_Data"), false); removeRepeatCheckBox = new UICheckBox(Inter.getLocText("Form-Remove_Repeat_Data"), false);
removeRepeatCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
Component[] dicPane = createDicPane(); Component[] dicPane = createDicPane();
double f = TableLayout.FILL; double f = TableLayout.FILL;

2
designer/src/com/fr/design/widget/ui/btn/DefineDeleteColumnRowPane.java

@ -38,7 +38,7 @@ public class DefineDeleteColumnRowPane extends BasicPane {
{ new UILabel(Inter.getLocText(new String[]{"Specify", "Cell"}) + ":"), crEditor }, { new UILabel(Inter.getLocText(new String[]{"Specify", "Cell"}) + ":"), crEditor },
{new UILabel(Inter.getLocText("Append_Delete_Row_Message")),null}}; {new UILabel(Inter.getLocText("Append_Delete_Row_Message")),null}};
JPanel contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); JPanel contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
contentPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
setLayout(FRGUIPaneFactory.createBorderLayout()); setLayout(FRGUIPaneFactory.createBorderLayout());
add(contentPane); add(contentPane);

6
designer/src/com/fr/design/widget/ui/btn/FreeButtonDetailPane.java

@ -9,13 +9,17 @@ import com.fr.form.ui.FreeButton;
import com.fr.design.widget.btn.ButtonWithHotkeysDetailPane; import com.fr.design.widget.btn.ButtonWithHotkeysDetailPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import javax.swing.*;
public class FreeButtonDetailPane extends ButtonWithHotkeysDetailPane<FreeButton> { public class FreeButtonDetailPane extends ButtonWithHotkeysDetailPane<FreeButton> {
private ButtonBackgroundPane backgroundCompPane; private ButtonBackgroundPane backgroundCompPane;
@Override @Override
protected Component createCenterPane() { protected Component createCenterPane() {
backgroundCompPane = new ButtonBackgroundPane(); backgroundCompPane = new ButtonBackgroundPane();
return TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_Background") + ":"), backgroundCompPane}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7); JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_Background") + ":"), backgroundCompPane}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7);
jPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
return jPanel;
} }
@Override @Override

8
designer_base/src/com/fr/design/gui/itree/refreshabletree/TreeRootPane.java

@ -32,23 +32,31 @@ public class TreeRootPane extends BasicPane {
JPanel checkTypePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0(); JPanel checkTypePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0();
checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
checkTypeCheckBox = new UICheckBox(Inter.getLocText("Tree-Mutiple_Selection_Or_Not")); checkTypeCheckBox = new UICheckBox(Inter.getLocText("Tree-Mutiple_Selection_Or_Not"));
checkTypeCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
checkTypePane.add(checkTypeCheckBox); checkTypePane.add(checkTypeCheckBox);
this.add(checkTypePane); this.add(checkTypePane);
JPanel loadTypePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0(); JPanel loadTypePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0();
checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
loadTypeCheckBox = new UICheckBox(Inter.getLocText("Widget-Load_By_Async")); loadTypeCheckBox = new UICheckBox(Inter.getLocText("Widget-Load_By_Async"));
loadTypeCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
loadTypePane.add(loadTypeCheckBox); loadTypePane.add(loadTypeCheckBox);
this.add(loadTypePane); this.add(loadTypePane);
JPanel leafSelectPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0(); JPanel leafSelectPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0();
checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
leafSelectPane.add(layerTypeCheckBox = new UICheckBox(Inter.getLocText("Tree-Select_Leaf_Only"))); leafSelectPane.add(layerTypeCheckBox = new UICheckBox(Inter.getLocText("Tree-Select_Leaf_Only")));
layerTypeCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
this.add(leafSelectPane); this.add(leafSelectPane);
JPanel returnFullPathPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0(); JPanel returnFullPathPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0();
checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
returnFullPathPane.add(returnFullPathCheckBox = new UICheckBox(Inter.getLocText("Tree-Return_Full_Path"))); returnFullPathPane.add(returnFullPathCheckBox = new UICheckBox(Inter.getLocText("Tree-Return_Full_Path")));
returnFullPathCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
this.add(returnFullPathPane); this.add(returnFullPathPane);
} }

2
designer_base/src/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java

@ -49,7 +49,7 @@ public abstract class ButtonWithHotkeysDetailPane<T extends Button> extends Butt
}; };
hotkeysTextField.setToolTipText(StableUtils.join(ButtonConstants.HOTKEYS, ",")); hotkeysTextField.setToolTipText(StableUtils.join(ButtonConstants.HOTKEYS, ","));
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, 16, 8); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, 16, 8);
advancePane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
advancePane.add(panel, BorderLayout.NORTH); advancePane.add(panel, BorderLayout.NORTH);
Component comp = createCenterPane(); Component comp = createCenterPane();
if(comp != null ) { if(comp != null ) {

2
designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java

@ -6,6 +6,7 @@ import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.design.widget.DataModify; import com.fr.design.widget.DataModify;
import com.fr.design.widget.Operator; import com.fr.design.widget.Operator;
@ -214,6 +215,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
public void fireValueChanged() { public void fireValueChanged() {
designer.repaint(); designer.repaint();
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
} }
public String getIconPath() { public String getIconPath() {

Loading…
Cancel
Save