|
|
@ -10,18 +10,15 @@ import com.fr.design.designer.creator.XLayoutContainer; |
|
|
|
import com.fr.design.designer.creator.XWParameterLayout; |
|
|
|
import com.fr.design.designer.creator.XWParameterLayout; |
|
|
|
import com.fr.design.designer.properties.EventPropertyTable; |
|
|
|
import com.fr.design.designer.properties.EventPropertyTable; |
|
|
|
import com.fr.design.designer.properties.WidgetPropertyTable; |
|
|
|
import com.fr.design.designer.properties.WidgetPropertyTable; |
|
|
|
import com.fr.design.designer.treeview.ComponentTreeModel; |
|
|
|
|
|
|
|
import com.fr.design.fun.WidgetPropertyUIProvider; |
|
|
|
import com.fr.design.fun.WidgetPropertyUIProvider; |
|
|
|
import com.fr.design.gui.frpane.UITabbedPane; |
|
|
|
import com.fr.design.gui.frpane.UITabbedPane; |
|
|
|
import com.fr.design.gui.icontainer.UIScrollPane; |
|
|
|
import com.fr.design.gui.icontainer.UIScrollPane; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.itable.AbstractPropertyTable; |
|
|
|
import com.fr.design.gui.itable.AbstractPropertyTable; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.parameter.ParameterPropertyPane; |
|
|
|
|
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.border.LineBorder; |
|
|
|
import javax.swing.border.LineBorder; |
|
|
|
import java.awt.*; |
|
|
|
import java.awt.*; |
|
|
@ -38,7 +35,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper |
|
|
|
private EventPropertyTable eventTable; |
|
|
|
private EventPropertyTable eventTable; |
|
|
|
private List<AbstractPropertyTable> widgetPropertyTables; |
|
|
|
private List<AbstractPropertyTable> widgetPropertyTables; |
|
|
|
private FormDesigner designer; |
|
|
|
private FormDesigner designer; |
|
|
|
private ComponentTree componentTree; |
|
|
|
|
|
|
|
private JPanel wsp; |
|
|
|
private JPanel wsp; |
|
|
|
private MobileWidgetTable mobileWidgetTable; |
|
|
|
private MobileWidgetTable mobileWidgetTable; |
|
|
|
private MobileBodyWidgetTable mobileBodyWidgetTable; |
|
|
|
private MobileBodyWidgetTable mobileBodyWidgetTable; |
|
|
@ -115,15 +111,12 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void refreshDockingView() { |
|
|
|
public void refreshDockingView() { |
|
|
|
|
|
|
|
|
|
|
|
designer = this.getEditingFormDesigner(); |
|
|
|
designer = this.getEditingFormDesigner(); |
|
|
|
removeAll(); |
|
|
|
removeAll(); |
|
|
|
if (designer == null) { |
|
|
|
if (designer == null) { |
|
|
|
clearDockingView(); |
|
|
|
clearDockingView(); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
componentTree = new ComponentTree(designer); |
|
|
|
|
|
|
|
widgetPropertyTables = new ArrayList<AbstractPropertyTable>(); |
|
|
|
widgetPropertyTables = new ArrayList<AbstractPropertyTable>(); |
|
|
|
propertyTable = new WidgetPropertyTable(designer); |
|
|
|
propertyTable = new WidgetPropertyTable(designer); |
|
|
|
designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(propertyTable)); |
|
|
|
designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(propertyTable)); |
|
|
@ -135,7 +128,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper |
|
|
|
eventTable.setBorder(null); |
|
|
|
eventTable.setBorder(null); |
|
|
|
UIScrollPane esp = new UIScrollPane(eventTable); |
|
|
|
UIScrollPane esp = new UIScrollPane(eventTable); |
|
|
|
esp.setBorder(null); |
|
|
|
esp.setBorder(null); |
|
|
|
|
|
|
|
|
|
|
|
wsp = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
wsp = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
wsp.setBorder(null); |
|
|
|
wsp.setBorder(null); |
|
|
|
mobileWidgetTable = new MobileWidgetTable(designer); |
|
|
|
mobileWidgetTable = new MobileWidgetTable(designer); |
|
|
@ -147,7 +139,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper |
|
|
|
centerPane.add(mobileBodyWidgetTable,BODY); |
|
|
|
centerPane.add(mobileBodyWidgetTable,BODY); |
|
|
|
if(hasSelectParaPane(designer)){ |
|
|
|
if(hasSelectParaPane(designer)){ |
|
|
|
cardLayout.show(centerPane,PARA); |
|
|
|
cardLayout.show(centerPane,PARA); |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
cardLayout.show(centerPane,BODY); |
|
|
|
cardLayout.show(centerPane,BODY); |
|
|
|
} |
|
|
|
} |
|
|
@ -156,19 +147,23 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper |
|
|
|
wsp.add(downPanel,BorderLayout.CENTER); |
|
|
|
wsp.add(downPanel,BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
|
|
UITabbedPane tabbedPane = new UITabbedPane(); |
|
|
|
UITabbedPane tabbedPane = new UITabbedPane(); |
|
|
|
|
|
|
|
initTabPane(psp, esp, tabbedPane); |
|
|
|
tabbedPane.setOpaque(true); |
|
|
|
|
|
|
|
tabbedPane.setBorder(null); |
|
|
|
|
|
|
|
tabbedPane.setTabPlacement(SwingConstants.BOTTOM); |
|
|
|
|
|
|
|
tabbedPane.addTab(Inter.getLocText("Form-Properties"), psp); |
|
|
|
|
|
|
|
tabbedPane.addTab(Inter.getLocText("Form-Events"), esp); |
|
|
|
|
|
|
|
tabbedPane.addTab(Inter.getLocText("FR-Widget_Mobile_Terminal"), wsp); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WidgetPropertyUIProvider[] widgetAttrProviders = getExtraPropertyUIProviders(); |
|
|
|
WidgetPropertyUIProvider[] widgetAttrProviders = getExtraPropertyUIProviders(); |
|
|
|
|
|
|
|
addWidgetAttr(widgetAttrProviders); |
|
|
|
|
|
|
|
add(tabbedPane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
propertyTable.initPropertyGroups(null); |
|
|
|
|
|
|
|
eventTable.refresh(); |
|
|
|
|
|
|
|
for (AbstractPropertyTable propertyTable : widgetPropertyTables) { |
|
|
|
|
|
|
|
propertyTable.initPropertyGroups(designer); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
isrefresh = false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void addWidgetAttr(WidgetPropertyUIProvider[] widgetAttrProviders) { |
|
|
|
if (widgetAttrProviders.length == 0) { |
|
|
|
if (widgetAttrProviders.length == 0) { |
|
|
|
UILabel upLabel = new UILabel(Inter.getLocText("FR-Widget_Mobile_Table"),SwingConstants.CENTER); |
|
|
|
UILabel upLabel = new UILabel(Inter.getLocText("FR-Widget_Mobile_Table"), SwingConstants.CENTER); |
|
|
|
upLabel.setBorder(BorderFactory.createEmptyBorder(6,0,6,0)); |
|
|
|
upLabel.setBorder(BorderFactory.createEmptyBorder(6,0,6,0)); |
|
|
|
wsp.add(upLabel,BorderLayout.NORTH); |
|
|
|
wsp.add(upLabel, BorderLayout.NORTH); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
for (WidgetPropertyUIProvider widgetAttrProvider : widgetAttrProviders) { |
|
|
|
for (WidgetPropertyUIProvider widgetAttrProvider : widgetAttrProviders) { |
|
|
|
AbstractPropertyTable propertyTable = widgetAttrProvider.createWidgetAttrTable(); |
|
|
|
AbstractPropertyTable propertyTable = widgetAttrProvider.createWidgetAttrTable(); |
|
|
@ -180,13 +175,15 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
add(tabbedPane, BorderLayout.CENTER); |
|
|
|
} |
|
|
|
propertyTable.initPropertyGroups(null); |
|
|
|
|
|
|
|
eventTable.refresh(); |
|
|
|
private void initTabPane(UIScrollPane psp, UIScrollPane esp, UITabbedPane tabbedPane) { |
|
|
|
for (AbstractPropertyTable propertyTable : widgetPropertyTables) { |
|
|
|
tabbedPane.setOpaque(true); |
|
|
|
propertyTable.initPropertyGroups(designer); |
|
|
|
tabbedPane.setBorder(null); |
|
|
|
} |
|
|
|
tabbedPane.setTabPlacement(SwingConstants.BOTTOM); |
|
|
|
isrefresh = false; |
|
|
|
tabbedPane.addTab(Inter.getLocText("FR-Designer_Properties"), psp); |
|
|
|
|
|
|
|
tabbedPane.addTab(Inter.getLocText("FR-Designer_Event"), esp); |
|
|
|
|
|
|
|
tabbedPane.addTab(Inter.getLocText("FR-Widget_Mobile_Terminal"), wsp); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|