Browse Source

命名更改

master
vito 9 years ago
parent
commit
602e88a803
  1. 24
      designer_base/src/com/fr/design/ExtraDesignClassManager.java
  2. 6
      designer_base/src/com/fr/design/fun/WidgetAttrProvider.java
  3. 4
      designer_base/src/com/fr/design/fun/impl/AbstractWidgetAttrProvider.java
  4. 24
      designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

24
designer_base/src/com/fr/design/ExtraDesignClassManager.java

@ -130,7 +130,7 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
private Set<ElementUIProvider> elementUIProviders; private Set<ElementUIProvider> elementUIProviders;
private Set<WidgetCustomAttrProvider> widgetCustomAttrProviders; private Set<WidgetAttrProvider> widgetAttrProviders;
public TableDataTreePaneProcessor getTableDataTreePaneProcessor() { public TableDataTreePaneProcessor getTableDataTreePaneProcessor() {
return tableDataTreePaneProcessor; return tableDataTreePaneProcessor;
@ -738,19 +738,19 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
elementUIProviders.add((ElementUIProvider) level); elementUIProviders.add((ElementUIProvider) level);
} }
public WidgetCustomAttrProvider[] getWidgetCustomAttrProviders() { public WidgetAttrProvider[] getWidgetAttrProviders() {
if (widgetCustomAttrProviders == null) { if (widgetAttrProviders == null) {
return new WidgetCustomAttrProvider[0]; return new WidgetAttrProvider[0];
} }
return widgetCustomAttrProviders.toArray(new WidgetCustomAttrProvider[widgetCustomAttrProviders.size()]); return widgetAttrProviders.toArray(new WidgetAttrProvider[widgetAttrProviders.size()]);
} }
public void addWidgetCustomAttrProvider(Level level, PluginSimplify simplify) throws Exception { public void addWidgetAttrProvider(Level level, PluginSimplify simplify) throws Exception {
if (widgetCustomAttrProviders == null) { if (widgetAttrProviders == null) {
widgetCustomAttrProviders = new HashSet<WidgetCustomAttrProvider>(); widgetAttrProviders = new HashSet<WidgetAttrProvider>();
} }
validAPILevel(level, WidgetCustomAttrProvider.CURRENT_LEVEL, simplify.getPluginName()); validAPILevel(level, WidgetAttrProvider.CURRENT_LEVEL, simplify.getPluginName());
widgetCustomAttrProviders.add((WidgetCustomAttrProvider) level); widgetAttrProviders.add((WidgetAttrProvider) level);
} }
/** /**
@ -845,8 +845,8 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
setTableDataSourceOPProcessor(impl, simplify); setTableDataSourceOPProcessor(impl, simplify);
} else if (tagName.equals(ElementUIProvider.MARK_STRING)) { } else if (tagName.equals(ElementUIProvider.MARK_STRING)) {
addElementUIProvider(impl, simplify); addElementUIProvider(impl, simplify);
} else if (tagName.equals(WidgetCustomAttrProvider.XML_TAG)) { } else if (tagName.equals(WidgetAttrProvider.XML_TAG)) {
addWidgetCustomAttrProvider(impl, simplify); addWidgetAttrProvider(impl, simplify);
} }
} catch (PluginInvalidLevelException e) { } catch (PluginInvalidLevelException e) {
PluginMessage.remindUpdate(e.getMessage()); PluginMessage.remindUpdate(e.getMessage());

6
designer_base/src/com/fr/design/fun/WidgetCustomAttrProvider.java → designer_base/src/com/fr/design/fun/WidgetAttrProvider.java

@ -7,12 +7,12 @@ import com.fr.stable.fun.Level;
/** /**
* Created by vito on 16/4/27. * Created by vito on 16/4/27.
*/ */
public interface WidgetCustomAttrProvider extends Level { public interface WidgetAttrProvider extends Level {
String XML_TAG = "WidgetCustomAttrProvider"; String XML_TAG = "WidgetAttrProvider";
int CURRENT_LEVEL = 1; int CURRENT_LEVEL = 1;
AbstractPropertyTable createWidgetCustomAttrTable(); AbstractPropertyTable createWidgetAttrTable();
String setTableTitle(); String setTableTitle();
} }

4
designer_base/src/com/fr/design/fun/impl/AbstractWidgetCustomAttrProvider.java → designer_base/src/com/fr/design/fun/impl/AbstractWidgetAttrProvider.java

@ -1,13 +1,13 @@
package com.fr.design.fun.impl; package com.fr.design.fun.impl;
import com.fr.design.fun.WidgetCustomAttrProvider; import com.fr.design.fun.WidgetAttrProvider;
import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.impl.AbstractProvider;
/** /**
* Created by vito on 16/4/27. * Created by vito on 16/4/27.
*/ */
public abstract class AbstractWidgetCustomAttrProvider extends AbstractProvider implements WidgetCustomAttrProvider { public abstract class AbstractWidgetAttrProvider extends AbstractProvider implements WidgetAttrProvider {
@Override @Override
public int currentAPILevel() { public int currentAPILevel() {

24
designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

@ -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);

Loading…
Cancel
Save