From c7965cb5a9f2ea338298d12f6bf71ef7ae8a134d Mon Sep 17 00:00:00 2001 From: zack Date: Fri, 6 May 2016 14:41:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A2=AB=E8=A6=86=E7=9B=96?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/data/BasicTableDataTreePane.java | 17 ----------------- .../data/datapane/TableDataTreePane.java | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/designer_base/src/com/fr/design/data/BasicTableDataTreePane.java b/designer_base/src/com/fr/design/data/BasicTableDataTreePane.java index 92771cf3a8..32049380d5 100644 --- a/designer_base/src/com/fr/design/data/BasicTableDataTreePane.java +++ b/designer_base/src/com/fr/design/data/BasicTableDataTreePane.java @@ -269,23 +269,6 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp } } - protected void initbuttonGroup(final TableDataSourceOP op) { - Icon[] iconArray = {BaseUtils.readIcon("/com/fr/design/images/data/datasource.png"), BaseUtils.readIcon("/com/fr/design/images/data/dock/serverdatabase.png")}; - final Integer[] modeArray = {TEMPLATE_TABLE_DATA, SERVER_TABLE_DATA}; - String[] textArray = {Inter.getLocText(new String[]{"Template", "DS-TableData"}), Inter.getLocText("DS-Server_TableData")}; - buttonGroup = new UIHeadGroup(iconArray, textArray) { - public void tabChanged(int index) { - if (op != null) { - op.setDataMode(modeArray[buttonGroup.getSelectedIndex()]); - addMenuDef.setEnabled(modeArray[buttonGroup.getSelectedIndex()] == TEMPLATE_TABLE_DATA ? true : false); - refreshDockingView(); - } - - } - }; - buttonGroup.setNeedLeftRightOutLine(false); - } - protected void createAddMenuDef() { TableDataNameObjectCreator[] creators = TableDataCreatorProducer.getInstance().createReportTableDataCreator(); for (final TableDataNameObjectCreator creator : creators) { diff --git a/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java b/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java index e9f1074ff8..1065783624 100644 --- a/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java +++ b/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java @@ -15,6 +15,7 @@ import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.fun.TableDataTreePaneProcessor; +import com.fr.design.gui.ibutton.UIHeadGroup; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itoolbar.UIToolbar; @@ -102,7 +103,7 @@ public class TableDataTreePane extends BasicTableDataTreePane { UIScrollPane scrollPane = new UIScrollPane(dataTree); scrollPane.setBorder(null); - initbuttonGroup(op); + initbuttonGroup(); JPanel jPanel = new JPanel(new BorderLayout(4, 4)); JPanel buttonPane = new JPanel(new GridLayout()); buttonPane.add(buttonGroup, BorderLayout.CENTER); @@ -137,6 +138,21 @@ public class TableDataTreePane extends BasicTableDataTreePane { populate(new TableDataSourceOP(tc)); this.checkButtonEnabled(); } + protected void initbuttonGroup() { + Icon[] iconArray = {BaseUtils.readIcon("/com/fr/design/images/data/datasource.png"), BaseUtils.readIcon("/com/fr/design/images/data/dock/serverdatabase.png")}; + final Integer[] modeArray = {TEMPLATE_TABLE_DATA, SERVER_TABLE_DATA}; + String[] textArray = {Inter.getLocText(new String[]{"Template", "DS-TableData"}), Inter.getLocText("DS-Server_TableData")}; + buttonGroup = new UIHeadGroup(iconArray, textArray) { + public void tabChanged(int index) { + if (op != null) { + op.setDataMode(modeArray[buttonGroup.getSelectedIndex()]); + addMenuDef.setEnabled(modeArray[buttonGroup.getSelectedIndex()] == TEMPLATE_TABLE_DATA ? true : false); + refreshDockingView(); + } + } + }; + buttonGroup.setNeedLeftRightOutLine(false); + } /** * 编辑面板