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<WidgetCustomAttrProvider> widgetCustomAttrProviders;
private Set<WidgetAttrProvider> widgetAttrProviders;
public TableDataTreePaneProcessor getTableDataTreePaneProcessor() {
return tableDataTreePaneProcessor;
@ -738,19 +738,19 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
elementUIProviders.add((ElementUIProvider) level);
}
public WidgetCustomAttrProvider[] getWidgetCustomAttrProviders() {
if (widgetCustomAttrProviders == null) {
return new WidgetCustomAttrProvider[0];
public WidgetAttrProvider[] getWidgetAttrProviders() {
if (widgetAttrProviders == null) {
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 {
if (widgetCustomAttrProviders == null) {
widgetCustomAttrProviders = new HashSet<WidgetCustomAttrProvider>();
public void addWidgetAttrProvider(Level level, PluginSimplify simplify) throws Exception {
if (widgetAttrProviders == null) {
widgetAttrProviders = new HashSet<WidgetAttrProvider>();
}
validAPILevel(level, WidgetCustomAttrProvider.CURRENT_LEVEL, simplify.getPluginName());
widgetCustomAttrProviders.add((WidgetCustomAttrProvider) level);
validAPILevel(level, WidgetAttrProvider.CURRENT_LEVEL, simplify.getPluginName());
widgetAttrProviders.add((WidgetAttrProvider) level);
}
/**
@ -845,8 +845,8 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
setTableDataSourceOPProcessor(impl, simplify);
} else if (tagName.equals(ElementUIProvider.MARK_STRING)) {
addElementUIProvider(impl, simplify);
} else if (tagName.equals(WidgetCustomAttrProvider.XML_TAG)) {
addWidgetCustomAttrProvider(impl, simplify);
} else if (tagName.equals(WidgetAttrProvider.XML_TAG)) {
addWidgetAttrProvider(impl, simplify);
}
} catch (PluginInvalidLevelException e) {
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.
*/
public interface WidgetCustomAttrProvider extends Level {
String XML_TAG = "WidgetCustomAttrProvider";
public interface WidgetAttrProvider extends Level {
String XML_TAG = "WidgetAttrProvider";
int CURRENT_LEVEL = 1;
AbstractPropertyTable createWidgetCustomAttrTable();
AbstractPropertyTable createWidgetAttrTable();
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;
import com.fr.design.fun.WidgetCustomAttrProvider;
import com.fr.design.fun.WidgetAttrProvider;
import com.fr.stable.fun.impl.AbstractProvider;
/**
* Created by vito on 16/4/27.
*/
public abstract class AbstractWidgetCustomAttrProvider extends AbstractProvider implements WidgetCustomAttrProvider {
public abstract class AbstractWidgetAttrProvider extends AbstractProvider implements WidgetAttrProvider {
@Override
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.design.ExtraDesignClassManager;
import com.fr.design.fun.WidgetCustomAttrProvider;
import com.fr.design.fun.WidgetAttrProvider;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.general.Inter;
import com.fr.design.gui.icontainer.UIScrollPane;
@ -26,7 +26,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
private WidgetPropertyTable propertyTable;
private EventPropertyTable eventTable;
private List<AbstractPropertyTable> customPropertyTables;
private List<AbstractPropertyTable> widgetPropertyTables;
private FormDesigner designer;
public static WidgetPropertyPane getInstance() {
@ -69,7 +69,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
clearDockingView();
return;
}
customPropertyTables = new ArrayList<AbstractPropertyTable>();
widgetPropertyTables = new ArrayList<AbstractPropertyTable>();
propertyTable = new WidgetPropertyTable(designer);
designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(propertyTable));
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-Events"), esp);
WidgetCustomAttrProvider[] customAttrProviders = ExtraDesignClassManager.getInstance().getWidgetCustomAttrProviders();
for (WidgetCustomAttrProvider customAttrProvider : customAttrProviders) {
AbstractPropertyTable propertyTable = customAttrProvider.createWidgetCustomAttrTable();
customPropertyTables.add(propertyTable);
WidgetAttrProvider[] widgetAttrProviders = ExtraDesignClassManager.getInstance().getWidgetAttrProviders();
for (WidgetAttrProvider widgetAttrProvider : widgetAttrProviders) {
AbstractPropertyTable propertyTable = widgetAttrProvider.createWidgetAttrTable();
widgetPropertyTables.add(propertyTable);
designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(propertyTable));
UIScrollPane uiScrollPane = new UIScrollPane(propertyTable);
uiScrollPane.setBorder(null);
tabbedPane.addTab(customAttrProvider.setTableTitle(), uiScrollPane);
tabbedPane.addTab(widgetAttrProvider.setTableTitle(), uiScrollPane);
}
add(tabbedPane, BorderLayout.CENTER);
propertyTable.initPropertyGroups(null);
eventTable.refresh();
if (customPropertyTables.size() > 0) {
for (AbstractPropertyTable propertyTable : customPropertyTables) {
if (widgetPropertyTables.size() > 0) {
for (AbstractPropertyTable propertyTable : widgetPropertyTables) {
propertyTable.initPropertyGroups(designer);
}
}
@ -116,8 +116,8 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
public void clearDockingView() {
propertyTable = null;
eventTable = null;
if (customPropertyTables != null) {
customPropertyTables.clear();
if (widgetPropertyTables != null) {
widgetPropertyTables.clear();
}
JScrollPane psp = new JScrollPane();
psp.setBorder(null);

Loading…
Cancel
Save