Browse Source

他装了插件后, 可以设置显示或者不显示

他装了插件后, 可以设置显示或者不显示
master
zpc 8 years ago
parent
commit
373b724b76
  1. 4
      designer_base/src/com/fr/design/fun/ParameterWindowEditorProcessor.java
  2. 8
      designer_base/src/com/fr/design/fun/impl/AbstractParameterWindowEditorProcessor.java
  3. 6
      designer_form/src/com/fr/design/designer/creator/XWParameterLayout.java

4
designer_base/src/com/fr/design/fun/ShowParameterWindow.java → designer_base/src/com/fr/design/fun/ParameterWindowEditorProcessor.java

@ -7,7 +7,7 @@ import java.beans.PropertyDescriptor;
/** /**
* Created by zpc on 16/7/21. * Created by zpc on 16/7/21.
*/ */
public interface ShowParameterWindow extends Immutable { public interface ParameterWindowEditorProcessor extends Immutable {
String MARK_STRING = "ShowParameter"; String MARK_STRING = "ShowParameter";
@ -16,6 +16,6 @@ public interface ShowParameterWindow extends Immutable {
/** /**
* 生成属性表 * 生成属性表
*/ */
PropertyDescriptor[] add(Class<?> temp); PropertyDescriptor[] createPropertyDescriptor(Class<?> temp);
} }

8
designer_base/src/com/fr/design/fun/impl/AbstractShowParameterWindowProvider.java → designer_base/src/com/fr/design/fun/impl/AbstractParameterWindowEditorProcessor.java

@ -1,6 +1,6 @@
package com.fr.design.fun.impl; package com.fr.design.fun.impl;
import com.fr.design.fun.ShowParameterWindow; import com.fr.design.fun.ParameterWindowEditorProcessor;
import com.fr.stable.fun.mark.API; import com.fr.stable.fun.mark.API;
import java.beans.PropertyDescriptor; import java.beans.PropertyDescriptor;
@ -8,8 +8,8 @@ import java.beans.PropertyDescriptor;
/** /**
* Created by zpc on 2016/7/21. * Created by zpc on 2016/7/21.
*/ */
@API(level = ShowParameterWindow.CURRENT_LEVEL) @API(level = ParameterWindowEditorProcessor.CURRENT_LEVEL)
public abstract class AbstractShowParameterWindowProvider implements ShowParameterWindow { public abstract class AbstractParameterWindowEditorProcessor implements ParameterWindowEditorProcessor {
public int currentAPILevel() { public int currentAPILevel() {
return CURRENT_LEVEL; return CURRENT_LEVEL;
@ -25,7 +25,7 @@ public abstract class AbstractShowParameterWindowProvider implements ShowParamet
* 生成属性表 * 生成属性表
*/ */
@Override @Override
public PropertyDescriptor[] add(Class<?> temp) { public PropertyDescriptor[] createPropertyDescriptor(Class<?> temp) {
return null; return null;
} }
} }

6
designer_form/src/com/fr/design/designer/creator/XWParameterLayout.java

@ -17,7 +17,7 @@ import com.fr.form.ui.container.WFitLayout;
import com.fr.form.ui.container.WParameterLayout; import com.fr.form.ui.container.WParameterLayout;
import com.fr.general.Background; import com.fr.general.Background;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.design.fun.ShowParameterWindow; import com.fr.design.fun.ParameterWindowEditorProcessor;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import java.awt.*; import java.awt.*;
@ -69,11 +69,11 @@ public class XWParameterLayout extends XWAbsoluteLayout {
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
}; };
ShowParameterWindow processor = ExtraDesignClassManager.getInstance().getSingle(ShowParameterWindow.MARK_STRING); ParameterWindowEditorProcessor processor = ExtraDesignClassManager.getInstance().getSingle(ParameterWindowEditorProcessor.MARK_STRING);
if (processor == null) { if (processor == null) {
return propertyTableEditor; return propertyTableEditor;
} }
PropertyDescriptor[] extraEditor = processor.add(this.data.getClass()); PropertyDescriptor[] extraEditor = processor.createPropertyDescriptor(this.data.getClass());
return (CRPropertyDescriptor[]) ArrayUtils.addAll(propertyTableEditor, extraEditor); return (CRPropertyDescriptor[]) ArrayUtils.addAll(propertyTableEditor, extraEditor);
} }

Loading…
Cancel
Save