Browse Source

Merge pull request #1147 in BA/design from ~KERRY/design:release/9.0 to release/9.0

* commit '153d840d918e75f8928d180054e380b5c055b37a':
  REPORT-4141 9.0的一些控件属性无法使用,包括图表块
master
superman 7 years ago
parent
commit
84905f4dc0
  1. 35
      designer_form/src/com/fr/design/widget/FormWidgetDefinePaneFactoryBase.java
  2. 2
      designer_form/src/com/fr/design/widget/ui/designer/AbstractDataModify.java
  3. 30
      designer_form/src/com/fr/design/widget/ui/designer/DefaultWidgetDefinePane.java
  4. 4
      designer_form/src/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java
  5. 5
      designer_form/src/com/fr/design/widget/ui/designer/IframeEditorDefinePane.java
  6. 7
      designer_form/src/com/fr/design/widget/ui/designer/NoneWidgetDefinePane.java
  7. 3
      designer_form/src/com/fr/design/widget/ui/designer/NumberEditorDefinePane.java
  8. 6
      designer_form/src/com/fr/design/widget/ui/designer/RadioDefinePane.java
  9. 20
      designer_form/src/com/fr/design/widget/ui/designer/UserEditorDefinePane.java
  10. 9
      designer_form/src/com/fr/design/widget/ui/designer/WriteUnableRepeatEditorPane.java
  11. 69
      designer_form/src/com/fr/design/widget/ui/designer/layout/BorderStyleWidgetDefinePane.java
  12. 7
      designer_form/src/com/fr/design/widget/ui/designer/layout/ChartEditorDefinePane.java

35
designer_form/src/com/fr/design/widget/FormWidgetDefinePaneFactoryBase.java

@ -1,7 +1,6 @@
package com.fr.design.widget;
import com.fr.base.FRContext;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.gui.core.WidgetConstants;
import com.fr.design.parameter.RootDesignDefinePane;
@ -53,29 +52,35 @@ public class FormWidgetDefinePaneFactoryBase {
defineMap.put(Button.class, new Appearance(FreeButtonDefinePane.class, WidgetConstants.BUTTON + ""));
defineMap.put(FreeButton.class, new Appearance(FreeButtonDefinePane.class, WidgetConstants.BUTTON + ""));
defineMap.put(FormSubmitButton.class, new Appearance(FreeButtonDefinePane.class, WidgetConstants.BUTTON + ""));
defineMap.put(WFitLayout.class, new Appearance(FRFitLayoutDefinePane.class, Inter.getLocText("FR-Designer-Layout_Adaptive_Layout")));
defineMap.put(WCardMainBorderLayout.class, new Appearance(WCardMainLayoutDefinePane.class, Inter.getLocText("WLayout-Card-ToolTips")));
// if (StableFactory.getMarkedClass(BridgeMark.SUBMIT_BUTTON, Widget.class) != null) {
// defineMap.put(StableFactory.getMarkedClass(BridgeMark.SUBMIT_BUTTON, Widget.class), new Appearance(ButtonDefinePane.class, WidgetConstants.BUTTON + ""));
// }
defineMap.put(WAbsoluteLayout.class, new Appearance(FRAbsoluteLayoutDefinePane.class, Inter.getLocText("FR-Designer_AbsoluteLayout")));
defineMap.put(ElementCaseEditor.class, new Appearance(ElementEditorDefinePane.class, Inter.getLocText("FR-Designer_AbsoluteLayout")));
defineMap.put(WAbsoluteBodyLayout.class, new Appearance(FRAbsoluteBodyLayoutDefinePane.class, Inter.getLocText("FR-Designer-Layout_Adaptive_Layout")));
defineMap.put(WParameterLayout.class, new Appearance(RootDesignDefinePane.class, Inter.getLocText("FR-Designer_Para-Body")));
defineMap.put(WCardMainBorderLayout.class, new Appearance(WCardMainLayoutDefinePane.class, "tab"));
defineMap.put(WCardLayout.class, new Appearance(WCardLayoutDefinePane.class, "tablayout"));
defineMap.put(WFitLayout.class, new Appearance(FRFitLayoutDefinePane.class, "wFitLayout"));
defineMap.put(WCardMainBorderLayout.class, new Appearance(WCardMainLayoutDefinePane.class, "wCardMainBorderLayout"));
if (StableFactory.getMarkedClass(BridgeMark.Chart_Editor, AbstractBorderStyleWidget.class) != null) {
defineMap.put(StableFactory.getMarkedClass(BridgeMark.Chart_Editor, AbstractBorderStyleWidget.class), new Appearance(BorderStyleWidgetDefinePane.class, "chartEditor"));
}
defineMap.put(WAbsoluteLayout.class, new Appearance(FRAbsoluteLayoutDefinePane.class, "wAbsoluteLayout"));
defineMap.put(ElementCaseEditor.class, new Appearance(ElementEditorDefinePane.class, "elementCaseEditor"));
defineMap.put(WAbsoluteBodyLayout.class, new Appearance(FRAbsoluteBodyLayoutDefinePane.class, "wAbsoluteBodyLayout"));
defineMap.put(WParameterLayout.class, new Appearance(RootDesignDefinePane.class, "wParameterLayout"));
defineMap.put(WCardMainBorderLayout.class, new Appearance(WCardMainLayoutDefinePane.class, "wCardMainBorderLayout"));
defineMap.put(WCardLayout.class, new Appearance(WCardLayoutDefinePane.class, "wCardLayout"));
defineMap.put(Label.class, new Appearance(LabelDefinePane.class, "label"));
defineMap.put(WTabFitLayout.class, new Appearance(WTabFitLayoutDefinePane.class, "label"));
defineMap.putAll(ExtraDesignClassManager.getInstance().getCellWidgetOptionsMap());
defineMap.put(WTabFitLayout.class, new Appearance(WTabFitLayoutDefinePane.class, "wTabFitLayout"));
//todo 添加扩展控件接口
// defineMap.putAll(getOtherWidgetOptionMap());
}
private FormWidgetDefinePaneFactoryBase() {
}
public static RN createWidgetDefinePane(XCreator creator, Widget widget, Operator operator) {
Appearance dn = defineMap.get(widget.getClass());
if(dn == null){
dn = new Appearance(DefaultWidgetDefinePane.class, "default");
}
DataModify<Widget> definePane = null;
try {
Constructor con = dn.getDefineClass().getConstructor(XCreator.class);

2
designer_form/src/com/fr/design/widget/ui/designer/AbstractDataModify.java

@ -13,9 +13,7 @@ import javax.swing.*;
public abstract class AbstractDataModify<T> extends BasicBeanPane<T> implements DataModify<T> {
protected XCreator creator;
public AbstractDataModify(){
}
public AbstractDataModify(XCreator xCreator){
this.creator = xCreator;
}

30
designer_form/src/com/fr/design/widget/ui/designer/DefaultWidgetDefinePane.java

@ -0,0 +1,30 @@
package com.fr.design.widget.ui.designer;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.form.ui.Widget;
/**
* Created by kerry on 2017/8/30.
*/
public class DefaultWidgetDefinePane extends AbstractDataModify<Widget> {
public DefaultWidgetDefinePane(XCreator xCreator){
super(xCreator);
this.setLayout(FRGUIPaneFactory.createBorderLayout());
}
@Override
public String title4PopupWindow() {
return "default";
}
@Override
public void populateBean(Widget w) {
}
@Override
public Widget updateBean() {
return creator.toData();
}
}

4
designer_form/src/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java

@ -33,10 +33,6 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
this.initComponents();
}
public FieldEditorDefinePane() {
this.initComponents();
}
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
labelNameTextField = new UITextField();

5
designer_form/src/com/fr/design/widget/ui/designer/IframeEditorDefinePane.java

@ -1,6 +1,7 @@
package com.fr.design.widget.ui.designer;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.icheckbox.UICheckBox;
@ -23,8 +24,8 @@ public class IframeEditorDefinePane extends AbstractDataModify<IframeEditor> {
private UICheckBox horizontalCheck;
private UICheckBox verticalCheck;
public IframeEditorDefinePane() {
this.initComponents();
public IframeEditorDefinePane(XCreator xCreator) {
super(xCreator);
}
private void initComponents() {

7
designer_form/src/com/fr/design/widget/ui/designer/NoneWidgetDefinePane.java

@ -1,5 +1,6 @@
package com.fr.design.widget.ui.designer;
import com.fr.design.designer.creator.XCreator;
import com.fr.form.ui.NoneWidget;
/**
@ -8,7 +9,11 @@ import com.fr.form.ui.NoneWidget;
* 用于处理没有控件的情况
*/
public class NoneWidgetDefinePane extends AbstractDataModify<NoneWidget> {
public NoneWidgetDefinePane(XCreator xCreator){
super(xCreator);
}
@Override
public String title4PopupWindow() {
return "none";

3
designer_form/src/com/fr/design/widget/ui/designer/NumberEditorDefinePane.java

@ -54,9 +54,6 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor>
private ChangeListener minValueChangeListener;
public NumberEditorDefinePane() {
super();
}
@Override

6
designer_form/src/com/fr/design/widget/ui/designer/RadioDefinePane.java

@ -1,6 +1,7 @@
package com.fr.design.widget.ui.designer;
import com.fr.base.FRContext;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.form.ui.Radio;
@ -11,8 +12,9 @@ import javax.swing.*;
import java.awt.*;
public class RadioDefinePane extends AbstractDataModify<Radio> {
public RadioDefinePane() {
this.iniComoponents();
public RadioDefinePane(XCreator xCreator) {
super(xCreator);
iniComoponents();
}
private void iniComoponents() {

20
designer_form/src/com/fr/design/widget/ui/designer/UserEditorDefinePane.java

@ -1,32 +1,18 @@
package com.fr.design.widget.ui.designer;
import com.fr.base.FRContext;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.form.ui.NameWidget;
import com.fr.general.FRFont;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
public class UserEditorDefinePane extends AbstractDataModify<NameWidget> {
private NameWidget nWidget;
public UserEditorDefinePane() {
public UserEditorDefinePane(XCreator xCreator) {
super(xCreator);
this.initComponents();
}
private void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
UILabel infoLabel = new UILabel();
FRFont frFont = FRContext.getDefaultValues().getFRFont();
infoLabel.setFont(new Font(frFont.getFamily(), Font.BOLD, 24));
infoLabel.setText(Inter.getLocText(
"Widget-User_Defined_Editor") + ".");
infoLabel.setHorizontalAlignment(SwingConstants.CENTER);
this.add(infoLabel, BorderLayout.CENTER);
}
@Override

9
designer_form/src/com/fr/design/widget/ui/designer/WriteUnableRepeatEditorPane.java

@ -1,5 +1,6 @@
package com.fr.design.widget.ui.designer;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.form.ui.WriteUnableRepeatEditor;
@ -11,11 +12,11 @@ import java.awt.*;
public abstract class WriteUnableRepeatEditorPane<E extends WriteUnableRepeatEditor> extends FieldEditorDefinePane<WriteUnableRepeatEditor> {
// richer:是否去除重复的值
protected UICheckBox removeRepeatCheckBox;
public WriteUnableRepeatEditorPane(){
this.initComponents();
public WriteUnableRepeatEditorPane(XCreator xCreator){
super(xCreator);
}
@Override
protected JPanel setFirstContentPane() {
JPanel contentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane();

69
designer_form/src/com/fr/design/widget/ui/designer/layout/BorderStyleWidgetDefinePane.java

@ -0,0 +1,69 @@
package com.fr.design.widget.ui.designer.layout;
import com.fr.design.data.DataCreatorUI;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.widget.accessibles.AccessibleWLayoutBorderStyleEditor;
import com.fr.design.widget.ui.designer.AbstractDataModify;
import com.fr.form.ui.AbstractBorderStyleWidget;
import com.fr.form.ui.LayoutBorderStyle;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
/**
* Created by kerry on 2017/8/29.
*/
public class BorderStyleWidgetDefinePane extends AbstractDataModify<AbstractBorderStyleWidget> {
private AccessibleWLayoutBorderStyleEditor borderStyleEditor;
public BorderStyleWidgetDefinePane(XCreator xCreator) {
super(xCreator);
initComponent();
}
public void initComponent() {
borderStyleEditor = new AccessibleWLayoutBorderStyleEditor();
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel advancePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer-Widget_Style")), borderStyleEditor}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7);
jPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
advancePane.add(jPanel, BorderLayout.CENTER);
UIExpandablePane layoutExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 20, advancePane );
this.add(layoutExpandablePane, BorderLayout.CENTER);
}
@Override
public String title4PopupWindow() {
return "borderStyleWidget";
}
@Override
public void populateBean(AbstractBorderStyleWidget ob) {
borderStyleEditor.setValue(ob.getBorderStyle());
}
@Override
public AbstractBorderStyleWidget updateBean() {
AbstractBorderStyleWidget abstractBorderStyleWidget = (AbstractBorderStyleWidget)creator.toData();
abstractBorderStyleWidget.setBorderStyle((LayoutBorderStyle) borderStyleEditor.getValue());
return abstractBorderStyleWidget;
}
@Override
public DataCreatorUI dataUI() {
return null;
}
}

7
designer_form/src/com/fr/design/widget/ui/designer/layout/ChartEditorDefinePane.java

@ -1,7 +0,0 @@
//package com.fr.design.widget.ui.designer.layout;
//
///**
// * Created by ibm on 2017/8/7.
// */
//public class ChartEditorDefinePane extends {
//}
Loading…
Cancel
Save