Browse Source

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

装了插件后, 可以设置显示或者不显示
master
zpc 8 years ago
parent
commit
fd400ec7b6
  1. 3
      designer_base/src/com/fr/design/fun/ShowParameterWindow.java
  2. 5
      designer_base/src/com/fr/design/fun/impl/AbstractShowParameterWindowProvider.java
  3. 30
      designer_form/src/com/fr/design/designer/creator/XWParameterLayout.java

3
designer_base/src/com/fr/design/fun/ShowParameterWindow.java

@ -1,6 +1,7 @@
package com.fr.design.fun;
import com.fr.stable.fun.mark.Immutable;
import java.beans.PropertyDescriptor;
/**
@ -15,6 +16,6 @@ public interface ShowParameterWindow extends Immutable {
/**
* 生成属性表
*/
void add();
PropertyDescriptor[] add(Class<?> temp);
}

5
designer_base/src/com/fr/design/fun/impl/AbstractShowParameterWindowProvider.java

@ -2,6 +2,7 @@ package com.fr.design.fun.impl;
import com.fr.design.fun.ShowParameterWindow;
import com.fr.stable.fun.mark.API;
import java.beans.PropertyDescriptor;
/**
@ -24,7 +25,7 @@ public abstract class AbstractShowParameterWindowProvider implements ShowParamet
* 生成属性表
*/
@Override
public void add() {
public PropertyDescriptor[] add(Class<?> temp) {
return null;
}
}

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

@ -18,9 +18,11 @@ 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.stable.ArrayUtils;
import java.awt.*;
import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
/**
* 表单参数界面container
@ -53,31 +55,12 @@ public class XWParameterLayout extends XWAbsoluteLayout {
* @throws java.beans.IntrospectionException
*/
public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException {
ShowParameterWindow processor = ExtraDesignClassManager.getInstance().getSingle(ShowParameterWindow.MARK_STRING);
if (processor == null) {
return new CRPropertyDescriptor[]{
new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter
.getLocText("FR-Designer_Form-Widget_Name")),
new CRPropertyDescriptor("background", this.data.getClass()).setEditorClass(BackgroundEditor.class)
.setRendererClass(BackgroundRenderer.class).setI18NName(Inter.getLocText("Background"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
new CRPropertyDescriptor("delayDisplayContent", this.data.getClass()).setEditorClass(BooleanEditor.class)
.setI18NName(Inter.getLocText("FR-Designer_DisplayNothingBeforeQuery"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
new CRPropertyDescriptor("position", this.data.getClass()).setEditorClass(WidgetDisplayPosition.class)
.setRendererClass(WidgetDisplayPositionRender.class).setI18NName(Inter.getLocText("FR-Designer_WidgetDisplyPosition"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
};
}
return new CRPropertyDescriptor[]{
CRPropertyDescriptor[] propertyTableEditor = new CRPropertyDescriptor[]{
new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter
.getLocText("FR-Designer_Form-Widget_Name")),
new CRPropertyDescriptor("background", this.data.getClass()).setEditorClass(BackgroundEditor.class)
.setRendererClass(BackgroundRenderer.class).setI18NName(Inter.getLocText("Background"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
new CRPropertyDescriptor("display", this.data.getClass()).setEditorClass(BooleanEditor.class)
.setI18NName(Inter.getLocText("ParameterD-Show_Parameter_Window"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
new CRPropertyDescriptor("delayDisplayContent", this.data.getClass()).setEditorClass(BooleanEditor.class)
.setI18NName(Inter.getLocText("FR-Designer_DisplayNothingBeforeQuery"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
@ -86,6 +69,13 @@ public class XWParameterLayout extends XWAbsoluteLayout {
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
};
ShowParameterWindow processor = ExtraDesignClassManager.getInstance().getSingle(ShowParameterWindow.MARK_STRING);
if (processor == null) {
return propertyTableEditor;
}
PropertyDescriptor[] extraEditor = processor.add(this.data.getClass());
return (CRPropertyDescriptor[]) ArrayUtils.addAll(propertyTableEditor, extraEditor);
}
@Override

Loading…
Cancel
Save