|
|
@ -8,7 +8,7 @@ import javax.swing.*; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
import com.fr.design.ExtraDesignClassManager; |
|
|
|
import com.fr.design.ExtraDesignClassManager; |
|
|
|
import com.fr.design.fun.WidgetCustomAttrProvider; |
|
|
|
import com.fr.design.fun.WidgetAttrProvider; |
|
|
|
import com.fr.design.gui.frpane.UITabbedPane; |
|
|
|
import com.fr.design.gui.frpane.UITabbedPane; |
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.design.gui.icontainer.UIScrollPane; |
|
|
|
import com.fr.design.gui.icontainer.UIScrollPane; |
|
|
@ -26,7 +26,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper |
|
|
|
|
|
|
|
|
|
|
|
private WidgetPropertyTable propertyTable; |
|
|
|
private WidgetPropertyTable propertyTable; |
|
|
|
private EventPropertyTable eventTable; |
|
|
|
private EventPropertyTable eventTable; |
|
|
|
private List<AbstractPropertyTable> customPropertyTables; |
|
|
|
private List<AbstractPropertyTable> widgetPropertyTables; |
|
|
|
private FormDesigner designer; |
|
|
|
private FormDesigner designer; |
|
|
|
|
|
|
|
|
|
|
|
public static WidgetPropertyPane getInstance() { |
|
|
|
public static WidgetPropertyPane getInstance() { |
|
|
@ -69,7 +69,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper |
|
|
|
clearDockingView(); |
|
|
|
clearDockingView(); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
customPropertyTables = 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)); |
|
|
|
propertyTable.setBorder(null); |
|
|
|
propertyTable.setBorder(null); |
|
|
@ -88,21 +88,21 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper |
|
|
|
tabbedPane.addTab(Inter.getLocText("Form-Properties"), psp); |
|
|
|
tabbedPane.addTab(Inter.getLocText("Form-Properties"), psp); |
|
|
|
tabbedPane.addTab(Inter.getLocText("Form-Events"), esp); |
|
|
|
tabbedPane.addTab(Inter.getLocText("Form-Events"), esp); |
|
|
|
|
|
|
|
|
|
|
|
WidgetCustomAttrProvider[] customAttrProviders = ExtraDesignClassManager.getInstance().getWidgetCustomAttrProviders(); |
|
|
|
WidgetAttrProvider[] widgetAttrProviders = ExtraDesignClassManager.getInstance().getWidgetAttrProviders(); |
|
|
|
for (WidgetCustomAttrProvider customAttrProvider : customAttrProviders) { |
|
|
|
for (WidgetAttrProvider widgetAttrProvider : widgetAttrProviders) { |
|
|
|
AbstractPropertyTable propertyTable = customAttrProvider.createWidgetCustomAttrTable(); |
|
|
|
AbstractPropertyTable propertyTable = widgetAttrProvider.createWidgetAttrTable(); |
|
|
|
customPropertyTables.add(propertyTable); |
|
|
|
widgetPropertyTables.add(propertyTable); |
|
|
|
designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(propertyTable)); |
|
|
|
designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(propertyTable)); |
|
|
|
UIScrollPane uiScrollPane = new UIScrollPane(propertyTable); |
|
|
|
UIScrollPane uiScrollPane = new UIScrollPane(propertyTable); |
|
|
|
uiScrollPane.setBorder(null); |
|
|
|
uiScrollPane.setBorder(null); |
|
|
|
tabbedPane.addTab(customAttrProvider.setTableTitle(), uiScrollPane); |
|
|
|
tabbedPane.addTab(widgetAttrProvider.setTableTitle(), uiScrollPane); |
|
|
|
} |
|
|
|
} |
|
|
|
add(tabbedPane, BorderLayout.CENTER); |
|
|
|
add(tabbedPane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
|
|
propertyTable.initPropertyGroups(null); |
|
|
|
propertyTable.initPropertyGroups(null); |
|
|
|
eventTable.refresh(); |
|
|
|
eventTable.refresh(); |
|
|
|
if (customPropertyTables.size() > 0) { |
|
|
|
if (widgetPropertyTables.size() > 0) { |
|
|
|
for (AbstractPropertyTable propertyTable : customPropertyTables) { |
|
|
|
for (AbstractPropertyTable propertyTable : widgetPropertyTables) { |
|
|
|
propertyTable.initPropertyGroups(designer); |
|
|
|
propertyTable.initPropertyGroups(designer); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -116,8 +116,8 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper |
|
|
|
public void clearDockingView() { |
|
|
|
public void clearDockingView() { |
|
|
|
propertyTable = null; |
|
|
|
propertyTable = null; |
|
|
|
eventTable = null; |
|
|
|
eventTable = null; |
|
|
|
if (customPropertyTables != null) { |
|
|
|
if (widgetPropertyTables != null) { |
|
|
|
customPropertyTables.clear(); |
|
|
|
widgetPropertyTables.clear(); |
|
|
|
} |
|
|
|
} |
|
|
|
JScrollPane psp = new JScrollPane(); |
|
|
|
JScrollPane psp = new JScrollPane(); |
|
|
|
psp.setBorder(null); |
|
|
|
psp.setBorder(null); |
|
|
|