From ed012834febadc4139d025c03e30a9da5610463f Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Fri, 13 May 2016 15:00:16 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/ExtraDesignClassManager.java | 45 ++++++++----------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/designer_base/src/com/fr/design/ExtraDesignClassManager.java b/designer_base/src/com/fr/design/ExtraDesignClassManager.java index 76d5d88afb..81a2ed01dc 100644 --- a/designer_base/src/com/fr/design/ExtraDesignClassManager.java +++ b/designer_base/src/com/fr/design/ExtraDesignClassManager.java @@ -130,9 +130,17 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi private Set elementUIProviders; - private Set widgetAttrProviders; + private Set widgetAttrProviders; - private Set exportAttrTabProviders; + private WidgetDesignHandler widgetDesignHandler; + + public WidgetDesignHandler getWidgetDesignHandler() { + return widgetDesignHandler; + } + + public void setWidgetDesignHandler(Level level, PluginSimplify simplify) throws Exception { + widgetDesignHandler = (WidgetDesignHandler) level; + } public TableDataTreePaneProcessor getTableDataTreePaneProcessor() { return tableDataTreePaneProcessor; @@ -740,34 +748,19 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi elementUIProviders.add((ElementUIProvider) level); } - public WidgetPropertyUIProvider[] getWidgetAttrProviders() { + public WidgetAttrProvider[] getWidgetAttrProviders() { if (widgetAttrProviders == null) { - return new WidgetPropertyUIProvider[0]; + return new WidgetAttrProvider[0]; } - return widgetAttrProviders.toArray(new WidgetPropertyUIProvider[widgetAttrProviders.size()]); + return widgetAttrProviders.toArray(new WidgetAttrProvider[widgetAttrProviders.size()]); } public void addWidgetAttrProvider(Level level, PluginSimplify simplify) throws Exception { if (widgetAttrProviders == null) { - widgetAttrProviders = new HashSet(); - } - validAPILevel(level, WidgetPropertyUIProvider.CURRENT_LEVEL, simplify.getPluginName()); - widgetAttrProviders.add((WidgetPropertyUIProvider) level); - } - - public ExportAttrTabProvider[] getExportAttrTabProviders() { - if (exportAttrTabProviders == null) { - return new ExportAttrTabProvider[0]; - } - return exportAttrTabProviders.toArray(new ExportAttrTabProvider[exportAttrTabProviders.size()]); - } - - public void addExportAttrTabProvider(Level level, PluginSimplify simplify) throws Exception { - if (exportAttrTabProviders == null) { - exportAttrTabProviders = new HashSet(); + widgetAttrProviders = new HashSet(); } - validAPILevel(level, ExportAttrTabProvider.CURRENT_LEVEL, simplify.getPluginName()); - exportAttrTabProviders.add((ExportAttrTabProvider) level); + validAPILevel(level, WidgetAttrProvider.CURRENT_LEVEL, simplify.getPluginName()); + widgetAttrProviders.add((WidgetAttrProvider) level); } /** @@ -862,10 +855,10 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi setTableDataSourceOPProcessor(impl, simplify); } else if (tagName.equals(ElementUIProvider.MARK_STRING)) { addElementUIProvider(impl, simplify); - } else if (tagName.equals(WidgetPropertyUIProvider.XML_TAG)) { + } else if (tagName.equals(WidgetAttrProvider.XML_TAG)) { addWidgetAttrProvider(impl, simplify); - } else if (tagName.equals(ExportAttrTabProvider.XML_TAG)) { - addExportAttrTabProvider(impl, simplify); + } else if (tagName.equals(WidgetDesignHandler.XML_TAG)) { + setWidgetDesignHandler(impl, simplify); } } catch (PluginInvalidLevelException e) { PluginMessage.remindUpdate(e.getMessage()); From 73e45d17d224bf2619f28c90c9048255a693c12e Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Fri, 13 May 2016 15:00:37 +0800 Subject: [PATCH 2/8] 1 --- designer_base/src/com/fr/design/ExtraDesignClassManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/ExtraDesignClassManager.java b/designer_base/src/com/fr/design/ExtraDesignClassManager.java index 81a2ed01dc..07e64a3455 100644 --- a/designer_base/src/com/fr/design/ExtraDesignClassManager.java +++ b/designer_base/src/com/fr/design/ExtraDesignClassManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. */ package com.fr.design; From fe42842a54f30ae533289cb5ee88f724d37906a6 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Fri, 13 May 2016 15:00:52 +0800 Subject: [PATCH 3/8] 1 --- designer_base/src/com/fr/design/ExtraDesignClassManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/ExtraDesignClassManager.java b/designer_base/src/com/fr/design/ExtraDesignClassManager.java index 07e64a3455..81a2ed01dc 100644 --- a/designer_base/src/com/fr/design/ExtraDesignClassManager.java +++ b/designer_base/src/com/fr/design/ExtraDesignClassManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. */ package com.fr.design; From 0df8ff6097be91efefdc4a20546fc60325104016 Mon Sep 17 00:00:00 2001 From: neil Date: Fri, 27 May 2016 14:40:52 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/report/mobile/MobileRadioGroupPane.java | 4 ++-- .../src/com/fr/design/report/mobile/ReportMobileAttrPane.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java b/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java index 85cee58e8f..9e66389264 100644 --- a/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java +++ b/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java @@ -1,11 +1,11 @@ package com.fr.design.report.mobile; +import com.fr.base.mobile.MobileFitAttrState; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; -import com.fr.base.mobile.MobileFitAttrState; import com.fr.stable.StringUtils; import javax.swing.*; @@ -17,7 +17,7 @@ import java.util.List; /** * Created by Administrator on 2016/5/16/0016. */ -public class MobileRadioGroupPane extends BasicBeanPane{ +public class MobileRadioGroupPane extends BasicBeanPane { private List radioButtons = new ArrayList(); diff --git a/designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java b/designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java index 67f0ab825b..1cd04e8d03 100644 --- a/designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java +++ b/designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java @@ -1,10 +1,10 @@ package com.fr.design.report.mobile; +import com.fr.base.mobile.MobileFitAttrState; import com.fr.design.beans.BasicBeanPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.general.Inter; import com.fr.report.mobile.ElementCaseMobileAttr; -import com.fr.base.mobile.MobileFitAttrState; import javax.swing.*; import java.awt.*; @@ -12,7 +12,7 @@ import java.awt.*; /** * Created by Administrator on 2016/5/12/0012. */ -public class ReportMobileAttrPane extends BasicBeanPane{ +public class ReportMobileAttrPane extends BasicBeanPane { //横屏设置面板 private MobileRadioGroupPane horizionPane; From 9e607e097c683cdf2707ed181eb466343511d5a7 Mon Sep 17 00:00:00 2001 From: neil Date: Fri, 27 May 2016 15:23:07 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/ExtraDesignClassManager.java | 97 +++++++------------ .../mobile/ElementCasePropertyTable.java | 2 +- .../mobile/ElementCasePropertyUI.java | 2 +- .../mobile/MobileFitAlignmentItems.java | 2 +- .../properties/mobile/MobileFitEditor.java | 2 +- .../properties/mobile/MobileFitRender.java | 2 +- .../properties/mobile/MobileFitWrapper.java | 2 +- .../design/gui/xtable/PropertyGroupModel.java | 88 ++++++++--------- 8 files changed, 86 insertions(+), 111 deletions(-) diff --git a/designer_base/src/com/fr/design/ExtraDesignClassManager.java b/designer_base/src/com/fr/design/ExtraDesignClassManager.java index f191827c5b..009cff1c6e 100644 --- a/designer_base/src/com/fr/design/ExtraDesignClassManager.java +++ b/designer_base/src/com/fr/design/ExtraDesignClassManager.java @@ -126,11 +126,13 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi private DesignerEnvProcessor envProcessor; - private TableDataPaneProcessor tableDataPaneProcessor; + private TableDataTreePaneProcessor tableDataTreePaneProcessor; private Set elementUIProviders; - private Set widgetAttrProviders; + private Set widgetAttrProviders; + + private Set exportAttrTabProviders; private WidgetDesignHandler widgetDesignHandler; @@ -142,17 +144,13 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi widgetDesignHandler = (WidgetDesignHandler) level; } - private Set backgroundQuickUIProviders; - - private Set backgroundUIProviders; - - public TableDataPaneProcessor getTableDataPaneProcessor() { - return tableDataPaneProcessor; + public TableDataTreePaneProcessor getTableDataTreePaneProcessor() { + return tableDataTreePaneProcessor; } - public void setTableDataPaneProcessor(Level level, PluginSimplify simplify) { - validAPILevel(level, TableDataPaneProcessor.CURRENT_LEVEL, simplify.getPluginName()); - tableDataPaneProcessor = (TableDataPaneProcessor) level; + public void setTableDataSourceOPProcessor(Level level, PluginSimplify simplify) { + validAPILevel(level, TableDataTreePaneProcessor.CURRENT_LEVEL, simplify.getPluginName()); + tableDataTreePaneProcessor = (TableDataTreePaneProcessor) level; } public DesignerEnvProcessor getEnvProcessor() { @@ -752,49 +750,19 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi elementUIProviders.add((ElementUIProvider) level); } - public WidgetAttrProvider[] getWidgetAttrProviders() { + public WidgetPropertyUIProvider[] getWidgetAttrProviders() { if (widgetAttrProviders == null) { - return new WidgetAttrProvider[0]; + return new WidgetPropertyUIProvider[0]; } - return widgetAttrProviders.toArray(new WidgetAttrProvider[widgetAttrProviders.size()]); + return widgetAttrProviders.toArray(new WidgetPropertyUIProvider[widgetAttrProviders.size()]); } public void addWidgetAttrProvider(Level level, PluginSimplify simplify) throws Exception { if (widgetAttrProviders == null) { - widgetAttrProviders = new HashSet(); - } - validAPILevel(level, WidgetAttrProvider.CURRENT_LEVEL, simplify.getPluginName()); - widgetAttrProviders.add((WidgetAttrProvider) level); - } - - public BackgroundQuickUIProvider[] getBackgroundQuickUIProviders() { - if (backgroundQuickUIProviders == null) { - return new BackgroundQuickUIProvider[0]; - } - return backgroundQuickUIProviders.toArray(new BackgroundQuickUIProvider[backgroundQuickUIProviders.size()]); - } - - public void addBackgroundQuickUIProvider(Level level, PluginSimplify simplify) throws Exception { - if (backgroundQuickUIProviders == null) { - backgroundQuickUIProviders = new HashSet<>(); - } - validAPILevel(level, BackgroundQuickUIProvider.CURRENT_LEVEL, simplify.getPluginName()); - backgroundQuickUIProviders.add((BackgroundQuickUIProvider) level); - } - - public BackgroundUIProvider[] getBackgroundUIProviders() { - if (backgroundUIProviders == null) { - return new BackgroundUIProvider[0]; - } - return backgroundUIProviders.toArray(new BackgroundUIProvider[backgroundUIProviders.size()]); - } - - public void addBackgroundUIProvider(Level level, PluginSimplify simplify) throws Exception { - if (backgroundUIProviders == null) { - backgroundUIProviders = new HashSet<>(); + widgetAttrProviders = new HashSet(); } - validAPILevel(level, BackgroundUIProvider.CURRENT_LEVEL, simplify.getPluginName()); - backgroundUIProviders.add((BackgroundUIProvider) level); + validAPILevel(level, WidgetPropertyUIProvider.CURRENT_LEVEL, simplify.getPluginName()); + widgetAttrProviders.add((WidgetPropertyUIProvider) level); } /** @@ -851,8 +819,6 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi readWidgetRelated(tagName, impl, simplify); //数据集, 数据连接 readTableDataRelated(tagName, className, simplify); - // 样式相关的 - readStyleRelated(tagName, impl, simplify); if (tagName.equals(ParameterWidgetOptionProvider.XML_TAG)) { addParameterWidgetOption(impl, simplify); } else if (tagName.equals(PreviewProvider.MARK_STRING)) { @@ -887,14 +853,16 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi addSupportDesignApps(impl, simplify); } else if (tagName.equals(DesignerEnvProcessor.XML_TAG)) { setEnvProcessor(impl, simplify); - } else if (tagName.equals(TableDataPaneProcessor.XML_TAG)) { - setTableDataPaneProcessor(impl, simplify); + } else if (tagName.equals(TableDataTreePaneProcessor.XML_TAG)) { + setTableDataSourceOPProcessor(impl, simplify); } else if (tagName.equals(ElementUIProvider.MARK_STRING)) { addElementUIProvider(impl, simplify); - } else if (tagName.equals(WidgetAttrProvider.XML_TAG)) { - addWidgetAttrProvider(impl, simplify); } else if (tagName.equals(WidgetDesignHandler.XML_TAG)) { setWidgetDesignHandler(impl, simplify); + }else if (tagName.equals(WidgetPropertyUIProvider.XML_TAG)) { + addWidgetAttrProvider(impl, simplify); + } else if (tagName.equals(ExportAttrTabProvider.XML_TAG)) { + addExportAttrTabProvider(impl, simplify); } } catch (PluginInvalidLevelException e) { PluginMessage.remindUpdate(e.getMessage()); @@ -903,6 +871,21 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi } } + public ExportAttrTabProvider[] getExportAttrTabProviders() { + if (exportAttrTabProviders == null) { + return new ExportAttrTabProvider[0]; + } + return exportAttrTabProviders.toArray(new ExportAttrTabProvider[exportAttrTabProviders.size()]); + } + + public void addExportAttrTabProvider(Level level, PluginSimplify simplify) throws Exception { + if (exportAttrTabProviders == null) { + exportAttrTabProviders = new HashSet(); + } + validAPILevel(level, ExportAttrTabProvider.CURRENT_LEVEL, simplify.getPluginName()); + exportAttrTabProviders.add((ExportAttrTabProvider) level); + } + private void readTableDataRelated(String tagName, String className, PluginSimplify simplify) { if (tagName.equals(TableDataCreatorProvider.XML_TAG)) { setTableDataCreatorProvider(className); @@ -927,14 +910,6 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi } } - private void readStyleRelated(String tagName, Level impl, PluginSimplify simplify) throws Exception { - if (tagName.equals(BackgroundQuickUIProvider.MARK_STRING)) { - addBackgroundQuickUIProvider(impl, simplify); - } else if (tagName.equals(BackgroundUIProvider.MARK_STRING)) { - addBackgroundUIProvider(impl, simplify); - } - } - /** * 写xml * diff --git a/designer_form/src/com/fr/design/designer/properties/mobile/ElementCasePropertyTable.java b/designer_form/src/com/fr/design/designer/properties/mobile/ElementCasePropertyTable.java index 7e37fefc3a..06e2a520e1 100644 --- a/designer_form/src/com/fr/design/designer/properties/mobile/ElementCasePropertyTable.java +++ b/designer_form/src/com/fr/design/designer/properties/mobile/ElementCasePropertyTable.java @@ -18,7 +18,7 @@ import java.util.ArrayList; /** * Created by Administrator on 2016/5/16/0016. */ -public class ElementCasePropertyTable extends AbstractPropertyTable{ +public class ElementCasePropertyTable extends AbstractPropertyTable { private XCreator xCreator; private FormDesigner designer; diff --git a/designer_form/src/com/fr/design/designer/properties/mobile/ElementCasePropertyUI.java b/designer_form/src/com/fr/design/designer/properties/mobile/ElementCasePropertyUI.java index 5e7721a2e6..ac0ba0094d 100644 --- a/designer_form/src/com/fr/design/designer/properties/mobile/ElementCasePropertyUI.java +++ b/designer_form/src/com/fr/design/designer/properties/mobile/ElementCasePropertyUI.java @@ -9,7 +9,7 @@ import com.fr.general.Inter; /** * Created by Administrator on 2016/5/16/0016. */ -public class ElementCasePropertyUI extends AbstractWidgetPropertyUIProvider{ +public class ElementCasePropertyUI extends AbstractWidgetPropertyUIProvider { private XCreator xCreator; diff --git a/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitAlignmentItems.java b/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitAlignmentItems.java index 094249bf50..552589b71a 100644 --- a/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitAlignmentItems.java +++ b/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitAlignmentItems.java @@ -4,7 +4,7 @@ import com.fr.base.mobile.MobileFitAttrState; import com.fr.design.designer.properties.items.Item; import com.fr.design.designer.properties.items.ItemProvider; -public class MobileFitAlignmentItems implements ItemProvider{ +public class MobileFitAlignmentItems implements ItemProvider { private static Item[] VALUE_ITEMS; diff --git a/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitEditor.java b/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitEditor.java index 6591b90592..97c6938fc5 100644 --- a/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitEditor.java +++ b/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitEditor.java @@ -6,7 +6,7 @@ import com.fr.design.mainframe.widget.editors.ComboEditor; import java.util.Vector; -public class MobileFitEditor extends ComboEditor{ +public class MobileFitEditor extends ComboEditor { public MobileFitEditor() { this(new MobileFitAlignmentItems()); } diff --git a/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitRender.java b/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitRender.java index 6f560e4e36..e8932459ba 100644 --- a/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitRender.java +++ b/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitRender.java @@ -2,7 +2,7 @@ package com.fr.design.designer.properties.mobile; import com.fr.design.mainframe.widget.renderer.EncoderCellRenderer; -public class MobileFitRender extends EncoderCellRenderer{ +public class MobileFitRender extends EncoderCellRenderer { public MobileFitRender(){ super(new MobileFitWrapper()); diff --git a/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitWrapper.java b/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitWrapper.java index 164bcc5c06..2e4c219b97 100644 --- a/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitWrapper.java +++ b/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitWrapper.java @@ -2,7 +2,7 @@ package com.fr.design.designer.properties.mobile; import com.fr.design.designer.properties.ItemWrapper; -public class MobileFitWrapper extends ItemWrapper{ +public class MobileFitWrapper extends ItemWrapper { public MobileFitWrapper(){ super(new MobileFitAlignmentItems()); } diff --git a/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java b/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java index 143176553c..8e8cadad14 100644 --- a/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java +++ b/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java @@ -17,16 +17,16 @@ import java.lang.reflect.Method; import java.util.ArrayList; public class PropertyGroupModel extends AbstractPropertyGroupModel { - - private FormDesigner designer; + + private FormDesigner designer; public PropertyGroupModel(String name, XCreator creator, CRPropertyDescriptor[] propArray, - FormDesigner designer) { - super(name, creator, propArray); - this.designer = designer; - } + FormDesigner designer) { + super(name, creator, propArray); + this.designer = designer; + } - @Override + @Override public Object getValue(int row, int column) { if (column == 0) { return properties[row].getDisplayName(); @@ -49,9 +49,9 @@ public class PropertyGroupModel extends AbstractPropertyGroupModel { try { Method m = properties[row].getWriteMethod(); m.invoke(dealCreatorData(), value); - //属性名称为控件名时,单独处理下 + //属性名称为控件名时,单独处理下 if(ComparatorUtils.equals(FormConstants.NAME, properties[row].getName())){ - creator.resetCreatorName(value.toString()); + creator.resetCreatorName(value.toString()); } properties[row].firePropertyChanged(); return true; @@ -103,49 +103,49 @@ public class PropertyGroupModel extends AbstractPropertyGroupModel { PROPERTIES.add("Properties"); PROPERTIES.add("Others"); } - + /** * 控件属性赋值和取值时,针对scale和title做下处理 * @return */ private Object dealCreatorData() { - return creator.getPropertyDescriptorCreator().toData(); + return creator.getPropertyDescriptorCreator().toData(); } - - @Override - protected void initEditor(final int row) throws Exception { - ExtendedPropertyEditor editor = (ExtendedPropertyEditor) properties[row].createPropertyEditor(dealCreatorData()); - if (editor == null) { - Class propType = properties[row].getPropertyType(); - editor = TableUtils.getPropertyEditorClass(propType).newInstance(); - } - if (editor != null) { - final ExtendedPropertyEditor extendEditor = editor; - editors[row] = new PropertyCellEditor(editor); - extendEditor.addPropertyChangeListener(new PropertyChangeListener() { - - @Override - public void propertyChange(PropertyChangeEvent evt) { - if(ComparatorUtils.equals(extendEditor.getValue(),getValue(row,1))) { - return; - } - if (extendEditor.refreshInTime()) { - editors[row].stopCellEditing(); - } else { - setValue(extendEditor.getValue(), row, 1); + + @Override + protected void initEditor(final int row) throws Exception { + ExtendedPropertyEditor editor = (ExtendedPropertyEditor) properties[row].createPropertyEditor(dealCreatorData()); + if (editor == null) { + Class propType = properties[row].getPropertyType(); + editor = TableUtils.getPropertyEditorClass(propType).newInstance(); + } + if (editor != null) { + final ExtendedPropertyEditor extendEditor = editor; + editors[row] = new PropertyCellEditor(editor); + extendEditor.addPropertyChangeListener(new PropertyChangeListener() { + + @Override + public void propertyChange(PropertyChangeEvent evt) { + if(ComparatorUtils.equals(extendEditor.getValue(),getValue(row,1))) { + return; + } + if (extendEditor.refreshInTime()) { + editors[row].stopCellEditing(); + } else { + setValue(extendEditor.getValue(), row, 1); if (designer == null) { return; } - if ("widgetName".equals(properties[row].getName())) { - designer.getEditListenerTable().fireCreatorModified(creator, DesignerEvent.CREATOR_RENAMED); - } else { - designer.fireTargetModified(); - } - designer.refreshDesignerUI(); - } - } - }); - } - } + if ("widgetName".equals(properties[row].getName())) { + designer.getEditListenerTable().fireCreatorModified(creator, DesignerEvent.CREATOR_RENAMED); + } else { + designer.fireTargetModified(); + } + designer.refreshDesignerUI(); + } + } + }); + } + } } \ No newline at end of file From b5588b54d37a1f82ab732c235ebf084e93319d12 Mon Sep 17 00:00:00 2001 From: neil Date: Fri, 27 May 2016 15:23:44 +0800 Subject: [PATCH 6/8] 1 --- .../src/com/fr/design/gui/xtable/PropertyGroupModel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java b/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java index 8e8cadad14..8918d857d0 100644 --- a/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java +++ b/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java @@ -105,7 +105,7 @@ public class PropertyGroupModel extends AbstractPropertyGroupModel { } /** - * 控件属性赋值和取值时,针对scale和title做下处理 + * 控件属性赋值和取值时,针对scale和title做下处理 * @return */ private Object dealCreatorData() { From b1c040aff4e7f7f63c33a227ce20cb6b21b4f064 Mon Sep 17 00:00:00 2001 From: neil Date: Fri, 27 May 2016 15:23:53 +0800 Subject: [PATCH 7/8] 1 --- .../src/com/fr/design/gui/xtable/PropertyGroupModel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java b/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java index 8918d857d0..8e8cadad14 100644 --- a/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java +++ b/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java @@ -105,7 +105,7 @@ public class PropertyGroupModel extends AbstractPropertyGroupModel { } /** - * 控件属性赋值和取值时,针对scale和title做下处理 + * 控件属性赋值和取值时,针对scale和title做下处理 * @return */ private Object dealCreatorData() { From 8ce32a4fffdb348e71f7a1d186a62245713b1d5c Mon Sep 17 00:00:00 2001 From: neil Date: Fri, 27 May 2016 15:51:20 +0800 Subject: [PATCH 8/8] 1 --- .../src/com/fr/design/condition/LiteConditionPane.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer_base/src/com/fr/design/condition/LiteConditionPane.java b/designer_base/src/com/fr/design/condition/LiteConditionPane.java index 5c5eea0fff..a32a112396 100644 --- a/designer_base/src/com/fr/design/condition/LiteConditionPane.java +++ b/designer_base/src/com/fr/design/condition/LiteConditionPane.java @@ -517,6 +517,8 @@ public abstract class LiteConditionPane extends BasicBeanPa // formulaPane JPanel formulaPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + // 95106 公式区域限定宽高, 显示两行即可, 在新窗口编辑. + formulaPane.setPreferredSize(new Dimension(450, 40)); formulaConditionPane.add(formulaPane, BorderLayout.CENTER); formulaPane.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 2)); formulaPane.add(GUICoreUtils.createBorderPane(new UILabel(Inter.getLocText("FR-Designer_LiteCondition_Formula") + "="), BorderLayout.NORTH), BorderLayout.WEST);