Browse Source

接口命名规范

master
richie 9 years ago
parent
commit
04598ff0a0
  1. 16
      designer_base/src/com/fr/design/ExtraDesignClassManager.java
  2. 4
      designer_base/src/com/fr/design/fun/WidgetPropertyUIProvider.java
  3. 4
      designer_base/src/com/fr/design/fun/impl/AbstractWidgetAttrProvider.java
  4. 6
      designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

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

4
designer_base/src/com/fr/design/fun/WidgetAttrProvider.java → designer_base/src/com/fr/design/fun/WidgetPropertyUIProvider.java

@ -7,8 +7,8 @@ import com.fr.stable.fun.Level;
/**
* Created by vito on 16/4/27.
*/
public interface WidgetAttrProvider extends Level {
String XML_TAG = "WidgetAttrProvider";
public interface WidgetPropertyUIProvider extends Level {
String XML_TAG = "WidgetPropertyUIProvider";
int CURRENT_LEVEL = 1;

4
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.WidgetAttrProvider;
import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.stable.fun.impl.AbstractProvider;
/**
* Created by vito on 16/4/27.
*/
public abstract class AbstractWidgetAttrProvider extends AbstractProvider implements WidgetAttrProvider {
public abstract class AbstractWidgetAttrProvider extends AbstractProvider implements WidgetPropertyUIProvider {
@Override
public int currentAPILevel() {

6
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.WidgetAttrProvider;
import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.general.Inter;
import com.fr.design.gui.icontainer.UIScrollPane;
@ -88,8 +88,8 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
tabbedPane.addTab(Inter.getLocText("Form-Properties"), psp);
tabbedPane.addTab(Inter.getLocText("Form-Events"), esp);
WidgetAttrProvider[] widgetAttrProviders = ExtraDesignClassManager.getInstance().getWidgetAttrProviders();
for (WidgetAttrProvider widgetAttrProvider : widgetAttrProviders) {
WidgetPropertyUIProvider[] widgetAttrProviders = ExtraDesignClassManager.getInstance().getWidgetAttrProviders();
for (WidgetPropertyUIProvider widgetAttrProvider : widgetAttrProviders) {
AbstractPropertyTable propertyTable = widgetAttrProvider.createWidgetAttrTable();
widgetPropertyTables.add(propertyTable);
designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(propertyTable));

Loading…
Cancel
Save