Browse Source

代码调整

master
PanLi320 8 years ago
parent
commit
83da497124
  1. 21
      designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java
  2. 15
      designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java

21
designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java

@ -81,6 +81,27 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme
};
}
/**
* 控件名属性
* @return
* @throws IntrospectionException
*/
public CRPropertyDescriptor createWidgetNameDescriptor() throws IntrospectionException {
return new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter
.getLocText("FR-Designer_Form-Widget_Name"));
}
/**
* 边距属性
* @return
* @throws IntrospectionException
*/
public CRPropertyDescriptor createMarginDescriptor() throws IntrospectionException {
return new CRPropertyDescriptor("margin", this.data.getClass()).setEditorClass(PaddingMarginEditor.class)
.setI18NName(Inter.getLocText("FR-Designer_Layout-Padding"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced");
}
/**
* 返回对应的wlayout
* @return wlayout控件

15
designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java

@ -197,20 +197,11 @@ public class XWTabFitLayout extends XWFitLayout {
}
protected CRPropertyDescriptor[] defaultDescriptor() throws IntrospectionException {
if (super.supportedDescriptor().length < 3) {
return null;
}
CRPropertyDescriptor[] crPropertyDescriptors = {
super.supportedDescriptor()[0],
super.supportedDescriptor()[2]
super.createWidgetNameDescriptor(),
super.createMarginDescriptor()
};
CRPropertyDescriptor widgetName = super.supportedDescriptor()[0];
CRPropertyDescriptor margin = super.supportedDescriptor()[2];
if (widgetName.getName().equals(WIDGET_NAME) && margin.getName().equals(MARGIN)) {
return crPropertyDescriptors;
} else {
return null;
}
return crPropertyDescriptors;
}
private void checkButonType() {

Loading…
Cancel
Save