Browse Source

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

他装了插件后, 可以设置显示或者不显示
master
zpc 9 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.
*/
public interface ShowParameterWindow extends Immutable {
public interface ParameterWindowEditorProcessor extends Immutable {
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;
import com.fr.design.fun.ShowParameterWindow;
import com.fr.design.fun.ParameterWindowEditorProcessor;
import com.fr.stable.fun.mark.API;
import java.beans.PropertyDescriptor;
@ -8,8 +8,8 @@ import java.beans.PropertyDescriptor;
/**
* Created by zpc on 2016/7/21.
*/
@API(level = ShowParameterWindow.CURRENT_LEVEL)
public abstract class AbstractShowParameterWindowProvider implements ShowParameterWindow {
@API(level = ParameterWindowEditorProcessor.CURRENT_LEVEL)
public abstract class AbstractParameterWindowEditorProcessor implements ParameterWindowEditorProcessor {
public int currentAPILevel() {
return CURRENT_LEVEL;
@ -25,7 +25,7 @@ public abstract class AbstractShowParameterWindowProvider implements ShowParamet
* 生成属性表
*/
@Override
public PropertyDescriptor[] add(Class<?> temp) {
public PropertyDescriptor[] createPropertyDescriptor(Class<?> temp) {
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.general.Background;
import com.fr.general.Inter;
import com.fr.design.fun.ShowParameterWindow;
import com.fr.design.fun.ParameterWindowEditorProcessor;
import com.fr.stable.ArrayUtils;
import java.awt.*;
@ -69,11 +69,11 @@ public class XWParameterLayout extends XWAbsoluteLayout {
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
};
ShowParameterWindow processor = ExtraDesignClassManager.getInstance().getSingle(ShowParameterWindow.MARK_STRING);
ParameterWindowEditorProcessor processor = ExtraDesignClassManager.getInstance().getSingle(ParameterWindowEditorProcessor.MARK_STRING);
if (processor == null) {
return propertyTableEditor;
}
PropertyDescriptor[] extraEditor = processor.add(this.data.getClass());
PropertyDescriptor[] extraEditor = processor.createPropertyDescriptor(this.data.getClass());
return (CRPropertyDescriptor[]) ArrayUtils.addAll(propertyTableEditor, extraEditor);
}

Loading…
Cancel
Save