Browse Source

Merge pull request #231 in BA/design from ~NEIL/design:release to master

* commit '4d8a43ba7fa639f65fc9575cc18a5bd38b86941f': (21 commits)
  1
  冲突
  冲突
  代码规范
  修改一些规范问题
  他装了插件后, 可以设置显示或者不显示
  装了插件后, 可以设置显示或者不显示
  装了插件后, 可以设置显示或者不显示
  去掉qq帮助,并在关于软件中显示qq号码,冻结时给提示
  执行
  表单交互统一测试bug修改 1.从toolbarbtn上拖下tab布局后当前的选中对象并非顶层布局 2.tab布局顶层布局的名字修改为tablayout 3.支持tab布局的嵌套后正确显示编辑层
  有自定义按钮后, web属性工具栏设置保存不上.
  sonar配置
  bug
  圖標
  modified:   ../columnrow/ColumnRowPane.java
  modified:   ../columnrow/ColumnRowPane.java
  new file:   FillBugSpinner.java
  update
  超链顺序
  ...
master
superman 8 years ago
parent
commit
753796dec1
  1. 80
      designer/src/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java
  2. 12
      designer/src/com/fr/design/webattr/EditToolBar.java
  3. 3
      designer_base/src/com/fr/design/actions/help/AboutPane.java
  4. 1
      designer_base/src/com/fr/design/beans/BasicBeanPane.java
  5. 4
      designer_base/src/com/fr/design/designer/creator/CRPropertyDescriptor.java
  6. 20
      designer_base/src/com/fr/design/fun/ParameterWindowEditorProcessor.java
  7. 31
      designer_base/src/com/fr/design/fun/impl/AbstractParameterWindowEditorProcessor.java
  8. 3
      designer_base/src/com/fr/design/gui/columnrow/ColumnRowPane.java
  9. 123
      designer_base/src/com/fr/design/gui/ispinner/ColumnRowSpinner.java
  10. 1
      designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  11. 1
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java
  12. 9
      designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java
  13. 7
      designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java
  14. 101
      designer_form/src/com/fr/design/designer/creator/XChartEditor.java
  15. 8
      designer_form/src/com/fr/design/designer/creator/XCreator.java
  16. 26
      designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java
  17. 16
      designer_form/src/com/fr/design/designer/creator/XWParameterLayout.java
  18. 8
      designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java
  19. 5
      designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java
  20. 8
      designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java
  21. 98
      designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java
  22. 6
      designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java
  23. 6
      designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTitleLayout.java
  24. 7
      designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java
  25. 178
      designer_form/src/com/fr/design/mainframe/EditingMouseListener.java
  26. 7
      designer_form/src/com/fr/design/mainframe/FormCreatorDropTarget.java

80
designer/src/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java

@ -1,17 +1,23 @@
package com.fr.design.report.freeze;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.UIDialog;
import com.fr.design.extra.PluginManagerPane;
import com.fr.design.extra.PluginShopDialog;
import com.fr.design.extra.PluginWebBridge;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.ActionLabel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.general.Inter;
import com.fr.page.ReportPageAttrProvider;
import com.fr.stable.ColumnRow;
@ -22,6 +28,10 @@ import com.fr.stable.bridge.StableFactory;
* Sets Report Page Attributes
*/
public class RepeatAndFreezeSettingPane extends BasicPane {
//边框高度
private static final int LABEL_HEIGHT = 45;
// 重复标题行
private RepeatRowPane repeatTitleRowPane;
// 重复标题列
@ -206,7 +216,15 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
JPanel repeatPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1);
repeatPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
JPanel freezePanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
//自适应插件
JPanel infoPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Attention"));
BoxCenterAligmentPane actionLabel = getURLActionLabel(Inter.getLocText("FR-Designer_Form-Fit-Tip"));
infoPane.add(actionLabel, BorderLayout.SOUTH);
outfreezePanel.add(freezePanel);
this.add(infoPane, BorderLayout.SOUTH);
// 重复打印部分
// 重复打印标题的起始行
JPanel labelPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
@ -536,4 +554,58 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
return null;
}
private BoxCenterAligmentPane getURLActionLabel(final String text) {
ActionLabel actionLabel = new ActionLabel(text);
actionLabel.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
try {
//Desktop.getDesktop().browse(new URI(url));
final PluginManagerPane managerPane = new PluginManagerPane();
UIDialog dlg = new PluginShopDialog(DesignerContext.getDesignerFrame(),managerPane);
PluginWebBridge.getHelper().setDialogHandle(dlg);
dlg.setVisible(true);
RepeatAndFreezeSettingPane.this.getTopLevelAncestor().setVisible(false);
} catch (Exception exp) {
}
}
});
return new BoxCenterAligmentPane(actionLabel);
}
class BoxCenterAligmentPane extends JPanel {
private UILabel textLabel;
public BoxCenterAligmentPane(String text) {
this(new UILabel(text));
}
public BoxCenterAligmentPane(UILabel label) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel centerPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
this.add(centerPane, BorderLayout.CENTER);
UILabel label1 = new UILabel(Inter.getLocText("FR-Designer_Form-Frozen-Tip"));
label1.setForeground(new Color(255, 0, 0));
UILabel label2 = new UILabel(Inter.getLocText("FR-Designer_Form-Forzen-Speed"));
label2.setForeground(new Color(255, 0, 0));
this.textLabel = label;
centerPane.add(label1);
centerPane.add(textLabel);
centerPane.add(label2);
}
public void setFont(Font font) {
super.setFont(font);
if (textLabel != null) {
textLabel.setFont(font);
}
}
}
}

12
designer/src/com/fr/design/webattr/EditToolBar.java

@ -63,16 +63,8 @@ public class EditToolBar extends BasicPane {
private ListSelectionListener listSelectionListener = new ListSelectionListener() {
public void valueChanged(ListSelectionEvent evt) {
if (lastButton != null && lastButton.getWidget() instanceof Button) {
if (!((list.getSelectedValue() instanceof ToolBarButton)
&& ((ToolBarButton)(list.getSelectedValue())).getWidget() instanceof CustomToolBarButton)) {
lastButton.setWidget(bp.update());
} else {
((Button) lastButton.getWidget()).setShowIcon(bp.icon.isSelected());
((Button) lastButton.getWidget()).setShowText(bp.text.isSelected());
((Button) lastButton.getWidget()).setText(bp.nameField.getText());
((Button) lastButton.getWidget()).setIconName(bp.iconPane.update());
}
if (lastButton != null) {
lastButton.setWidget(bp.update());
}
if (list.getSelectedValue() instanceof ToolBarButton) {
lastButton = (ToolBarButton) list.getSelectedValue();

3
designer_base/src/com/fr/design/actions/help/AboutPane.java

@ -11,6 +11,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralUtils;
import com.fr.general.Inter;
import com.fr.general.SiteCenter;
import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactory;
@ -69,6 +70,8 @@ public class AboutPane extends JPanel {
boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("Service_Phone") + ProductConstants.COMPARE_TELEPHONE);
contentPane.add(boxCenterAlignmentPane);
}
boxCenterAlignmentPane = new BoxCenterAligmentPane("QQ:" + SiteCenter.getInstance().acquireUrlByKind("help.qq"));
contentPane.add(boxCenterAlignmentPane);
BoxCenterAligmentPane actionLabel = getURLActionLabel(ProductConstants.WEBSITE_URL);
BoxCenterAligmentPane emailLabel = getEmailActionLabel(ProductConstants.SUPPORT_EMAIL);

1
designer_base/src/com/fr/design/beans/BasicBeanPane.java

@ -8,6 +8,7 @@ import com.fr.design.dialog.BasicPane;
public abstract class BasicBeanPane<T> extends BasicPane {
/**
* Populate.
*/

4
designer_form/src/com/fr/design/designer/creator/CRPropertyDescriptor.java → designer_base/src/com/fr/design/designer/creator/CRPropertyDescriptor.java

@ -3,7 +3,6 @@
*/
package com.fr.design.designer.creator;
import com.fr.design.gui.xtable.AbstractPropertyGroupModel;
import com.fr.stable.StringUtils;
import com.fr.stable.core.PropertyChangeAdapter;
@ -15,6 +14,7 @@ import java.beans.PropertyDescriptor;
* @since 6.5.3
*/
public final class CRPropertyDescriptor extends PropertyDescriptor {
public static final String RENDERER = "renderer";
private PropertyChangeAdapter l;
@ -51,7 +51,7 @@ public final class CRPropertyDescriptor extends PropertyDescriptor {
}
public CRPropertyDescriptor setRendererClass(Class<?> clazz) {
this.putKeyValue(AbstractPropertyGroupModel.RENDERER, clazz);
this.putKeyValue(RENDERER, clazz);
return this;
}

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

@ -0,0 +1,20 @@
package com.fr.design.fun;
import com.fr.design.designer.creator.CRPropertyDescriptor;
import com.fr.stable.fun.mark.Immutable;
/**
* Created by zpc on 16/7/21.
*/
public interface ParameterWindowEditorProcessor extends Immutable {
String MARK_STRING = "ParameterWindowEditorProcessor";
int CURRENT_LEVEL = 1;
/**
* 生成属性表
*/
CRPropertyDescriptor[] createPropertyDescriptor(Class<?> temp);
}

31
designer_base/src/com/fr/design/fun/impl/AbstractParameterWindowEditorProcessor.java

@ -0,0 +1,31 @@
package com.fr.design.fun.impl;
import com.fr.design.designer.creator.CRPropertyDescriptor;
import com.fr.design.fun.ParameterWindowEditorProcessor;
import com.fr.stable.fun.mark.API;
/**
* Created by zpc on 2016/7/21.
*/
@API(level = ParameterWindowEditorProcessor.CURRENT_LEVEL)
public abstract class AbstractParameterWindowEditorProcessor implements ParameterWindowEditorProcessor {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
public int layerIndex() {
return DEFAULT_LAYER_INDEX;
}
/**
* 生成属性表
*/
@Override
public CRPropertyDescriptor[] createPropertyDescriptor(Class<?> temp) {
return new CRPropertyDescriptor[0];
}
}

3
designer_base/src/com/fr/design/gui/columnrow/ColumnRowPane.java

@ -22,6 +22,7 @@ import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.ispinner.UIBasicSpinner;
import com.fr.design.gui.ispinner.UpperCaseSpinner;
import com.fr.design.gui.ispinner.ColumnRowSpinner;
import com.fr.general.ComparatorUtils;
import com.fr.stable.ColumnRow;
import com.fr.stable.StableUtils;
@ -119,7 +120,7 @@ public class ColumnRowPane extends JPanel implements UIObserver {
protected void initRowSpinner() {
rowSpinner = new UIBasicSpinner((new SpinnerListModel(rowarray))) {
rowSpinner = new ColumnRowSpinner((new SpinnerListModel(rowarray))) {
public boolean shouldResponseChangeListener() {
return false;
}

123
designer_base/src/com/fr/design/gui/ispinner/ColumnRowSpinner.java

@ -0,0 +1,123 @@
package com.fr.design.gui.ispinner;
import java.text.ParseException;
import java.util.List;
import javax.swing.JComponent;
import javax.swing.JFormattedTextField;
import javax.swing.JSpinner;
import javax.swing.SpinnerDateModel;
import javax.swing.SpinnerListModel;
import javax.swing.SpinnerModel;
import javax.swing.SpinnerNumberModel;
import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.DefaultFormatterFactory;
import javax.swing.text.DocumentFilter;
import com.fr.stable.StableUtils;
//_kerry: 用来修复Spinner输入数字自动填充的bug
public class ColumnRowSpinner extends UIBasicSpinner {
public ColumnRowSpinner(SpinnerModel model) {
super(model);
}
protected JComponent createEditor(SpinnerModel model) {
if (model instanceof SpinnerDateModel) {
return new DateEditor(this);
} else if (model instanceof SpinnerListModel) {
return new FillBugEditor(this);
} else if (model instanceof SpinnerNumberModel) {
return new NumberEditor(this);
} else {
return new DefaultEditor(this);
}
}
private class FillBugEditor extends DefaultEditor {
public FillBugEditor(JSpinner spinner) {
super(spinner);
if (!(spinner.getModel() instanceof SpinnerListModel)) {
throw new IllegalArgumentException(
"model not a SpinnerListModel");
}
getTextField().setEditable(true);
getTextField().setFormatterFactory(
new DefaultFormatterFactory(new ListFormatter()));
}
public SpinnerListModel getModel() {
return (SpinnerListModel) (getSpinner().getModel());
}
private class ListFormatter extends
JFormattedTextField.AbstractFormatter {
private DocumentFilter filter;
public String valueToString(Object value) throws ParseException {
if (value == null) {
return "";
}
return value.toString();
}
public Object stringToValue(String string)
throws ParseException {
//add将行数转换成ABC
return string;
}
protected DocumentFilter getDocumentFilter() {
if (filter == null) {
filter = new Filter();
}
return filter;
}
private class Filter extends DocumentFilter {
public void replace(FilterBypass fb, int offset,
int length, String string, AttributeSet attrs)
throws BadLocationException {
if (string != null
&& (offset + length) == fb.getDocument()
.getLength()) {
List list = getModel().getList();
Object next = null;
for (int counter = 0; counter < list.size(); counter++) {
Object value = list.get(counter);
String str = value.toString();
if (str != null
&& str.startsWith(fb.getDocument()
.getText(0, offset)
+ string)) {
next = value;
break;
}
}
String value = (next != null) ? next.toString()
: null;
if (value != null) {
fb.remove(0, offset + length);
fb.insertString(0, value, null);
getFormattedTextField().select(
offset + string.length(),
value.length());
return;
}
}
super.replace(fb, offset, length, string, attrs);
}
public void insertString(FilterBypass fb, int offset,
String string, AttributeSet attr)
throws BadLocationException {
replace(fb, offset, 0, string, attr);
}
}
}
}
}

1
designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -301,7 +301,6 @@ public abstract class ToolBarMenuDock {
if (ComparatorUtils.equals(ProductConstants.APP_NAME,FINEREPORT)) {
shortCuts.add(new FeedBackAction());
shortCuts.add(SeparatorDef.DEFAULT);
shortCuts.add(new SupportQQAction());
shortCuts.add(SeparatorDef.DEFAULT);
// shortCuts.add(new ForumAction());
}

1
designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java

@ -4,7 +4,6 @@ import com.fr.base.chart.BaseChartCollection;
import com.fr.chart.chartattr.Bar2DPlot;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.ChartFactory;
import com.fr.chart.charttypes.ChartTypeManager;
import com.fr.chart.web.ChartHyperPoplink;
import com.fr.design.beans.BasicBeanPane;

9
designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java

@ -14,6 +14,7 @@ import com.fr.design.designer.beans.ConstraintsGroupModel;
import com.fr.design.designer.beans.HoverPainter;
import com.fr.design.designer.beans.painters.FRFitLayoutPainter;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.creator.cardlayout.XWCardLayout;
@ -163,7 +164,7 @@ public class FRFitLayoutAdapter extends AbstractLayoutAdapter {
return false;
}
//如果当前处于边缘地带, 那么就把他贴到父容器上
matchEdge(x, y);
boolean isMatchEdge = matchEdge(x, y);
int componentHeight = comp.getHeight();
int componentWidth = comp.getWidth();
@ -172,6 +173,12 @@ public class FRFitLayoutAdapter extends AbstractLayoutAdapter {
//下半部分高度
int downHeight = (int) (componentHeight * BOTTOM_HALF) + comp.getY();
//布局控件要先判断是不是可编辑
XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer((XCreator)comp).getTopLayout();
if(topLayout != null && !isMatchEdge && !topLayout.isEditable()){
return false;
}
if (isCrossPointArea(comp, x, y)) {
return canAcceptWhileCrossPoint(comp, x, y);
}

7
designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java

@ -66,6 +66,13 @@ public class SelectionModel {
// 获取e所在的组件
XCreator comp = designer.getComponentAt(e);
//布局组件的顶层布局如不可编辑,要获取其顶层布局
XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer(comp).getTopLayout();
if(topLayout != null && !topLayout.isEditable()){
comp = topLayout;
}
// 如果父层是scale和title两个专属容器,返回其父层,组件本身是不让被选中的
if (comp != designer.getRootComponent() && comp != designer.getParaComponent()) {
XCreator parentContainer = (XCreator) comp.getParent();

101
designer_form/src/com/fr/design/designer/creator/XChartEditor.java

@ -1,20 +1,22 @@
package com.fr.design.designer.creator;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
import java.beans.IntrospectionException;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.SwingUtilities;
import javax.swing.*;
import com.fr.base.BaseUtils;
import com.fr.base.chart.BaseChart;
import com.fr.base.chart.BaseChartCollection;
import com.fr.design.designer.beans.AdapterBus;
import com.fr.design.designer.beans.ComponentAdapter;
import com.fr.design.designer.beans.models.SelectionModel;
import com.fr.design.gui.chart.BaseChartPropertyPane;
import com.fr.design.gui.chart.MiddleChartComponent;
import com.fr.design.mainframe.BaseJForm;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.*;
import com.fr.design.mainframe.widget.editors.WLayoutBorderStyleEditor;
import com.fr.design.mainframe.widget.renderer.LayoutBorderStyleRenderer;
import com.fr.design.module.DesignModuleFactory;
@ -41,6 +43,9 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
//marro:无奈的属性,暂时想不出好办法
private boolean isRefreshing = false;
private boolean isEditing = false;
private JPanel coverPanel;
public XChartEditor(BaseChartEditor editor) {
this(editor, new Dimension(250, 150));
}
@ -142,17 +147,22 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
}
});
final BaseChartPropertyPane propertyPane = DesignModuleFactory.getChartWidgetPropertyPane(formDesigner);
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
if (getDesignerEditor().getEditorTarget() != null) {
propertyPane.setSupportCellData(true);
propertyPane.populateChartPropertyPane(getDesignerEditorTarget().update(), formDesigner);
if (isEditing){
final BaseChartPropertyPane propertyPane = DesignModuleFactory.getChartPropertyPane();
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
if (getDesignerEditor().getEditorTarget() != null) {
propertyPane.setSupportCellData(true);
propertyPane.populateChartPropertyPane(getDesignerEditorTarget().update(), formDesigner);
}
}
}
});
return (JComponent)propertyPane;
});
return (JComponent)propertyPane;
}
else{
return (JComponent)DesignModuleFactory.getWidgetPropertyPane(formDesigner);
}
}
private MiddleChartComponent getDesignerEditorTarget() {
@ -167,8 +177,8 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
* 渲染Painter
*/
public void paint(Graphics g) {
super.paint(g);
designerEditor.paintEditor(g, this.getSize());
super.paint(g);
}
/**
@ -180,6 +190,27 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
return new Dimension(250, 100);
}
/**
* 响应点击事件
*
* @param editingMouseListener 鼠标点击位置处理器
* @param e 鼠标点击事件
*/
public void respondClick(EditingMouseListener editingMouseListener,MouseEvent e){
FormDesigner designer = editingMouseListener.getDesigner();
SelectionModel selectionModel = editingMouseListener.getSelectionModel();
isEditing = e.getClickCount() == 2 || designer.getCursor().getType() == Cursor.HAND_CURSOR;
displayCoverPane(!isEditing);
selectionModel.selectACreatorAtMouseEvent(e);
if (editingMouseListener.stopEditing()) {
if (this != (XCreator)designer.getRootComponent()) {
ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, this);
editingMouseListener.startEditing(this, isEditing ? adapter.getDesignerEditor() : null, adapter);
}
}
}
@Override
protected JComponent initEditor() {
if (designerEditor == null) {
@ -198,6 +229,36 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
});
}
}
return null;
if (editor == null) {
setBorder(DEFALUTBORDER);
editor = new JPanel();
editor.setBackground(null);
editor.setLayout(null);
editor.setOpaque(false);
coverPanel = new CoverReportPane();
coverPanel.setPreferredSize(this.getPreferredSize());
coverPanel.setBounds(this.getBounds());
editor.add(coverPanel);
coverPanel.setVisible(false);
}
return editor;
}
/**
* 是否展现覆盖的pane
* @param display 是否
*/
public void displayCoverPane(boolean display){
coverPanel.setVisible(display);
coverPanel.setPreferredSize(editor.getPreferredSize());
coverPanel.setBounds(editor.getBounds());
editor.repaint();
}
public JComponent getCoverPane(){
return coverPanel;
}
}

8
designer_form/src/com/fr/design/designer/creator/XCreator.java

@ -106,6 +106,14 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo
setBackupParent(XCreatorUtils.getParentXLayoutContainer(this));
}
/**
* 获取当前布局控件的顶层布局框架如tab布局绝对布局
* @return 封装的顶层布局
*/
public XLayoutContainer getTopLayout(){
return null;
}
/**
* 获取当前XCreator的一个封装父容器
*

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

@ -41,6 +41,16 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme
protected boolean isRefreshing;
protected int default_Length = 5; // 取指定点坐在的组件,默认为5保证取四侧相邻的组件时x、y在组件内非边框上
/**
* 布局是否可编辑不可则显示编辑层
*/
protected boolean editable = false;
//鼠标移动到布局画出编辑层
protected boolean isMouseEnter = false;
public void setMouseEnter(boolean mouseEnter) {
isMouseEnter = mouseEnter;
}
public XLayoutContainer(WLayout widget, Dimension initSize) {
super(widget, initSize);
this.addContainerListener(this);
@ -446,4 +456,20 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme
public void setBackground(Background background){
}
/**
* 布局是否可编辑不可则显示编辑蒙层
* @return 可否编辑
*/
public boolean isEditable(){
return this.editable;
}
/**
* 设置布局是否可编辑不可则显示编辑蒙层
* @param isEditable 可否编辑
*/
public void setEditable(boolean isEditable){
this.editable = isEditable;
}
}

16
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,9 +17,12 @@ 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.ParameterWindowEditorProcessor;
import com.fr.stable.ArrayUtils;
import java.awt.*;
import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
/**
* 表单参数界面container
@ -51,7 +55,7 @@ public class XWParameterLayout extends XWAbsoluteLayout {
* @throws java.beans.IntrospectionException
*/
public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException {
return new CRPropertyDescriptor[]{
CRPropertyDescriptor[] propertyTableEditor = 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)
@ -61,9 +65,17 @@ public class XWParameterLayout extends XWAbsoluteLayout {
.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"),
};
ParameterWindowEditorProcessor processor = ExtraDesignClassManager.getInstance().getSingle(ParameterWindowEditorProcessor.MARK_STRING);
if (processor == null) {
return propertyTableEditor;
}
CRPropertyDescriptor[] extraEditor = processor.createPropertyDescriptor(this.data.getClass());
return ArrayUtils.addAll(propertyTableEditor, extraEditor);
}
@Override

8
designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java

@ -12,6 +12,7 @@ import com.fr.design.designer.beans.AdapterBus;
import com.fr.design.designer.beans.ComponentAdapter;
import com.fr.design.designer.beans.models.SelectionModel;
import com.fr.design.designer.creator.XButton;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.mainframe.EditingMouseListener;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.FormHierarchyTreePane;
@ -149,6 +150,8 @@ public class XCardAddButton extends XButton{
XCardSwitchButton showButton = new XCardSwitchButton(titleButton,dimension,cardLayout,tagLayout);
titleButton.setCustomStyle(true);
titleButton.setShowButton(true);
showButton.setBackupParent(tagLayout);
this.tagLayout.setCurrentCard(titleButton);
this.tagLayout.setTabFitIndex(index);
@ -180,4 +183,9 @@ public class XCardAddButton extends XButton{
}
return newTextName;
}
@Override
public XLayoutContainer getTopLayout() {
return this.getBackupParent().getTopLayout();
}
}

5
designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java

@ -293,4 +293,9 @@ public class XCardSwitchButton extends XButton {
selectionModel.setSelectedCreator(designer.getRootComponent());
}
@Override
public XLayoutContainer getTopLayout() {
return this.getBackupParent().getTopLayout();
}
}

8
designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java

@ -219,8 +219,7 @@ public class XWCardLayout extends XLayoutContainer {
*
*/
protected void setWrapperName(XLayoutContainer parentPanel, String widgetName) {
//先随便set一个, 以后还是要隐藏的
parentPanel.toData().setWidgetName("border_card_" + widgetName);
parentPanel.toData().setWidgetName("tablayout" + widgetName.replaceAll(createDefaultName(),""));
}
/**
@ -367,4 +366,9 @@ public class XWCardLayout extends XLayoutContainer {
mainLayout.setBorder(border);
}
}
@Override
public XLayoutContainer getTopLayout() {
return this.getBackupParent().getTopLayout();
}
}

98
designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java

@ -3,18 +3,25 @@
*/
package com.fr.design.designer.creator.cardlayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import com.fr.design.designer.beans.AdapterBus;
import com.fr.design.designer.beans.ComponentAdapter;
import com.fr.design.designer.beans.models.SelectionModel;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWBorderLayout;
import com.fr.design.icon.IconPathConstants;
import com.fr.design.mainframe.EditingMouseListener;
import com.fr.design.mainframe.FormDesigner;
import com.fr.form.ui.container.WBorderLayout;
import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget;
import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
/**
* card布局主体框架
@ -32,6 +39,9 @@ public class XWCardMainBorderLayout extends XWBorderLayout{
private static final int TITLE_STYLE = 2;
private static final int NORMAL_STYLE = 1;
private static final int EDIT_BTN_WIDTH = 60;
private static final int EDIT_BTN_HEIGHT = 24;
/**
* 构造函数
*/
@ -124,7 +134,7 @@ public class XWCardMainBorderLayout extends XWBorderLayout{
/**
* 重新调整子组件的宽度
* @param 宽度
* @param width 宽度
*/
public void recalculateChildWidth(int width){
ArrayList<?> childrenList = this.getTargetChildrenList();
@ -188,4 +198,78 @@ public class XWCardMainBorderLayout extends XWBorderLayout{
}
}
public void paint(Graphics g) {
super.paint(g);
//如果鼠标移动到布局内且布局不可编辑,画出编辑蒙层
if (isMouseEnter && !editable) {
int x = 0;
int y = 0;
int w = getWidth();
int h = getHeight();
Graphics2D g2d = (Graphics2D) g;
Composite oldComposite = g2d.getComposite();
//画白色的编辑层
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 60 / 100.0F));
g2d.setColor(Color.WHITE);
g2d.fillRect(x, y, w, h);
//画编辑按钮所在框
g2d.setComposite(oldComposite);
g2d.setColor(new Color(176, 196, 222));
g2d.fillRect((x + w / 2 - EDIT_BTN_WIDTH / 2), (y + h / 2 - EDIT_BTN_HEIGHT / 2), EDIT_BTN_WIDTH, EDIT_BTN_HEIGHT);
//画编辑按钮图标
BufferedImage image = IOUtils.readImage(IconPathConstants.TD_EDIT_ICON_PATH);
g2d.drawImage(
image,
(x + w / 2 - 23),
(y + h / 2 - image.getHeight() / 2),
image.getWidth(),
image.getHeight(),
null,
this
);
g2d.setColor(Color.BLACK);
//画编辑文字
g2d.drawString(Inter.getLocText("Edit"), x + w / 2 - 2, y + h / 2 + 5);
}
}
/**
* 响应点击事件
*
* @param editingMouseListener 鼠标点击位置处理器
* @param e 鼠标点击事件
*/
public void respondClick(EditingMouseListener editingMouseListener,MouseEvent e){
FormDesigner designer = editingMouseListener.getDesigner();
SelectionModel selectionModel = editingMouseListener.getSelectionModel();
boolean isEditing = designer.getCursor().getType() == Cursor.HAND_CURSOR || e.getClickCount() == 2;
setEditable(isEditing);
selectionModel.selectACreatorAtMouseEvent(e);
designer.repaint();
if (editingMouseListener.stopEditing()) {
if (this != designer.getRootComponent()) {
ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, this);
editingMouseListener.startEditing(this, isEditing ? adapter.getDesignerEditor() : null, adapter);
}
}
}
/**
* XWCardMainBorderLayout是card布局主体框架tab的顶层布局
* @return
*/
@Override
public XLayoutContainer getTopLayout() {
XLayoutContainer xTopLayout = XCreatorUtils.getParentXLayoutContainer(this).getTopLayout();
if (xTopLayout != null && !xTopLayout.isEditable()){
return xTopLayout;
}
else{
return this;
}
}
}

6
designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java

@ -13,6 +13,7 @@ import com.fr.design.designer.beans.AdapterBus;
import com.fr.design.designer.beans.ComponentAdapter;
import com.fr.design.designer.beans.models.SelectionModel;
import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWHorizontalBoxLayout;
import com.fr.design.designer.creator.XWidgetCreator;
import com.fr.design.mainframe.EditingMouseListener;
@ -214,4 +215,9 @@ public class XWCardTagLayout extends XWHorizontalBoxLayout {
}
}
}
@Override
public XLayoutContainer getTopLayout() {
return this.getBackupParent().getTopLayout();
}
}

6
designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTitleLayout.java

@ -12,6 +12,7 @@ import com.fr.design.designer.beans.AdapterBus;
import com.fr.design.designer.beans.ComponentAdapter;
import com.fr.design.designer.beans.models.SelectionModel;
import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWBorderLayout;
import com.fr.design.designer.creator.XWidgetCreator;
import com.fr.design.mainframe.EditingMouseListener;
@ -146,4 +147,9 @@ public class XWCardTitleLayout extends XWBorderLayout {
}
}
}
@Override
public XLayoutContainer getTopLayout() {
return this.getBackupParent().getTopLayout();
}
}

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

@ -188,7 +188,7 @@ public class XWTabFitLayout extends XWFitLayout {
/**
* 该布局需要隐藏无需对边框进行操作
* @param 边框
* @param border 边框
*
*/
public void setBorder(Border border) {
@ -362,4 +362,9 @@ public class XWTabFitLayout extends XWFitLayout {
this.hasCalGap = true;
}
@Override
public XLayoutContainer getTopLayout() {
return this.getBackupParent().getTopLayout();
}
}

178
designer_form/src/com/fr/design/mainframe/EditingMouseListener.java

@ -1,9 +1,6 @@
package com.fr.design.mainframe;
import java.awt.Color;
import java.awt.Container;
import java.awt.Cursor;
import java.awt.Rectangle;
import java.awt.*;
import java.awt.event.MouseEvent;
import javax.swing.*;
@ -18,12 +15,7 @@ import com.fr.design.designer.beans.location.Direction;
import com.fr.design.designer.beans.location.Location;
import com.fr.design.designer.beans.models.SelectionModel;
import com.fr.design.designer.beans.models.StateModel;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.designer.creator.XEditorHolder;
import com.fr.design.designer.creator.XElementCase;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.creator.*;
import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.xpane.ToolTipEditor;
@ -46,6 +38,10 @@ public class EditingMouseListener extends MouseInputAdapter {
*/
private StateModel stateModel;
private XLayoutContainer xTopLayoutContainer;
private XLayoutContainer clickTopLayout;
/**
* 获取表单设计器
*
@ -84,10 +80,14 @@ public class EditingMouseListener extends MouseInputAdapter {
private int minDragSize = 5;
private int minMoveSize = 8;
private static final int EDIT_BTN_WIDTH = 60;
private static final int EDIT_BTN_HEIGHT = 24;
//报表块的编辑按钮不灵敏,范围扩大一点
private static final int GAP = 10;
private XElementCase xElementCase;
private XChartEditor xChartEditor;
private JWindow promptWindow = new JWindow();
@ -244,6 +244,12 @@ public class EditingMouseListener extends MouseInputAdapter {
*/
public void mouseMoved(MouseEvent e) {
XCreator component = designer.getComponentAt(e);
setCoverPaneNotDisplay();
if(processTopLayoutMouseMove(component, e)){
return;
}
if (component instanceof XEditorHolder) {
XEditorHolder xcreator = (XEditorHolder) component;
Rectangle rect = xcreator.getBounds();
@ -267,17 +273,15 @@ public class EditingMouseListener extends MouseInputAdapter {
if (!BaseUtils.isAuthorityEditing()) {
stateModel.setDirection(dir);
}
if(xElementCase != null){
xElementCase.displayCoverPane(false);
}
if (component.isReport()) {
xElementCase = (XElementCase)component;
UIButton button = (UIButton)xElementCase.getCoverPane().getComponent(0);
if(designer.getCursor().getType() ==Cursor.HAND_CURSOR) {
designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
} // component.getParent() 是报表块所在的XWTitleLayout
int minX = button.getX() + component.getX() + component.getParent().getX() - designer.getArea().getHorizontalValue();
int minY = button.getY() + component.getY() + component.getParent().getY() + designer.getParaHeight() - designer.getArea().getVerticalValue();
int minX = button.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue();
int minY = button.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue();
if(e.getX() + GAP > minX && e.getX() - GAP < minX + button.getWidth()){
if( e.getY() + GAP > minY && e.getY() - GAP < minY + button.getHeight()){
designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
@ -285,16 +289,86 @@ public class EditingMouseListener extends MouseInputAdapter {
}
xElementCase.displayCoverPane(true);
xElementCase.setDirections(Direction.TOP_BOTTOM_LEFT_RIGHT);
designer.repaint();
} else {
if(xElementCase != null){
xElementCase.displayCoverPane(false);
designer.repaint();
}
return;
}
processChartEditorMouseMove(component, e);
designer.repaint();
}
/**
private void setCoverPaneNotDisplay(){
if (xElementCase != null){
xElementCase.displayCoverPane(false);
}
if (xChartEditor != null){
xChartEditor.displayCoverPane(false);
}
if (xTopLayoutContainer != null) {
xTopLayoutContainer.setMouseEnter(false);
}
designer.repaint();
}
private boolean processTopLayoutMouseMove(XCreator component, MouseEvent e){
XLayoutContainer parent = XCreatorUtils.getHotspotContainer(component).getTopLayout();
if (parent != null){
xTopLayoutContainer = parent;
xTopLayoutContainer.setMouseEnter(true);
designer.repaint();
if(!xTopLayoutContainer.isEditable()) {
if (designer.getCursor().getType() == Cursor.HAND_CURSOR) {
designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
int minX = getParentPositionX(parent, parent.getX()) + parent.getWidth() / 2;
int minY = getParentPositionY(parent, parent.getY()) + parent.getHeight() / 2;
int offsetX = EDIT_BTN_WIDTH / 2 + GAP;
int offsetY = EDIT_BTN_HEIGHT / 2 + GAP;
if (e.getX() > (minX - offsetX) && e.getX() < (minX + offsetX)) {
if (e.getY() > (minY - offsetY) && e.getY() < (minY + offsetY + designer.getParaHeight())) {
designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
}
}
return true;
}
}
return false;
}
private void processChartEditorMouseMove(XCreator component, MouseEvent e){
if (component instanceof XChartEditor) {
xChartEditor = (XChartEditor)component;
UIButton button = (UIButton)xChartEditor.getCoverPane().getComponent(0);
if(designer.getCursor().getType() ==Cursor.HAND_CURSOR) {
designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
int minX = button.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue();
int minY = button.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue();
if(e.getX() + GAP > minX && e.getX() - GAP < minX + button.getWidth()){
if( e.getY() + GAP > minY && e.getY() - GAP < minY + button.getHeight()){
designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
}
}
xChartEditor.displayCoverPane(true);
xChartEditor.setDirections(Direction.TOP_BOTTOM_LEFT_RIGHT);
designer.repaint();
}
}
private int getParentPositionX(XCreator comp, int x){
return comp.getParent() == null ?
x : getParentPositionX((XCreator)comp.getParent(), comp.getParent().getX() + x);
}
private int getParentPositionY(XCreator comp, int y) {
return comp.getParent() == null ?
y : getParentPositionY((XCreator) comp.getParent(), comp.getParent().getY() + y);
}
/**
* 拖拽
* @param e 鼠标事件
*/
@ -342,6 +416,58 @@ public class EditingMouseListener extends MouseInputAdapter {
designer.repaint();
}
//当前编辑的组件是在布局中,鼠标点击布局外部,需要一次性将布局及其父布局都置为不可编辑
private void setTopLayoutUnEditable(XLayoutContainer clickedTopLayout, XLayoutContainer clickingTopLayout){
//双击的前后点击click为相同对象,过滤掉
if (clickedTopLayout == null || clickedTopLayout == clickingTopLayout){
return;
}
//位于同一层级的控件,父布局相同,过滤掉
if (clickingTopLayout != null && clickedTopLayout.getParent() == clickingTopLayout.getParent()){
return;
}
//前后点击的位于不同层级,要置为不可编辑
XLayoutContainer xLayoutContainer = (XLayoutContainer)clickedTopLayout.getParent();
if (xLayoutContainer == clickingTopLayout){
return;
}
if (xLayoutContainer != null){
xLayoutContainer.setEditable(false);
setTopLayoutUnEditable((XLayoutContainer) clickedTopLayout.getParent(), clickingTopLayout);
}
}
private boolean isCreatorInLayout(XCreator creator, XCreator layout){
if (creator == layout){
return true;
}
if(layout.getParent() != null){
return isCreatorInLayout(creator, (XCreator)layout.getParent());
}
return false;
}
private XCreator processTopLayoutMouseClick(XCreator creator){
XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer(creator).getTopLayout();
if(topLayout != null){
if (clickTopLayout != null && clickTopLayout != topLayout && !isCreatorInLayout(clickTopLayout, topLayout)){
clickTopLayout.setEditable(false);
setTopLayoutUnEditable(clickTopLayout, topLayout);
}
clickTopLayout = topLayout;
if(!topLayout.isEditable()) {
creator = topLayout;
}
}
else{
if(clickTopLayout != null){
clickTopLayout.setEditable(false);
setTopLayoutUnEditable(clickTopLayout, null);
}
}
return creator;
}
/**
* 点击
* @param e 鼠标事件
@ -351,6 +477,9 @@ public class EditingMouseListener extends MouseInputAdapter {
return;
}
XCreator creator = designer.getComponentAt(e);
creator = processTopLayoutMouseClick(creator);
if(creator != null){
creator.respondClick(this, e);
}
@ -368,10 +497,9 @@ public class EditingMouseListener extends MouseInputAdapter {
if (designer.getCursor().getType() != Cursor.DEFAULT_CURSOR) {
designer.setCursor(Cursor.getDefaultCursor());
}
if (xElementCase != null){
xElementCase.displayCoverPane(false);
designer.repaint();
}
setCoverPaneNotDisplay();
cancelPromptWidgetForbidEnter();
}

7
designer_form/src/com/fr/design/mainframe/FormCreatorDropTarget.java

@ -9,6 +9,7 @@ import java.awt.dnd.DropTarget;
import java.awt.dnd.DropTargetDragEvent;
import java.awt.dnd.DropTargetDropEvent;
import java.awt.dnd.DropTargetEvent;
import java.util.ArrayList;
import javax.swing.BorderFactory;
import javax.swing.JWindow;
@ -85,8 +86,12 @@ public class FormCreatorDropTarget extends DropTarget {
if (success) {
// 如果添加成功,则触发相应事件
XCreator xCreator = container.acceptType(XWParameterLayout.class) ? designer.getParaComponent() : designer.getRootComponent();
//SetSelection时要确保选中的是最顶层的布局
//tab布局添加的时候是初始化了XWCardLayout,实际上最顶层的布局是XWCardMainBorderLayout
XCreator addingXCreator = addingModel.getXCreator();
Widget widget = (addingXCreator.getTopLayout() != null) ? (addingXCreator.getTopLayout().toData()) : addingXCreator.toData();
designer.getSelectionModel().setSelectedCreators(
FormSelectionUtils.rebuildSelection(xCreator, new Widget[]{addingModel.getXCreator().toData()}));
FormSelectionUtils.rebuildSelection(xCreator, new Widget[]{widget}));
designer.getEditListenerTable().fireCreatorModified(addingModel.getXCreator(), DesignerEvent.CREATOR_ADDED);
} else {
Toolkit.getDefaultToolkit().beep();

Loading…
Cancel
Save