Browse Source

REPORT-35149 打包失败

research/11.0
kerry 4 years ago
parent
commit
f59955689a
  1. 6
      designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java
  2. 13
      designer-form/src/main/java/com/fr/design/designer/creator/XElementCase.java
  3. 9
      designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java
  4. 9
      designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java
  5. 9
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java
  6. 1
      designer-form/src/main/java/com/fr/design/mainframe/ToolBarButton.java
  7. 77
      designer-form/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleWLayoutBorderStyleEditor.java

6
designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java

@ -838,6 +838,12 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo
return image; return image;
} }
/**
* 初始化组件的预定义信息
*/
public void initWidgetPredefinedInfo(){
}
} }

13
designer-form/src/main/java/com/fr/design/designer/creator/XElementCase.java

@ -21,9 +21,12 @@ import com.fr.form.FormProvider;
import com.fr.form.ui.ElementCaseEditor; import com.fr.form.ui.ElementCaseEditor;
import com.fr.form.ui.ElementCaseEditorProvider; import com.fr.form.ui.ElementCaseEditorProvider;
import com.fr.form.ui.NameLayoutBorderStyle;
import com.fr.form.ui.NamePaddingMargin;
import com.fr.report.fit.ReportFitAttr; import com.fr.report.fit.ReportFitAttr;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.CoreGraphHelper; import com.fr.stable.CoreGraphHelper;
import com.fr.stable.StringUtils;
import com.fr.stable.core.PropertyChangeAdapter; import com.fr.stable.core.PropertyChangeAdapter;
import com.fr.report.fit.FitProvider; import com.fr.report.fit.FitProvider;
@ -389,4 +392,14 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme
} }
} }
/**
* 初始化组件的预定义信息
*/
public void initWidgetPredefinedInfo(){
this.toData().setNameMargin(NamePaddingMargin.createPredefinedStyle(StringUtils.EMPTY));
this.toData().setNameBorderStyle(NameLayoutBorderStyle.createPredefinedStyle(StringUtils.EMPTY));
}
} }

9
designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java

@ -8,8 +8,10 @@ import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.widget.editors.WLayoutBorderStyleEditor; import com.fr.design.mainframe.widget.editors.WLayoutBorderStyleEditor;
import com.fr.design.mainframe.widget.topxcreator.BasicTopXCreator; import com.fr.design.mainframe.widget.topxcreator.BasicTopXCreator;
import com.fr.form.ui.NameFormBackground;
import com.fr.form.ui.container.WAbsoluteBodyLayout; import com.fr.form.ui.container.WAbsoluteBodyLayout;
import com.fr.stable.StringUtils;
import com.fr.stable.core.PropertyChangeAdapter; import com.fr.stable.core.PropertyChangeAdapter;
import java.awt.Component; import java.awt.Component;
@ -136,4 +138,11 @@ public class XWAbsoluteBodyLayout extends XWAbsoluteLayout {
public BasicTopXCreator getTopXCreator() { public BasicTopXCreator getTopXCreator() {
return null; return null;
} }
/**
* 初始化组件的预定义信息
*/
public void initWidgetPredefinedInfo(){
this.toData().setNameBackground(NameFormBackground.createPredefinedStyle(StringUtils.EMPTY));
}
} }

9
designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java

@ -12,6 +12,7 @@ import com.fr.design.mainframe.FormArea;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.utils.gui.LayoutUtils; import com.fr.design.utils.gui.LayoutUtils;
import com.fr.form.ui.NameFormBackground;
import com.fr.form.ui.PaddingMargin; import com.fr.form.ui.PaddingMargin;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget;
@ -23,6 +24,7 @@ import com.fr.general.FRLogger;
import com.fr.general.FRScreen; import com.fr.general.FRScreen;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.AssistUtils; import com.fr.stable.AssistUtils;
import com.fr.stable.StringUtils;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
import java.awt.Component; import java.awt.Component;
@ -1337,4 +1339,11 @@ public class XWFitLayout extends XLayoutContainer {
} }
} }
} }
/**
* 初始化组件的预定义信息
*/
public void initWidgetPredefinedInfo(){
this.toData().setNameBackground(NameFormBackground.createPredefinedStyle(StringUtils.EMPTY));
}
} }

9
designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java

@ -21,12 +21,14 @@ import com.fr.design.mainframe.widget.editors.ButtonTypeEditor;
import com.fr.design.mainframe.widget.editors.ImgBackgroundEditor; import com.fr.design.mainframe.widget.editors.ImgBackgroundEditor;
import com.fr.design.utils.gui.LayoutUtils; import com.fr.design.utils.gui.LayoutUtils;
import com.fr.form.ui.CardSwitchButton; import com.fr.form.ui.CardSwitchButton;
import com.fr.form.ui.NameFormBackground;
import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget;
import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.form.ui.container.cardlayout.WCardTagLayout;
import com.fr.form.ui.container.cardlayout.WTabFitLayout; import com.fr.form.ui.container.cardlayout.WTabFitLayout;
import com.fr.general.Background; import com.fr.general.Background;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.core.PropertyChangeAdapter; import com.fr.stable.core.PropertyChangeAdapter;
import javax.swing.border.Border; import javax.swing.border.Border;
@ -639,4 +641,11 @@ public class XWTabFitLayout extends XWFitLayout {
checkVisible(); checkVisible();
} }
/**
* 初始化组件的预定义信息
*/
public void initWidgetPredefinedInfo(){
this.toData().setNameBackground(NameFormBackground.createCustomStyleWithBackground(null));
}
} }

1
designer-form/src/main/java/com/fr/design/mainframe/ToolBarButton.java

@ -94,6 +94,7 @@ public class ToolBarButton extends UIButton implements MouseListener, MouseMotio
} }
if (creatorSource != null) { if (creatorSource != null) {
XCreator xCreator = XCreatorUtils.createXCreator(creatorSource); XCreator xCreator = XCreatorUtils.createXCreator(creatorSource);
xCreator.initWidgetPredefinedInfo();
WidgetToolBarPane.getTarget().startDraggingBean(xCreator); WidgetToolBarPane.getTarget().startDraggingBean(xCreator);
FormDesignerUtils.addWidgetProcessInfo(xCreator.toData()); FormDesignerUtils.addWidgetProcessInfo(xCreator.toData());
lastPressEvent = null; lastPressEvent = null;

77
designer-form/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleWLayoutBorderStyleEditor.java

@ -4,35 +4,33 @@
package com.fr.design.mainframe.widget.accessibles; package com.fr.design.mainframe.widget.accessibles;
import com.fr.design.Exception.ValidationException;
import com.fr.design.designer.properties.Decoder;
import com.fr.design.designer.properties.Encoder;
import com.fr.design.gui.xpane.PredefinedComponentStyleSettingPane;
import com.fr.design.mainframe.widget.editors.ITextComponent; import com.fr.design.mainframe.widget.editors.ITextComponent;
import com.fr.design.mainframe.widget.renderer.EncoderCellRenderer; import com.fr.design.mainframe.widget.renderer.LayoutBorderStyleRenderer;
import com.fr.design.mainframe.widget.wrappers.LayoutBorderStyleWrapper;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.widget.ui.designer.layout.ComponentStyle; import com.fr.design.gui.xpane.LayoutBorderPane;
import com.fr.form.ui.LayoutBorderStyle;
import javax.swing.SwingUtilities; import javax.swing.*;
import java.awt.Dimension; import java.awt.*;
public class AccessibleWLayoutBorderStyleEditor extends UneditableAccessibleEditor { public class AccessibleWLayoutBorderStyleEditor extends UneditableAccessibleEditor {
private PredefinedComponentStyleSettingPane borderPane; private LayoutBorderPane borderPane;
public AccessibleWLayoutBorderStyleEditor() { public AccessibleWLayoutBorderStyleEditor() {
super(new ComponentStyleWrapper()); super(new LayoutBorderStyleWrapper());
} }
@Override @Override
protected ITextComponent createTextField() { protected ITextComponent createTextField() {
return new RendererField(new ComponentStyleRenderer()); return new RendererField(new LayoutBorderStyleRenderer());
} }
@Override @Override
protected void showEditorPane() { protected void showEditorPane() {
if (borderPane == null) { if (borderPane == null) {
borderPane = new PredefinedComponentStyleSettingPane(); borderPane = new LayoutBorderPane();
borderPane.setPreferredSize(new Dimension(600, 400)); borderPane.setPreferredSize(new Dimension(600, 400));
} }
BasicDialog dlg = borderPane.showWindow(SwingUtilities.getWindowAncestor(this)); BasicDialog dlg = borderPane.showWindow(SwingUtilities.getWindowAncestor(this));
@ -40,62 +38,11 @@ public class AccessibleWLayoutBorderStyleEditor extends UneditableAccessibleEdit
@Override @Override
public void doOk() { public void doOk() {
setValue(borderPane.updateBean()); setValue(borderPane.update());
fireStateChanged(); fireStateChanged();
} }
}); });
borderPane.populateBean((ComponentStyle) getValue()); borderPane.populate((LayoutBorderStyle)getValue());
dlg.setVisible(true); dlg.setVisible(true);
} }
private static class ComponentStyleWrapper implements Encoder, Decoder {
public ComponentStyleWrapper() {
}
/**
* 将属性转化成字符串
*
* @param v 属性对象
* @return 字符串
*/
public String encode(Object v) {
if (v == null) {
return null;
}
ComponentStyle style = (ComponentStyle) v;
//todo
return "标准";
}
/**
* 将字符串转化成属性
*
* @param txt 字符串
* @return 属性对象
*/
public Object decode(String txt) {
return null;
}
/**
* 符合规则
*
* @param txt 字符串
* @throws ValidationException 抛错
*/
public void validate(String txt) throws ValidationException {
}
}
private static class ComponentStyleRenderer extends EncoderCellRenderer {
public ComponentStyleRenderer() {
super(new ComponentStyleWrapper());
}
}
} }

Loading…
Cancel
Save