Browse Source

代码被覆盖了

master
zack 9 years ago
parent
commit
c7965cb5a9
  1. 17
      designer_base/src/com/fr/design/data/BasicTableDataTreePane.java
  2. 18
      designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java

17
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) {

18
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);
}
/**
* 编辑面板

Loading…
Cancel
Save