From 1bd82501ff4752a5d5c2c575038d01f7238663ad Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Wed, 26 Jul 2017 18:57:36 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-3348=20=E6=95=B0=E6=8D=AE=E5=88=97?= =?UTF-8?q?=E9=9B=86=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=E4=B8=80=E4=BA=9B=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/dscolumn/DSColumnBasicEditorPane.java | 8 ++++---- .../design/dscolumn/SelectedDataColumnPane.java | 6 +++--- .../quickeditor/cellquick/CellDSColumnEditor.java | 15 ++++++++++++--- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/designer/src/com/fr/design/dscolumn/DSColumnBasicEditorPane.java b/designer/src/com/fr/design/dscolumn/DSColumnBasicEditorPane.java index cdebc29f4..ef0c5e0b5 100644 --- a/designer/src/com/fr/design/dscolumn/DSColumnBasicEditorPane.java +++ b/designer/src/com/fr/design/dscolumn/DSColumnBasicEditorPane.java @@ -69,15 +69,15 @@ public class DSColumnBasicEditorPane extends CellEditorPane { private JPanel createContentPane() { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = {p, f}; + double[] columnSize = {f}; double[] rowSize = {p, p, p}; Component[][] components = new Component[][]{ //数据集列选择 - new Component[]{this.dataPane, null}, + new Component[]{this.dataPane}, //数据分组设置 - new Component[]{this.groupPane, null}, + new Component[]{this.groupPane}, //条件过滤 - new Component[]{this.conditionPane, null} + new Component[]{this.conditionPane} }; return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); } diff --git a/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java b/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java index 3d97abd41..dd583e1ef 100644 --- a/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java +++ b/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java @@ -81,11 +81,11 @@ public class SelectedDataColumnPane extends BasicPane { columnNameComboBox.setEditable(true); double f = TableLayout.FILL; double p = TableLayout.PREFERRED; - UILabel label1 = new UILabel(Inter.getLocText("TableData") + ":"); - UILabel label3 = new UILabel(Inter.getLocText("DataColumn") + ":"); + UILabel label1 = new UILabel(Inter.getLocText("TableData")); + UILabel label3 = new UILabel(Inter.getLocText("DataColumn")); if (showParameterButton) { //todo 国际化 - UILabel label2 = new UILabel("param" + ":"); + UILabel label2 = new UILabel("param"); Component[][] components = { {label1, tableNameComboBox}, {label2, paramButton}, diff --git a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index 0e439a0ba..321da63fb 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -8,6 +8,8 @@ import com.fr.design.dscolumn.SelectedDataColumnPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIHeadGroup; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.cell.CellEditorPane; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.quickeditor.CellQuickEditor; @@ -152,6 +154,7 @@ public class CellDSColumnEditor extends CellQuickEditor { String[] iconArray = new String[paneList.size()]; card = new CardLayout(); center = new JPanel(card); + center.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); for (int i = 0; i < paneList.size(); i++) { CellEditorPane pane = paneList.get(i); iconArray[i] = pane.getIconPath(); @@ -176,12 +179,18 @@ public class CellDSColumnEditor extends CellQuickEditor { /*基本设置面板*/ this.dataPane = new SelectedDataColumnPane(); this.groupPane = new ResultSetGroupDockingPane(tc); - this.conditionPane = new JPanel(new BorderLayout()); - conditionPane.add(new UILabel("filter:"), BorderLayout.WEST); + double p = TableLayout.PREFERRED, f = TableLayout.FILL; + double[] rowSize = {p}, columnSize = {p, f}; + UILabel uiLabel = new UILabel("filter"); + UIButton uiButton = new UIButton(); if (tc != null) { //第一次初始化时tc为空,引发NullPointerException - conditionPane.add(new UIButton(new DSColumnConditionAction(tc)), BorderLayout.CENTER); + uiButton = new UIButton(new DSColumnConditionAction(tc)); } + Component[][] components = new Component[][]{ + new Component[]{uiLabel, uiButton} + }; + this.conditionPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); dataPane.addListener(dataListener); groupPane.addListener(groupListener); paneList.add(new DSColumnBasicEditorPane(cellElement, dataPane, groupPane, conditionPane));