Browse Source

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

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

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

@ -0,0 +1,20 @@
package com.fr.design.fun;
import com.fr.stable.fun.mark.Immutable;
/**
* Created by zpc on 16/7/21.
*/
public interface ShowParameterWindow extends Immutable {
String MARK_STRING = "ShowParameter";
int CURRENT_LEVEL = 1;
/**
* 生成属性表
*/
void add();
}

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

@ -0,0 +1,30 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.ShowParameterWindow;
import com.fr.stable.fun.mark.API;
/**
* Created by zpc on 2016/7/21.
*/
@API(level = ShowParameterWindow.CURRENT_LEVEL)
public abstract class AbstractShowParameterWindowProvider implements ShowParameterWindow {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
public int layerIndex() {
return DEFAULT_LAYER_INDEX;
}
/**
* 生成属性表
*/
@Override
public void add() {
}
}

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

@ -3,6 +3,7 @@
*/
package com.fr.design.designer.creator;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.designer.beans.LayoutAdapter;
import com.fr.design.designer.beans.adapters.layout.FRParameterLayoutAdapter;
import com.fr.design.form.util.XCreatorConstants;
@ -16,6 +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 java.awt.*;
import java.beans.IntrospectionException;
@ -51,19 +53,39 @@ public class XWParameterLayout extends XWAbsoluteLayout {
* @throws java.beans.IntrospectionException
*/
public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException {
return new CRPropertyDescriptor[]{
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[]{
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"),
new CRPropertyDescriptor("position", this.data.getClass()).setEditorClass(WidgetDisplayPosition.class)
.setRendererClass(WidgetDisplayPositionRender.class).setI18NName(Inter.getLocText("FR-Designer_WidgetDisplyPosition"))
.setRendererClass(WidgetDisplayPositionRender.class).setI18NName(Inter.getLocText("FR-Designer_WidgetDisplyPosition"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
};
}
@Override

Loading…
Cancel
Save