Browse Source

Merge remote-tracking branch 'origin/dev' into dev

master
richie 9 years ago
parent
commit
a69e7863a5
  1. 1
      designer/src/com/fr/design/report/ExcelExportPane.java
  2. 1
      designer/src/com/fr/design/report/ReportExportAttrPane.java
  3. 1
      designer_base/src/com/fr/design/fun/ExportAttrTabProvider.java
  4. 2
      designer_base/src/com/fr/design/report/AbstractExportPane.java
  5. 97
      designer_form/src/com/fr/design/designer/creator/XElementCase.java

1
designer/src/com/fr/design/report/ExcelExportPane.java

@ -4,7 +4,6 @@ package com.fr.design.report;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import com.fr.design.fun.AbstractExportPane;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.*;

1
designer/src/com/fr/design/report/ReportExportAttrPane.java

@ -4,7 +4,6 @@ import javax.swing.*;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.dialog.BasicPane;
import com.fr.design.fun.AbstractExportPane;
import com.fr.design.fun.ExportAttrTabProvider;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.general.Inter;

1
designer_base/src/com/fr/design/fun/ExportAttrTabProvider.java

@ -1,5 +1,6 @@
package com.fr.design.fun;
import com.fr.design.report.AbstractExportPane;
import com.fr.stable.fun.Level;
import javax.swing.*;

2
designer_base/src/com/fr/design/fun/AbstractExportPane.java → designer_base/src/com/fr/design/report/AbstractExportPane.java

@ -1,4 +1,4 @@
package com.fr.design.fun;
package com.fr.design.report;
import com.fr.design.dialog.BasicPane;

97
designer_form/src/com/fr/design/designer/creator/XElementCase.java

@ -7,9 +7,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.CoverReportPane;
import com.fr.design.mainframe.EditingMouseListener;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.widget.editors.BooleanEditor;
import com.fr.design.mainframe.widget.editors.PaddingMarginEditor;
import com.fr.design.mainframe.widget.editors.WLayoutBorderStyleEditor;
import com.fr.design.mainframe.widget.editors.*;
import com.fr.design.mainframe.widget.renderer.LayoutBorderStyleRenderer;
import com.fr.design.mainframe.widget.renderer.PaddingMarginCellRenderer;
import com.fr.form.FormElementCaseContainerProvider;
@ -25,6 +23,8 @@ import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import java.util.ArrayList;
import java.util.List;
public class XElementCase extends XBorderStyleWidgetCreator implements FormElementCaseContainerProvider{
private UILabel imageLable;
@ -53,37 +53,66 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme
* @return 返回组件属性值
* @throws IntrospectionException 异常
*/
public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException {
CRPropertyDescriptor[] propertyTableEditor = new CRPropertyDescriptor[]{
new CRPropertyDescriptor("widgetName", this.data.getClass())
.setI18NName(Inter.getLocText("Form-Widget_Name")),
new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass(
WLayoutBorderStyleEditor.class).setRendererClass(LayoutBorderStyleRenderer.class).setI18NName(
Inter.getLocText("FR-Designer-Widget_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced")
.setPropertyChangeListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
initStyle();
}
}),
new CRPropertyDescriptor("margin", this.data.getClass()).setEditorClass(PaddingMarginEditor.class)
.setRendererClass(PaddingMarginCellRenderer.class).setI18NName(Inter.getLocText("FR-Layout_Padding"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
new CRPropertyDescriptor("showToolBar", this.data.getClass()).setEditorClass(BooleanEditor.class)
.setI18NName(Inter.getLocText("Form-EC_toolbar"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
};
FormElementCaseEditorProcessor processor = ExtraDesignClassManager.getInstance().getPropertyTableEditor();
if (processor == null){
return propertyTableEditor;
}
PropertyDescriptor[] extraEditor = processor.createPropertyDescriptor(this.data.getClass());
return (CRPropertyDescriptor[]) ArrayUtils.addAll(propertyTableEditor, extraEditor);
}
public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException {
CRPropertyDescriptor[] crp = ((ElementCaseEditor) data).isHeightRestrict() ? revealHeightLimit() : getDefault();
FormElementCaseEditorProcessor processor = ExtraDesignClassManager.getInstance().getPropertyTableEditor();
if (processor == null) {
return crp;
}
PropertyDescriptor[] extraEditor = processor.createPropertyDescriptor(this.data.getClass());
return (CRPropertyDescriptor[]) ArrayUtils.addAll(crp, extraEditor);
}
protected List<CRPropertyDescriptor> createNonListenerProperties() throws IntrospectionException {
CRPropertyDescriptor[] propertyTableEditor = {
new CRPropertyDescriptor("widgetName", this.data.getClass())
.setI18NName(Inter.getLocText("Form-Widget_Name")),
new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass(
WLayoutBorderStyleEditor.class).setRendererClass(LayoutBorderStyleRenderer.class).setI18NName(
Inter.getLocText("FR-Designer-Widget_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced").
setPropertyChangeListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
initStyle();
}
}),
new CRPropertyDescriptor("margin", this.data.getClass()).setEditorClass(PaddingMarginEditor.class)
.setRendererClass(PaddingMarginCellRenderer.class).setI18NName(Inter.getLocText("FR-Layout_Padding"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
new CRPropertyDescriptor("showToolBar", this.data.getClass()).setEditorClass(BooleanEditor.class)
.setI18NName(Inter.getLocText("Form-EC_toolbar"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
new CRPropertyDescriptor("heightRestrict", this.data.getClass()).setEditorClass(InChangeBooleanEditor.class)
.setI18NName(Inter.getLocText("Form-EC_heightrestrict"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced")
};
List<CRPropertyDescriptor> defaultList = new ArrayList<>();
for (CRPropertyDescriptor propertyDescriptor : propertyTableEditor) {
defaultList.add(propertyDescriptor);
}
return defaultList;
}
protected CRPropertyDescriptor[] revealHeightLimit() throws IntrospectionException {
CRPropertyDescriptor heightLimitProperty = new CRPropertyDescriptor("heightPercent", this.data.getClass())
.setEditorClass(DoubleEditor.class)
.setI18NName(Inter.getLocText("Form-EC_heightpercent"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced");
ArrayList<CRPropertyDescriptor> defaultList = (ArrayList<CRPropertyDescriptor>) createNonListenerProperties();
defaultList.add(heightLimitProperty);
return defaultList.toArray(new CRPropertyDescriptor[defaultList.size()]);
}
protected CRPropertyDescriptor[] getDefault() throws IntrospectionException {
ArrayList<CRPropertyDescriptor> defaultList = (ArrayList<CRPropertyDescriptor>) createNonListenerProperties();
return defaultList.toArray(new CRPropertyDescriptor[defaultList.size()]);
}
@Override
protected String getIconName() {

Loading…
Cancel
Save