From e1b9bf51978e5758d1430daee67c9270f56bc3c2 Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 29 Sep 2017 14:49:33 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-4602=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=B1=9E=E6=80=A7=E9=9D=A2=E6=9D=BF=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E6=A1=86=E4=B8=8B=E6=8B=89=E6=A1=86=E6=96=87=E5=AD=97=E7=BC=A9?= =?UTF-8?q?=E8=BF=9B=E4=B8=8D=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/BasicWidgetPropertySettingPane.java | 16 ++++----- .../design/widget/ui/ButtonGroupDictPane.java | 4 +-- .../design/widget/ui/CheckBoxDefinePane.java | 15 ++++---- .../design/widget/ui/ComboBoxDefinePane.java | 6 ++-- .../widget/ui/ComboCheckBoxDefinePane.java | 3 +- .../widget/ui/DateEditorDefinePane.java | 12 +++---- .../widget/ui/FieldEditorDefinePane.java | 5 ++- .../widget/ui/IframeEditorDefinePane.java | 6 ++-- .../widget/ui/ListEditorDefinePane.java | 10 +++--- .../design/widget/ui/MultiFileEditorPane.java | 5 ++- .../widget/ui/NumberEditorDefinePane.java | 1 - .../widget/ui/TextFieldEditorDefinePane.java | 2 -- .../ui/TreeComboBoxEditorDefinePane.java | 6 ++-- .../widget/ui/TreeEditorDefinePane.java | 6 ++-- .../design/widget/ui/WaterMarkDictPane.java | 5 +-- .../ui/WriteUnableRepeatEditorPane.java | 4 +-- .../ui/btn/DefineAppendColumnRowPane.java | 4 ++- .../ui/btn/DefineDeleteColumnRowPane.java | 3 +- .../fr/design/designer/IntervalConstants.java | 10 ++++-- .../src/com/fr/design/gui/frpane/RegPane.java | 3 +- .../mainframe/widget/BasicPropertyPane.java | 3 +- .../widget/WidgetBoundsPaneFactory.java | 36 ++++++++++++------- .../btn/ButtonWithHotkeysDetailPane.java | 2 +- .../widget/component/BackgroundCompPane.java | 6 ++-- .../widget/component/CheckBoxDictPane.java | 11 +++--- .../ui/FormBasicWidgetPropertyPane.java | 4 ++- .../parameter/RootDesignDefinePane.java | 4 +-- .../widget/ui/designer/ButtonDefinePane.java | 3 +- .../ui/designer/CheckBoxDefinePane.java | 3 +- .../ui/designer/CheckBoxGroupDefinePane.java | 4 +-- .../ui/designer/ComboCheckBoxDefinePane.java | 5 +-- .../CustomWritableRepeatEditorPane.java | 7 +--- .../ui/designer/DateEditorDefinePane.java | 6 ++-- .../designer/DirectWriteEditorDefinePane.java | 8 ++--- .../ui/designer/FieldEditorDefinePane.java | 9 +++-- .../widget/ui/designer/LabelDefinePane.java | 6 +++- .../ui/designer/MultiFileEditorPane.java | 10 +++--- .../ui/designer/NumberEditorDefinePane.java | 4 +-- .../designer/TextFieldEditorDefinePane.java | 4 +-- .../ui/designer/TreeEditorDefinePane.java | 13 +++++-- .../designer/btn/ButtonGroupDefinePane.java | 4 +-- .../designer/component/PaddingBoundPane.java | 30 +++++++++++----- .../component/WidgetAbsoluteBoundPane.java | 2 -- .../layout/BorderStyleWidgetDefinePane.java | 4 ++- .../layout/ElementEditorDefinePane.java | 3 +- .../FRAbsoluteBodyLayoutDefinePane.java | 11 +++--- .../layout/FRAbsoluteLayoutDefinePane.java | 16 ++++----- .../layout/FRFitLayoutDefinePane.java | 10 +++--- .../layout/WCardLayoutDefinePane.java | 7 ++-- .../layout/WTabFitLayoutDefinePane.java | 5 +-- .../layout/WTitleLayoutDefinePane.java | 3 +- 51 files changed, 217 insertions(+), 152 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java b/designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java index cedcfc1db7..f6fa3693ae 100644 --- a/designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java +++ b/designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java @@ -1,6 +1,6 @@ package com.fr.design.widget.ui; -import com.fr.design.constants.LayoutConstants; +import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.dialog.BasicPane; @@ -11,8 +11,11 @@ import com.fr.form.ui.Widget; import com.fr.general.Inter; import com.fr.design.utils.gui.GUICoreUtils; -import javax.swing.*; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Component; + public class BasicWidgetPropertySettingPane extends BasicPane { private ParameterTreeComboBox widgetNameComboBox; @@ -28,20 +31,17 @@ public class BasicWidgetPropertySettingPane extends BasicPane { visibleCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0)); widgetNameComboBox = new ParameterTreeComboBox(); widgetNameComboBox.refreshTree(); - JPanel widgetNamePane = new JPanel(new BorderLayout()); - widgetNamePane.add(widgetNameComboBox, BorderLayout.CENTER); - widgetNamePane.setBorder(BorderFactory.createEmptyBorder(0,20,0,0)); double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("FR-Designer_Form-Widget_Name")), widgetNamePane}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Form-Widget_Name")), widgetNameComboBox}, new Component[]{enableCheckBox, null}, new Component[]{visibleCheckBox, null}, }; double[] rowSize = {p, p, p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1},{1, 1},{1, 1},{1, 1}}; - JPanel pane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_LARGE); + JPanel pane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W2, IntervalConstants.INTERVAL_L1); pane.setBorder(BorderFactory.createEmptyBorder(10,0,10,0)); this.add(pane, BorderLayout.CENTER); diff --git a/designer/src/com/fr/design/widget/ui/ButtonGroupDictPane.java b/designer/src/com/fr/design/widget/ui/ButtonGroupDictPane.java index aaa116765f..8b8916ca32 100644 --- a/designer/src/com/fr/design/widget/ui/ButtonGroupDictPane.java +++ b/designer/src/com/fr/design/widget/ui/ButtonGroupDictPane.java @@ -5,6 +5,7 @@ import java.awt.*; import java.awt.event.ActionEvent; import com.fr.data.Dictionary; +import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.ispinner.UIBasicSpinner; import java.awt.event.ActionListener; @@ -57,8 +58,7 @@ public class ButtonGroupDictPane extends JPanel { {new UILabel(Inter.getLocText("FR-Designer_DS-Dictionary")), dictPane, null}, {adaptiveCheckbox, columnLabel, columnSpinner} }; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, 16, 8); - panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); this.add(panel); diff --git a/designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java b/designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java index 44d0df7f4a..3bbc5a113f 100644 --- a/designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java @@ -1,6 +1,7 @@ package com.fr.design.widget.ui; import com.fr.design.constants.LayoutConstants; +import com.fr.design.designer.IntervalConstants; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; @@ -17,28 +18,24 @@ public class CheckBoxDefinePane extends AbstractDataModify { private UITextField text; public CheckBoxDefinePane() { - this.iniComoponents(); + this.iniComponents(); } - private void iniComoponents() { + private void iniComponents() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); text = new UITextField(); - JPanel panel = new JPanel(new BorderLayout()); - panel.add(text, BorderLayout.CENTER); - panel.setBorder(BorderFactory.createEmptyBorder(0, 35, 0, 0)); - double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("FR-Designer_Text")), panel}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Text")), text}, }; double[] rowSize = {p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1}}; - JPanel pane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_LARGE); + JPanel pane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W3, IntervalConstants.INTERVAL_L1); UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 24, pane); - pane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 15)); + pane.setBorder(BorderFactory.createEmptyBorder(10, 5, 10, 0)); this.add(uiExpandablePane); } diff --git a/designer/src/com/fr/design/widget/ui/ComboBoxDefinePane.java b/designer/src/com/fr/design/widget/ui/ComboBoxDefinePane.java index ed4f94079c..a59b049791 100644 --- a/designer/src/com/fr/design/widget/ui/ComboBoxDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/ComboBoxDefinePane.java @@ -4,6 +4,7 @@ import javax.swing.*; import com.fr.data.Dictionary; import com.fr.design.data.DataCreatorUI; +import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.widget.accessibles.AccessibleDictionaryEditor; @@ -26,8 +27,9 @@ public class ComboBoxDefinePane extends CustomWritableRepeatEditorPane protected JPanel setForthContentPane () { dictPane = new AccessibleDictionaryEditor(); - JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_DS-Dictionary")), dictPane}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7); - jPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); + JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane( + new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_DS-Dictionary")), dictPane}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); + jPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); return jPanel; } diff --git a/designer/src/com/fr/design/widget/ui/ComboCheckBoxDefinePane.java b/designer/src/com/fr/design/widget/ui/ComboCheckBoxDefinePane.java index b8922ad557..d379f21336 100644 --- a/designer/src/com/fr/design/widget/ui/ComboCheckBoxDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/ComboCheckBoxDefinePane.java @@ -2,6 +2,7 @@ package com.fr.design.widget.ui; import com.fr.data.Dictionary; import com.fr.design.data.DataCreatorUI; +import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; @@ -42,7 +43,7 @@ public class ComboCheckBoxDefinePane extends CustomWritableRepeatEditorPane extends Abstr protected void initComponents() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel contentPane = this.setFirstContentPane(); + JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); + jPanel.add(contentPane, BorderLayout.CENTER); + contentPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); if (contentPane != null) { - UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 24, contentPane); + UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 24, jPanel); this.add(uiExpandablePane, BorderLayout.NORTH); } this.addValidatePane(); diff --git a/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java index 7416f314fc..d70e633f47 100644 --- a/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java @@ -2,6 +2,7 @@ package com.fr.design.widget.ui; import com.fr.base.FRContext; import com.fr.design.constants.LayoutConstants; +import com.fr.design.designer.IntervalConstants; import com.fr.design.dialog.DialogActionListener; import com.fr.design.dialog.UIDialog; import com.fr.design.foldablepane.UIExpandablePane; @@ -57,14 +58,15 @@ public class IframeEditorDefinePane extends AbstractDataModify { parameterViewPaneButton = new UIButton(Inter.getLocText("FR-Designer_Edit")); parameterViewPaneButton.addActionListener(parameterListener); parameterViewPane = new ReportletParameterViewPane(); - + horizontalCheck.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + verticalCheck.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); java.awt.Component[][] coms = { {horizontalCheck, null}, {verticalCheck, null}, {new UILabel(Inter.getLocText("Form-Url")), srcTextField = new UITextField()}, {new UILabel(Inter.getLocText("FR-Designer_Parameters")), parameterViewPaneButton}}; int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(coms, rowSize, columnSize, rowCount, 45, LayoutConstants.VGAP_LARGE); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(coms, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W3, IntervalConstants.INTERVAL_L1); contentPane.add(panel); diff --git a/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java index 1969bff204..a223ee439a 100644 --- a/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java @@ -34,12 +34,12 @@ public class ListEditorDefinePane extends WriteUnableRepeatEditorPane double[] rowSize = {p, p, p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 22, 10); - - panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 00)); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); contenter.add(panel, BorderLayout.CENTER); return contenter; diff --git a/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java index 122441b81d..88244b903f 100644 --- a/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java @@ -29,7 +29,6 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane protected JPanel setFirstContentPane() { JPanel content = FRGUIPaneFactory.createBorderLayout_S_Pane(); waterMarkDictPane = new WaterMarkDictPane(); - waterMarkDictPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); content.add(waterMarkDictPane, BorderLayout.CENTER); return content; } diff --git a/designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java index 33981226d6..e5ae558086 100644 --- a/designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java @@ -51,9 +51,7 @@ public class TextFieldEditorDefinePane extends FieldEditorDefinePane } }); JPanel content = FRGUIPaneFactory.createBorderLayout_S_Pane(); - waterMarkDictPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); content.add(waterMarkDictPane, BorderLayout.CENTER); - return content; } diff --git a/designer/src/com/fr/design/widget/ui/TreeComboBoxEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/TreeComboBoxEditorDefinePane.java index 1bebaf90c8..2b6ae09b95 100644 --- a/designer/src/com/fr/design/widget/ui/TreeComboBoxEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/TreeComboBoxEditorDefinePane.java @@ -7,6 +7,7 @@ import javax.swing.JPanel; import com.fr.data.Dictionary; import com.fr.design.data.DataCreatorUI; +import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itree.refreshabletree.TreeRootPane; import com.fr.design.layout.FRGUIPaneFactory; @@ -38,8 +39,9 @@ public class TreeComboBoxEditorDefinePane extends CustomWritableRepeatEditorPane protected JPanel setFirstContentPane() { treeSettingPane = new AccessibleTreeModelEditor(); JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); - JPanel north = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_Create_Tree")), treeSettingPane}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7); - north.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); + JPanel north = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Create_Tree")), treeSettingPane}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W2, IntervalConstants.INTERVAL_L1); + north.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); JPanel center = super.setFirstContentPane(); jPanel.add(north, BorderLayout.NORTH); jPanel.add(center, BorderLayout.CENTER); diff --git a/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java index f98eea391a..2ed9c06636 100644 --- a/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java @@ -2,6 +2,7 @@ package com.fr.design.widget.ui; import com.fr.data.Dictionary; import com.fr.design.data.DataCreatorUI; +import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itree.refreshabletree.TreeRootPane; @@ -55,8 +56,9 @@ public class TreeEditorDefinePane extends FieldEditorDefinePane { protected JPanel setSecondContentPane() { accessibleTreeModelEditor = new AccessibleTreeModelEditor(); - JPanel createTree = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_Create_Tree")), accessibleTreeModelEditor}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7); - createTree.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); + JPanel createTree = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Create_Tree")), accessibleTreeModelEditor}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W2, IntervalConstants.INTERVAL_L1); + createTree.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); JPanel contenter = FRGUIPaneFactory.createBorderLayout_S_Pane(); diff --git a/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java b/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java index 1bfcb06337..1d8f347a7a 100644 --- a/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java +++ b/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java @@ -1,5 +1,6 @@ package com.fr.design.widget.ui; +import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.TableLayout; @@ -28,8 +29,8 @@ public class WaterMarkDictPane extends JPanel { double[] rowSize = {p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 18, 7); - panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W3, IntervalConstants.INTERVAL_L1); +// panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); this.add(panel, BorderLayout.CENTER); } diff --git a/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java b/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java index ffcf947a93..a81f7f7732 100644 --- a/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java +++ b/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java @@ -5,6 +5,7 @@ import java.awt.*; import javax.swing.BorderFactory; import javax.swing.JPanel; +import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; @@ -36,8 +37,7 @@ public abstract class WriteUnableRepeatEditorPane extends Butt {new UILabel(Inter.getLocText("FR-Designer_Button-Hotkeys")), hotkeysTextField = new UITextField()}, }; hotkeysTextField.setToolTipText(StableUtils.join(ButtonConstants.HOTKEYS, ",")); - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); advancePane.add(panel, BorderLayout.NORTH); Component comp = createCenterPane(); diff --git a/designer_base/src/com/fr/design/widget/component/BackgroundCompPane.java b/designer_base/src/com/fr/design/widget/component/BackgroundCompPane.java index fef58a2ac4..e534521706 100644 --- a/designer_base/src/com/fr/design/widget/component/BackgroundCompPane.java +++ b/designer_base/src/com/fr/design/widget/component/BackgroundCompPane.java @@ -32,7 +32,6 @@ public abstract class BackgroundCompPane extends BasicPane { public void initComponent() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); UILabel headLabel = createUILable(); - headLabel.setPreferredSize(new Dimension(50, 20)); initalBackgroundEditor = new AccessibleImgBackgroundEditor(); overBackgroundEditor = new AccessibleImgBackgroundEditor(); clickBackgroundEditor = new AccessibleImgBackgroundEditor(); @@ -48,10 +47,11 @@ public abstract class BackgroundCompPane extends BasicPane { new Component[]{new UILabel(Inter.getLocText("FR-Designer_Background-Over")), overBackgroundEditor}, new Component[]{new UILabel(Inter.getLocText("FR-Designer_Background-Click")), clickBackgroundEditor}, }; - panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); + panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W0, IntervalConstants.INTERVAL_L1); panel.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L6, IntervalConstants.INTERVAL_L5, 0, 0)); backgroundHead = new UIButtonGroup(titles); - JPanel headPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{headLabel, backgroundHead}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L2, 7); + JPanel headPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ + new Component[]{headLabel, backgroundHead}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W3, IntervalConstants.INTERVAL_L1); this.add(headPane, BorderLayout.NORTH); this.add(panel, BorderLayout.CENTER); diff --git a/designer_base/src/com/fr/design/widget/component/CheckBoxDictPane.java b/designer_base/src/com/fr/design/widget/component/CheckBoxDictPane.java index 506b637e95..eed4b7fbf0 100644 --- a/designer_base/src/com/fr/design/widget/component/CheckBoxDictPane.java +++ b/designer_base/src/com/fr/design/widget/component/CheckBoxDictPane.java @@ -35,11 +35,11 @@ public class CheckBoxDictPane extends JPanel { endComboBox = new DictionaryComboBox(DictionaryConstants.symbols, DictionaryConstants.symbolDisplays); endComboBox.setEditable(true); Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Form-Delimiter") + ":"), delimiterComboBox}, - new Component[]{new UILabel(Inter.getLocText("ComboCheckBox-Start_Symbol") + ":"),startComboBox}, - new Component[]{new UILabel(Inter.getLocText("ComboCheckBox-End_Symbol") + ":"),endComboBox} + new Component[]{new UILabel(Inter.getLocText("Form-Delimiter")), delimiterComboBox}, + new Component[]{new UILabel(Inter.getLocText("ComboCheckBox-Start_Symbol")),startComboBox}, + new Component[]{new UILabel(Inter.getLocText("ComboCheckBox-End_Symbol")),endComboBox} }; - returnStringPane = TableLayoutHelper.createGapTableLayoutPane(components, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); + returnStringPane = TableLayoutHelper.createGapTableLayoutPane(components, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W2, IntervalConstants.INTERVAL_L1); returnTypeComboBox = new UIButtonGroup(new String[]{Inter.getLocText("Widget-Array"), Inter.getLocText("String")}); returnTypeComboBox.addActionListener(new ActionListener() { @@ -48,7 +48,8 @@ public class CheckBoxDictPane extends JPanel { checkVisible(returnTypeComboBox.getSelectedIndex()); } }); - JPanel headPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("Widget-Date_Selector_Return_Type") + ":"), returnTypeComboBox}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7); + JPanel headPane = TableLayoutHelper.createGapTableLayoutPane( + new Component[][]{new Component[]{new UILabel(Inter.getLocText("Widget-Date_Selector_Return_Type")), returnTypeComboBox}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); jPanel.add(headPane, BorderLayout.NORTH); jPanel.add(returnStringPane, BorderLayout.CENTER); diff --git a/designer_form/src/com/fr/design/mainframe/widget/ui/FormBasicWidgetPropertyPane.java b/designer_form/src/com/fr/design/mainframe/widget/ui/FormBasicWidgetPropertyPane.java index 8fd6c8b00f..dd2f15af62 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/ui/FormBasicWidgetPropertyPane.java +++ b/designer_form/src/com/fr/design/mainframe/widget/ui/FormBasicWidgetPropertyPane.java @@ -21,10 +21,12 @@ public class FormBasicWidgetPropertyPane extends FormBasicPropertyPane { protected void initOtherPane() { JPanel pane2 = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); - pane2.setBorder(BorderFactory.createEmptyBorder(0,0,10,0)); + pane2.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); enableCheckBox = new UICheckBox(Inter.getLocText("Enabled"), true); + enableCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); pane2.add(enableCheckBox); visibleCheckBox = new UICheckBox(Inter.getLocText("Widget-Visible"), true); + visibleCheckBox.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); pane2.add(visibleCheckBox); this.add(pane2, BorderLayout.CENTER); } diff --git a/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java b/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java index 6cb07d4f04..3a93e4feca 100644 --- a/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java +++ b/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java @@ -66,7 +66,7 @@ public class RootDesignDefinePane extends AbstractDataModify { Component[][] components = new Component[][]{ new Component[]{new UILabel(Inter.getLocText("Form-Desin_Width")), designerWidth}, }; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); jPanel.add(panel); @@ -98,7 +98,7 @@ public class RootDesignDefinePane extends AbstractDataModify { new Component[]{useParamsTemplate, null}, new Component[]{new UILabel(Inter.getLocText("FR-Designer_WidgetDisplyPosition")), hAlignmentPane} }; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W0, IntervalConstants.INTERVAL_L1); panel.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, 0, IntervalConstants.INTERVAL_L1, 0)); jPanel.add(panel); return jPanel; diff --git a/designer_form/src/com/fr/design/widget/ui/designer/ButtonDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/ButtonDefinePane.java index 5d5d093b12..d0ed62b0a7 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/ButtonDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/ButtonDefinePane.java @@ -1,5 +1,6 @@ package com.fr.design.widget.ui.designer; +import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.creator.XCreator; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ilable.UILabel; @@ -52,7 +53,7 @@ public abstract class ButtonDefinePane extends AbstractDataMod {new UILabel(Inter.getLocText("FR-Designer_Button-Hotkeys")), hotkeysTextField} }; hotkeysTextField.setToolTipText(StableUtils.join(ButtonConstants.HOTKEYS, ",")); - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, rowCount, 10, 10); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); boundsPane.add(panel); diff --git a/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java index fd84442462..ab65dbda6f 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java @@ -1,5 +1,6 @@ package com.fr.design.widget.ui.designer; +import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.creator.XCreator; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ilable.UILabel; @@ -43,7 +44,7 @@ public class CheckBoxDefinePane extends AbstractDataModify { double[] rowSize = {p, p, p, p, p, p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1},{1, 1}, {1, 3},{1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); boundsPane.add(panel); diff --git a/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxGroupDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxGroupDefinePane.java index 15ed7b1042..1ffee293a5 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxGroupDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxGroupDefinePane.java @@ -1,6 +1,7 @@ package com.fr.design.widget.ui.designer; import com.fr.design.data.DataCreatorUI; +import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.creator.XCreator; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.TableLayout; @@ -50,8 +51,7 @@ public class CheckBoxGroupDefinePane extends ButtonGroupDefinePane public JPanel createOtherPane(){ supportTagCheckBox = new UICheckBox(Inter.getLocText("Form-SupportTag"), true); + supportTagCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); checkBoxDictPane = new CheckBoxDictPane(); double f = TableLayout.FILL; @@ -49,8 +51,7 @@ public class ComboCheckBoxDefinePane extends DictEditorDefinePane double[] rowSize = {p, p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1},{1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7); - panel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); return panel; } diff --git a/designer_form/src/com/fr/design/widget/ui/designer/CustomWritableRepeatEditorPane.java b/designer_form/src/com/fr/design/widget/ui/designer/CustomWritableRepeatEditorPane.java index 96b4cc46a6..a962078715 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/CustomWritableRepeatEditorPane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/CustomWritableRepeatEditorPane.java @@ -1,6 +1,5 @@ package com.fr.design.widget.ui.designer; -import com.fr.base.GraphHelper; import com.fr.design.designer.creator.XCreator; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.utils.gui.GUICoreUtils; @@ -18,8 +17,6 @@ import java.awt.*; public abstract class CustomWritableRepeatEditorPane extends WritableRepeatEditorPane { private UICheckBox customDataCheckBox; - private static final int CUSTOM_DATA_CHECK_BOX_WIDTH = GraphHelper.getLocTextWidth("Form-Allow_CustomData") + 30; - private static final int CUSTOM_DATA_CHECK_BOX_HEIGHT = 30; public CustomWritableRepeatEditorPane(XCreator xCreator) { super(xCreator); @@ -28,9 +25,7 @@ public abstract class CustomWritableRepeatEditorPane(new String[] {Inter.getLocText("Date") , Inter.getLocText("String")}); JPanel formatHead = createFormatHead(); startDv = new DateValuePane(); @@ -78,9 +77,8 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane e double[] rowSize = {p, p, p, p, p, p, p, p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1},{1, 3},{1, 1},{1, 1},{1,1},{1,1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7); - panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); +// panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); advancePane.add(panel, BorderLayout.NORTH); JPanel otherPane = createOtherPane(); if(otherPane != null){ @@ -75,9 +76,8 @@ public abstract class DirectWriteEditorDefinePane e directWriteCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_Edit"), false); directWriteCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); JPanel otherContentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); - otherContentPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); + otherContentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); JPanel jPanel = GUICoreUtils.createFlowPane(new JComponent[]{directWriteCheckBox}, FlowLayout.LEFT, 0); - jPanel.setPreferredSize(new Dimension(220, 30)); otherContentPane.add(jPanel); return otherContentPane; } diff --git a/designer_form/src/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java index f6eac1df8e..8392ac2b6c 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java @@ -43,8 +43,11 @@ public abstract class FieldEditorDefinePane extends Abstr fontSizePane = new UISpinner(0, 20, 1, 0); errorMsgTextField = new UITextField(); JPanel contentPane = this.setFirstContentPane(); + JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); + jPanel.add(contentPane, BorderLayout.CENTER); + contentPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); if (contentPane != null) { - UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 20, contentPane); + UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 20, jPanel); this.add(uiExpandablePane, BorderLayout.NORTH); } this.addValidatePane(); @@ -110,7 +113,7 @@ public abstract class FieldEditorDefinePane extends Abstr final UILabel uiLabel = new UILabel(Inter.getLocText("FR-Designer_Widget_Error_Tip")); JPanel borderPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); final JPanel errorTipPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{uiLabel, errorMsgTextField}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); - errorTipPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L5, 0, 0)); + errorTipPane.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L6, IntervalConstants.INTERVAL_L5, 0, 0)); borderPane.add(errorTipPane, BorderLayout.CENTER); allowBlankCheckBox.addItemListener(new ItemListener() { @Override @@ -124,7 +127,7 @@ public abstract class FieldEditorDefinePane extends Abstr new Component[]{allowBlankCheckBox}, new Component[]{borderPane}, }; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L6, IntervalConstants.INTERVAL_L6); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L6, 0); panel.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, 0, IntervalConstants.INTERVAL_L1, 0)); validatePane.add(panel, BorderLayout.NORTH); JPanel contentPane = this.setValidatePane(); diff --git a/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java index 30d703aee5..2cf3c72bb6 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java @@ -1,6 +1,7 @@ package com.fr.design.widget.ui.designer; import com.fr.base.BaseUtils; +import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.creator.XCreator; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ibutton.UIButtonGroup; @@ -44,7 +45,10 @@ public class LabelDefinePane extends AbstractDataModify