|
|
|
@ -3,14 +3,11 @@ package com.fr.design.widget;
|
|
|
|
|
import com.fr.design.data.DataCreatorUI; |
|
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
|
import com.fr.design.foldablepane.UIExpandablePane; |
|
|
|
|
import com.fr.design.gui.frpane.TreeSettingPane; |
|
|
|
|
import com.fr.design.gui.ibutton.UIHeadGroup; |
|
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
import com.fr.design.mainframe.ElementCasePane; |
|
|
|
|
import com.fr.design.present.dict.DictionaryPane; |
|
|
|
|
import com.fr.design.widget.ui.BasicWidgetPropertySettingPane; |
|
|
|
|
import com.fr.form.event.Listener; |
|
|
|
|
import com.fr.form.ui.NoneWidget; |
|
|
|
|
import com.fr.form.ui.Widget; |
|
|
|
|
import com.fr.general.Inter; |
|
|
|
|
|
|
|
|
@ -36,14 +33,6 @@ public class CellWidgetCardPane extends BasicPane {
|
|
|
|
|
private JPanel attriCardPane; |
|
|
|
|
private CardLayout attriCardLayout; |
|
|
|
|
|
|
|
|
|
//数字字典属性容器
|
|
|
|
|
private JPanel dictTabPane; |
|
|
|
|
private JPanel dictCardPane; |
|
|
|
|
private CardLayout dictCardLayout; |
|
|
|
|
|
|
|
|
|
//构建树属性容器
|
|
|
|
|
private JPanel treeTabPane; |
|
|
|
|
|
|
|
|
|
//事件属性容器
|
|
|
|
|
private JPanel eventTabPane; |
|
|
|
|
private WidgetEventPane eventPane; |
|
|
|
@ -52,11 +41,6 @@ public class CellWidgetCardPane extends BasicPane {
|
|
|
|
|
|
|
|
|
|
public CellWidgetCardPane(ElementCasePane 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); |
|
|
|
|
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(); |
|
|
|
|
|
|
|
|
|
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) { |
|
|
|
|
initComponents(pane); |
|
|
|
|
// super.populate(cellWidget);
|
|
|
|
|
currentEditorDefinePane = null; |
|
|
|
|
|
|
|
|
|
if (cellWidget instanceof NoneWidget) { |
|
|
|
|
// this.tabbedPane.setEnabled(false);
|
|
|
|
|
} else { |
|
|
|
|
// this.tabbedPane.setEnabled(true);
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
WidgetDefinePaneFactory.RN rn = WidgetDefinePaneFactory.createWidgetDefinePane(cellWidget, new Operator() { |
|
|
|
|
@Override |
|
|
|
|
public void did(DataCreatorUI ui, String cardName) { |
|
|
|
|
if (ui == null) { |
|
|
|
|
removeDictAttriPane(); |
|
|
|
|
removeTreeAttriPane(); |
|
|
|
|
} |
|
|
|
|
if (ui instanceof DictionaryPane) { |
|
|
|
|
removeDictAttriPane(); |
|
|
|
|
removeTreeAttriPane(); |
|
|
|
|
showDictPane(ui, cardName); |
|
|
|
|
} else if (ui instanceof TreeSettingPane) { |
|
|
|
|
removeDictAttriPane(); |
|
|
|
|
removeTreeAttriPane(); |
|
|
|
|
showTreePane(ui); |
|
|
|
|
} |
|
|
|
|
//todo
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
DataModify<? extends Widget> definePane = rn.getDefinePane(); |
|
|
|
@ -160,19 +115,6 @@ public class CellWidgetCardPane extends BasicPane {
|
|
|
|
|
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() { |
|
|
|
|
if (currentEditorDefinePane == null) { |
|
|
|
|
return null; |
|
|
|
@ -182,7 +124,6 @@ public class CellWidgetCardPane extends BasicPane {
|
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
widgetPropertyPane.update(widget); |
|
|
|
|
// super.update(widget);
|
|
|
|
|
|
|
|
|
|
Listener[] listener = eventPane == null ? new Listener[0] : eventPane.updateListeners(); |
|
|
|
|
widget.clearListeners(); |
|
|
|
@ -203,28 +144,4 @@ public class CellWidgetCardPane extends BasicPane {
|
|
|
|
|
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
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|