From dd114fe443525c80cad394608157e6cd7b8a60b3 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 9 Oct 2017 12:07:14 +0800 Subject: [PATCH 01/35] =?UTF-8?q?REPORT-4983=20=E5=88=87=E6=8D=A2tab?= =?UTF-8?q?=E5=86=8D=E5=88=87=E5=9B=9E=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=9D=A2=E6=9D=BF=E6=B6=88=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../parameter/ParameterDefinitePane.java | 2 +- .../parameter/ParameterDesignerProvider.java | 3 +++ .../form/parameter/FormParaDesigner.java | 24 +++++++++---------- .../src/com/fr/design/mainframe/JForm.java | 6 ++--- .../parameter/ParameterPropertyPane.java | 16 +++++++------ .../parameter/ParameterToolBarPane.java | 2 -- 6 files changed, 28 insertions(+), 25 deletions(-) diff --git a/designer/src/com/fr/design/parameter/ParameterDefinitePane.java b/designer/src/com/fr/design/parameter/ParameterDefinitePane.java index 40c2aa466..4f8adabbb 100644 --- a/designer/src/com/fr/design/parameter/ParameterDefinitePane.java +++ b/designer/src/com/fr/design/parameter/ParameterDefinitePane.java @@ -298,7 +298,7 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus */ public void refreshParameter() { if (paraDesignEditor != null) { - paraDesignEditor.refreshParameter(this); + paraDesignEditor.refreshParameter(this, this.workBook); } } diff --git a/designer_base/src/com/fr/design/parameter/ParameterDesignerProvider.java b/designer_base/src/com/fr/design/parameter/ParameterDesignerProvider.java index e0d2ffb55..abd27f89b 100644 --- a/designer_base/src/com/fr/design/parameter/ParameterDesignerProvider.java +++ b/designer_base/src/com/fr/design/parameter/ParameterDesignerProvider.java @@ -3,6 +3,7 @@ package com.fr.design.parameter; import com.fr.base.Parameter; import com.fr.base.parameter.ParameterUI; import com.fr.design.mainframe.AuthorityEditPane; +import com.fr.design.mainframe.JTemplate; import javax.swing.*; import java.awt.*; @@ -31,6 +32,8 @@ public interface ParameterDesignerProvider { void refreshParameter(ParaDefinitePane paraDefinitePane); + void refreshParameter(ParaDefinitePane paraDefinitePane, JTemplate jt); + boolean isWithQueryButton(); java.util.List getAllXCreatorNameList(); diff --git a/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java b/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java index e84259fd8..cc100df8e 100644 --- a/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java +++ b/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java @@ -37,16 +37,7 @@ import com.fr.design.designer.creator.XWAbsoluteLayout; import com.fr.design.designer.creator.XWParameterLayout; import com.fr.design.designer.properties.FormWidgetAuthorityEditPane; import com.fr.design.form.util.XCreatorConstants; -import com.fr.design.mainframe.AuthorityEditPane; -import com.fr.design.mainframe.DesignerContext; -import com.fr.design.mainframe.EastRegionContainerPane; -import com.fr.design.mainframe.FormArea; -import com.fr.design.mainframe.FormDesigner; -import com.fr.design.mainframe.FormDesignerModeForSpecial; -import com.fr.design.mainframe.FormParaPane; -import com.fr.design.mainframe.FormWidgetDetailPane; -import com.fr.design.mainframe.WidgetPropertyPane; -import com.fr.design.mainframe.WidgetToolBarPane; +import com.fr.design.mainframe.*; import com.fr.design.parameter.ParaDefinitePane; import com.fr.design.parameter.ParameterDesignerProvider; import com.fr.design.parameter.ParameterPropertyPane; @@ -224,6 +215,16 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP * @param p 参数面板 */ public void refreshParameter(ParaDefinitePane p) { + refreshParameter(p, DesignerContext.getDesignerFrame().getSelectedJTemplate()); + } + + /** + * 刷新参数 + * + * @param p 参数面板 + * @param jt 当前模版 + */ + public void refreshParameter(ParaDefinitePane p, JTemplate jt) { XLayoutContainer rootContainer = this.getRootComponent(); java.util.List namelist = getAllXCreatorNameList(rootContainer); // parameterArray是报表的所有参数, nameList是已经在参数面板添加过控件的参数名 @@ -240,8 +241,7 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP } ParameterPropertyPane.getInstance().getParameterToolbarPane().populateBean( p.getParameterArray() == null ? new Parameter[0] : p.getParameterArray()); - EastRegionContainerPane.getInstance().setParameterHeight(ParameterPropertyPane.getInstance().getPreferredSize().height); - + ParameterPropertyPane.getInstance().refreshState(jt); } /** diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index 79b4ccc96..650c5fb3e 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -328,10 +328,10 @@ public class JForm extends JTemplate implements BaseJForm { private void setPropertyPaneChange(XComponent comp) { if (comp == null) { - ParameterPropertyPane.getInstance().setAddParaPaneVisible(false); + ParameterPropertyPane.getInstance().setAddParaPaneVisible(false, this); return; } - ParameterPropertyPane.getInstance().setAddParaPaneVisible(comp instanceof XWParameterLayout); + ParameterPropertyPane.getInstance().setAddParaPaneVisible(comp instanceof XWParameterLayout, this); editingComponent = comp.createToolPane(this, formDesign); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.FORM); if (BaseUtils.isAuthorityEditing()) { @@ -718,7 +718,7 @@ public class JForm extends JTemplate implements BaseJForm { EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.FORM); EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(WidgetPropertyPane.getInstance(formDesign)); ParameterPropertyPane parameterPropertyPane = ParameterPropertyPane.getInstance(formDesign); - parameterPropertyPane.setAddParaPaneVisible(false); + parameterPropertyPane.setAddParaPaneVisible(false, this); EastRegionContainerPane.getInstance().addParameterPane(parameterPropertyPane); EastRegionContainerPane.getInstance().setParameterHeight(parameterPropertyPane.getPreferredSize().height); diff --git a/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java b/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java index 43e840823..c74933344 100644 --- a/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java +++ b/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java @@ -4,10 +4,7 @@ import com.fr.design.constants.UIConstants; import com.fr.design.designer.creator.XWParameterLayout; import com.fr.design.dialog.BasicScrollPane; import com.fr.design.gui.ibutton.UIButton; -import com.fr.design.mainframe.DesignerContext; -import com.fr.design.mainframe.FormDesigner; -import com.fr.design.mainframe.FormHierarchyTreePane; -import com.fr.design.mainframe.JForm; +import com.fr.design.mainframe.*; import javax.swing.*; import java.awt.*; @@ -87,18 +84,23 @@ public class ParameterPropertyPane extends JPanel{ } // 显示或隐藏添加参数面板 + public void refreshState(JTemplate jt) { + setAddParaPaneVisible(toolbarPane.hasSelectedLabelItem(), jt); + } + + // 显示或隐藏添加参数面板 public void refreshState() { - setAddParaPaneVisible(toolbarPane.hasSelectedLabelItem()); + refreshState(DesignerContext.getDesignerFrame().getSelectedJTemplate()); } - public void setAddParaPaneVisible(boolean isVisible) { + public void setAddParaPaneVisible(boolean isVisible, JTemplate jt) { if (isVisible == addParaPane.isVisible() || formHierarchyTreePaneWrapper == null) { return; } // 表单中,只有添加并选中参数面板时,才显示 boolean hideInJForm; try { - hideInJForm = DesignerContext.getDesignerFrame().getSelectedJTemplate() instanceof JForm && + hideInJForm = jt instanceof JForm && !(FormHierarchyTreePane.getInstance().getComponentTree().getSelectionPath().getLastPathComponent() instanceof XWParameterLayout); } catch (NullPointerException ex) { hideInJForm = true; diff --git a/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java b/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java index 16fc6ce04..daac4c2db 100644 --- a/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java +++ b/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java @@ -82,7 +82,6 @@ public class ParameterToolBarPane extends BasicBeanPane { this.add(label); if (parameterArray.length == 0) { - ParameterPropertyPane.getInstance().refreshState(); this.setVisible(false); this.repaint(); return; @@ -103,7 +102,6 @@ public class ParameterToolBarPane extends BasicBeanPane { this.add(addAll); this.doLayout(); - ParameterPropertyPane.getInstance().refreshState(); this.repaint(); } From dfee82505ecf038606bd4d248c457fec9b3102ad Mon Sep 17 00:00:00 2001 From: hzzz Date: Mon, 9 Oct 2017 14:37:24 +0800 Subject: [PATCH 02/35] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=A0=8F=E5=9B=BE?= =?UTF-8?q?=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/images/chart/ChartType.png | Bin 151 -> 138 bytes .../com/fr/plugin/chart/map/images/mapData.png | Bin 489 -> 493 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/designer_base/src/com/fr/design/images/chart/ChartType.png b/designer_base/src/com/fr/design/images/chart/ChartType.png index 504ca9484729be763d7f3445dd5d47ca7d0904a0..3bc69c74d0a68f802b0bd78cf2a08a279d14bee3 100644 GIT binary patch delta 96 zcmV-m0H6Pt0g3^TFa+o;`zAEfcaLa@Z6bz(R_x z*t|ut3n(@K>;-I2Bi3sayI|A+1_p}5fY{i=sSW@WhzuUpC0>I70000|I}3PKeC+k=}TDEG9fD>hs{EYChgV} zD6YC%ZNW&f3kKc*a2V8`_CfJmlj#<$A&xD)2Hp#!E?{7wI1I2wElFYkRTm5(_DYKr P00000NkvXXu0mjf6^twW diff --git a/designer_chart/src/com/fr/plugin/chart/map/images/mapData.png b/designer_chart/src/com/fr/plugin/chart/map/images/mapData.png index 12a9a0df0afcaf2dda93f34e099cb0f35a583579..118314825a15eafd9a43653a9c4b9e97b529e55b 100644 GIT binary patch delta 467 zcmV;^0WALM1MLHlB!2;OQb$4nuFf3k0004}Nklu|M`GfpUgG5wL3+85wp1 z*{4KBMVq&8-~N*Ys$Ed)BXj<9CNGr+L8&&0%V5U7?Dq#hgwFpZGF`s)acO;ey> z1%ZL)2UY~O8LW9HP>hd}k?|cfGn3-UlP5o+7yvT}L<3_c?BBotD}i>@vam4i0on}H z{0XSp9jN&PNFC0UsHmv;=It;W~7))q0ie``jI9&je1OcE+qJb`1 z0%SgCVPOt}*$kEh67ZA=6F{edHk&gsF~%qH-iudKvHkz=$R( z0HhLt5)*J}ZU9pCQ0@mHe!zqzSpcNo193l)?SR7p`bcb$Wq$&UK*a_?h5``JhYEtg z10W6ry5s_y1^q0){xfiX{>$)Lm<1%ffD!5^TmagqZ|^3pg;ykBQ)Lv zfp`Km1|9%4f54_097QZ}7hq3`{|~Ex{fEtam)L|Dp0aQs05TT>EndKc&44$2Df6*u zzQQK>0jL?|%0{S5vAf{*ojd>ezVBub`_PM``7sNRB1kCxBdcXW*F0(RWP?wiJ~1%x zxq|snLlS|SKcH*I1rjthHU9%$u^)*0Kc3ACz^51>zyRUzoN|sY--Q4G002ovPDHLk FV1i2*!La}U From a1512c47492b879dd004286b305a1c2a3de27a19 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 9 Oct 2017 15:10:20 +0800 Subject: [PATCH 03/35] =?UTF-8?q?REPORT-4883=20=E6=A8=A1=E6=9D=BF=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=8E=A7=E4=BB=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/FormDesigner.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormDesigner.java b/designer_form/src/com/fr/design/mainframe/FormDesigner.java index 7572cc204..98bfbfeb4 100644 --- a/designer_form/src/com/fr/design/mainframe/FormDesigner.java +++ b/designer_form/src/com/fr/design/mainframe/FormDesigner.java @@ -257,7 +257,7 @@ public class FormDesigner extends TargetComponent
implements TreeSelection currentIndex++; parameterArray = (Parameter[]) ArrayUtils.removeElement(parameterArray, parameter); refreshParameter(); - EastRegionContainerPane.getInstance().refreshDownPane(); + fireTargetModified(); } /** @@ -301,7 +301,7 @@ public class FormDesigner extends TargetComponent implements TreeSelection currentIndex = currentIndex + NUM_IN_A_LINE - currentIndex % NUM_IN_A_LINE; parameterArray = (Parameter[]) ArrayUtils.removeElement(parameterArray, parameter); refreshParameter(); - EastRegionContainerPane.getInstance().refreshDownPane(); + fireTargetModified(); } /** @@ -667,9 +667,8 @@ public class FormDesigner extends TargetComponent implements TreeSelection // 只有选择组件时不触发模版更新,其他都要触发 if (evt.getCreatorEventID() != DesignerEvent.CREATOR_SELECTED) { FormDesigner.this.fireTargetModified(); - //bug59192 - //setParameterArray(getNoRepeatParas(getTarget().getParameters())); - //refreshParameter(); + setParameterArray(getNoRepeatParas(getTarget().getParameters())); + refreshParameter(); } } From 9b8ef8b06aeeca238b99384f8709076671ae5826 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Mon, 9 Oct 2017 15:24:37 +0800 Subject: [PATCH 04/35] =?UTF-8?q?REPORT-4944=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E5=85=83=E7=B4=A0=E3=80=81=E6=82=AC?= =?UTF-8?q?=E6=B5=AE=E5=85=83=E7=B4=A0=E3=80=81=E8=81=9A=E5=90=88=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E7=9A=84=E5=9B=BE=E8=A1=A8=E9=85=8D=E7=BD=AE=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/module/DesignerModule.java | 828 +++++++++--------- .../fr/poly/creator/ChartBlockCreator.java | 320 ++++--- .../com/fr/quickeditor/ChartQuickEditor.java | 54 -- .../chartquick/BasicChartQuickEditor.java | 56 ++ .../chartquick/FloatChartQuickEditor.java | 34 + .../chartquick/PolyChartQuickEditor.java | 31 + .../fr/design/actions/core/ActionFactory.java | 6 +- 7 files changed, 693 insertions(+), 636 deletions(-) delete mode 100644 designer/src/com/fr/quickeditor/ChartQuickEditor.java create mode 100644 designer/src/com/fr/quickeditor/chartquick/BasicChartQuickEditor.java create mode 100644 designer/src/com/fr/quickeditor/chartquick/FloatChartQuickEditor.java create mode 100644 designer/src/com/fr/quickeditor/chartquick/PolyChartQuickEditor.java diff --git a/designer/src/com/fr/design/module/DesignerModule.java b/designer/src/com/fr/design/module/DesignerModule.java index 6cdbea4e5..c037267fb 100644 --- a/designer/src/com/fr/design/module/DesignerModule.java +++ b/designer/src/com/fr/design/module/DesignerModule.java @@ -1,415 +1,415 @@ -package com.fr.design.module; - -import com.fr.base.*; -import com.fr.base.io.XMLEncryptUtils; -import com.fr.base.process.ProcessOperator; -import com.fr.base.remote.RemoteDeziConstants; -import com.fr.design.DesignerEnvManager; -import com.fr.design.ExtraDesignClassManager; -import com.fr.design.actions.core.ActionFactory; -import com.fr.design.actions.insert.cell.*; -import com.fr.design.actions.insert.flot.ChartFloatAction; -import com.fr.design.actions.insert.flot.FormulaFloatAction; -import com.fr.design.actions.insert.flot.ImageFloatAction; -import com.fr.design.actions.insert.flot.TextBoxFloatAction; -import com.fr.design.actions.server.StyleListAction; -import com.fr.design.fun.ElementUIProvider; -import com.fr.design.gui.ibutton.UIButton; -import com.fr.design.gui.ilable.UILabel; -import com.fr.design.javascript.ProcessTransitionAdapter; -import com.fr.design.mainframe.*; -import com.fr.design.mainframe.bbs.BBSGuestPane; -import com.fr.design.mainframe.form.FormECCompositeProvider; -import com.fr.design.mainframe.form.FormECDesignerProvider; -import com.fr.design.mainframe.form.FormElementCaseDesigner; -import com.fr.design.mainframe.form.FormReportComponentComposite; -import com.fr.design.mainframe.loghandler.DesignerLogImpl; -import com.fr.design.parameter.WorkBookParameterReader; -import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.file.FILE; -import com.fr.general.*; -import com.fr.general.xml.GeneralXMLTools; -import com.fr.io.importer.Excel2007ReportImporter; -import com.fr.io.importer.ExcelReportImporter; -import com.fr.main.impl.WorkBook; -import com.fr.quickeditor.ChartQuickEditor; -import com.fr.quickeditor.cellquick.*; -import com.fr.quickeditor.floatquick.FloatImageQuickEditor; -import com.fr.quickeditor.floatquick.FloatStringQuickEditor; -import com.fr.report.cell.CellElementValueConverter; -import com.fr.report.cell.cellattr.core.RichText; -import com.fr.report.cell.cellattr.core.SubReport; -import com.fr.report.cell.cellattr.core.group.DSColumn; -import com.fr.report.cell.painter.BiasTextPainter; -import com.fr.stable.ArrayUtils; -import com.fr.stable.ParameterProvider; -import com.fr.stable.StringUtils; -import com.fr.stable.bridge.StableFactory; -import com.fr.stable.fun.LogProvider; -import com.fr.stable.script.CalculatorProviderContext; -import com.fr.stable.script.ValueConverter; -import com.fr.stable.web.ServletContext; -import com.fr.stable.web.ServletContextAdapter; -import com.fr.stable.xml.ObjectTokenizer; -import com.fr.stable.xml.ObjectXMLWriterFinder; -import com.fr.start.BBSGuestPaneProvider; -import com.fr.xml.ReportXMLUtils; - -import javax.swing.*; -import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.image.BufferedImage; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.Set; - -public class DesignerModule extends DesignModule { - - static { - ServletContext.addServletContextListener(new ServletContextAdapter() { - - public void onServletStart() { - ModuleContext.startModule(DesignerModule.class.getName()); - } - }); - } - - /** - * 启动设计器模块 - */ - public void start() { - super.start(); - - justStartModules4Engine(); - justStartModules4Designer(); - - CalculatorProviderContext.setValueConverter(valueConverter()); - GeneralXMLTools.Object_Tokenizer = startXMLReadObjectTokenizer(); - GeneralXMLTools.Object_XML_Writer_Finder = startObjectXMLWriterFinder(); - addAdapterForPlate(); - - registerCellEditor(); - registerFloatEditor(); - registerData4Form(); - registerOtherPane(); - - InformationCollector.getInstance().collectStartTime(); - - ExtraDesignClassManager.getInstance().getFeedback().didFeedback(); - StableFactory.registerMarkedObject(LogProvider.MARK_STRING, DesignerLogImpl.getInstance()); - } - - private void registerOtherPane() { - StableFactory.registerMarkedClass(BBSGuestPaneProvider.XML_TAG, BBSGuestPane.class); - } - - /** - * kunsnat:注册单元格选中Editor - */ - - private void registerCellEditor() { - ActionFactory.registerCellEditor(String.class, CellStringQuickEditor.class); - ActionFactory.registerCellEditor(Number.class, CellStringQuickEditor.class); - ActionFactory.registerCellEditor(Formula.class, CellFormulaQuickEditor.class); - ActionFactory.registerCellEditor(SubReport.class, CellSubReportEditor.class); - ActionFactory.registerCellEditor(RichText.class, CellRichTextEditor.class); - ActionFactory.registerCellEditor(DSColumn.class, CellDSColumnEditor.class); - ActionFactory.registerCellEditor(Image.class, CellImageQuickEditor.class); - ActionFactory.registerCellEditor(BiasTextPainter.class, CellBiasTextPainterEditor.class); - ActionFactory.registerCellEditor(BufferedImage.class, CellImageQuickEditor.class); - - ActionFactory.registerChartCellEditorInEditor(ChartQuickEditor.class); - - Set providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING); - for (ElementUIProvider provider : providers) { - ActionFactory.registerCellEditor(provider.targetObjectClass(), provider.quickEditor()); - } - } - - - public String getInterNationalName() { - return Inter.getLocText("FR-Module_Designer"); - } - - - /** - * kunnat: 注册悬浮选中Editor - */ - private void registerFloatEditor() { - ActionFactory.registerFloatEditor(String.class, FloatStringQuickEditor.class); - ActionFactory.registerFloatEditor(Formula.class, FloatStringQuickEditor.class); - - FloatImageQuickEditor floatImageQuickEditor = new FloatImageQuickEditor(); - ActionFactory.registerFloatEditor(Image.class, FloatImageQuickEditor.class); - ActionFactory.registerFloatEditor(BufferedImage.class, FloatImageQuickEditor.class); - ActionFactory.registerChartFloatEditorInEditor(ChartQuickEditor.class); - } - - /** - * kunsnat: 一些模块信息 必须跟随设计器启动, - * 比如 读取CC.XML, 设计器启动之后, 马上会读取XML, 需要Chart_Module中的注册信息 - */ - private void justStartModules4Engine() { - ModuleContext.startModule(ENGINE_MODULE); - } - - private void justStartModules4Designer() { - ModuleContext.startModule(CHART_DESIGNER_MODULE); - ModuleContext.startModule(FORM_DESIGNER_MODULE); - } - - /** - * CellElementValueConverter用来处理设计器格子里的值,将公式/数组/其他元素转换成对应的值。 - * - * @return 返回处理格子值的转换器 - */ - public ValueConverter valueConverter() { - return new CellElementValueConverter(); - } - - @Override - /* - * 针对不同的对象,在读取Object对象的xml的时候需要使用不同的对象生成器 - * @return 返回对象生成器 - */ - public ObjectTokenizer startXMLReadObjectTokenizer() { - return new ReportXMLUtils.ReportObjectTokenizer(); - } - - /** - * 针对不同的对象,在写对象的XML时需要使用不同的XML生成器 - * - * @return 返回xml生成器 - */ - @Override - public ObjectXMLWriterFinder startObjectXMLWriterFinder() { - return new ReportXMLUtils.ReportObjectXMLWriterFinder(); - } - - //wei:fs的模块中可能有需要设计器界面做设置的地方,在这边添加 - private void addAdapterForPlate() { - - ProcessTransitionAdapter.setProcessTransitionAdapter(new ProcessTransitionAdapter() { - - @Override - protected String[] getTransitionNamesByBook(String book) { - return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getTransitionNamesByBook(book); - } - - @Override - protected String[] getParaNames(String book) { - return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getParaNames(book); - } - - @Override - protected ParameterProvider[] getParas(String book) { - return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getParas(book); - } - - protected MultiFieldParameter[] getAllMultiFieldParas(String book) { - return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getAllMultiFieldParas(book); - } - }); - } - - private static abstract class AbstractWorkBookApp implements App { - - @Override - public int currentAPILevel() { - return CURRENT_LEVEL; - } - - @Override - public JTemplate openTemplate(FILE tplFile) { - return new JWorkBook(asIOFile(tplFile), tplFile); - } - - @Override - public String mark4Provider() { - return getClass().getName(); - } - - @Override - public void process() { - - } - - @Override - public void undo() { - - } - } - - @Override - /* - * 返回设计器能打开的模板类型的一个数组列表 - * @return 可以打开的模板类型的数组 - */ - public App[] apps4TemplateOpener() { - return new App[]{getCptApp(), getXlsApp(), getXlsxApp()}; - } - - private AbstractWorkBookApp getXlsxApp() { - return new AbstractWorkBookApp() { - @Override - public String[] defaultExtentions() { - return new String[]{"xlsx"}; - } - - @Override - public WorkBook asIOFile(FILE tplFile) { - WorkBook workbook = null; - try { - workbook = new Excel2007ReportImporter().generateWorkBookByStream(tplFile.asInputStream()); - } catch (Exception exp) { - FRContext.getLogger().error("Failed to generate xlsx from " + tplFile, exp); - } - return workbook; - } - }; - } - - private AbstractWorkBookApp getXlsApp() { - return new AbstractWorkBookApp() { - @Override - public String[] defaultExtentions() { - return new String[]{"xls"}; - } - - @Override - public WorkBook asIOFile(FILE tplFile) { - WorkBook workbook = null; - try { - workbook = new ExcelReportImporter().generateWorkBookByStream(tplFile.asInputStream()); - } catch (Exception exp) { - FRContext.getLogger().error("Failed to generate xls from " + tplFile, exp); - } - return workbook; - } - }; - } - - private AbstractWorkBookApp getCptApp() { - return new AbstractWorkBookApp() { - public String[] defaultExtentions() { - return new String[]{"cpt"}; - } - - public WorkBook asIOFile(FILE file) { - if (XMLEncryptUtils.isCptEncoded() && - !XMLEncryptUtils.checkVaild(DesignerEnvManager.getEnvManager().getEncryptionKey())) { - if (!new DecodeDialog(file).isPwdRight()) { - FRContext.getLogger().error(Inter.getLocText("ECP-error_pwd")); - return new WorkBook(); - } - } - - WorkBook tpl = new WorkBook(); - // richer:打开报表通知 - FRContext.getLogger().info(Inter.getLocText(new String[]{"LOG-Is_Being_Openned", "LOG-Please_Wait"}, new String[]{"\"" + file.getName() + "\"" + ",", "..."})); - TempNameStyle namestyle = TempNameStyle.getInstance(); - namestyle.clear(); - String checkStr = StringUtils.EMPTY; - try { - checkStr = IOUtils.inputStream2String(file.asInputStream()); - tpl.readStream(file.asInputStream()); - } catch (Exception exp) { - String errorMessage = StringUtils.EMPTY; - errorMessage = ComparatorUtils.equals(RemoteDeziConstants.INVALID_USER, checkStr) ? Inter.getLocText("FR-Designer_No-Privilege") - : Inter.getLocText("NS-exception_readError"); - FRContext.getLogger().error(errorMessage + file, exp); - } - checkNameStyle(namestyle); - return tpl; - } - }; - } - - private static void checkNameStyle(TempNameStyle namestyle) { - Iterator it = namestyle.getIterator(); - ArrayList al = new ArrayList(); - while (it.hasNext()) { - al.add((String) it.next()); - } - if (!al.isEmpty()) { - showConfirmDialog(al); - } - } - - private static void showConfirmDialog(final ArrayList namelist) { - - final JDialog jd = new JDialog(); - // 模态一下,因为可能会多个样式丢失 - // jd.setModal(true); - jd.setAlwaysOnTop(true); - jd.setSize(450, 150); - jd.setResizable(false); - jd.setIconImage(BaseUtils.readImage("/com/fr/base/images/oem/logo.png")); - String message = namelist.toString().replaceAll("\\[", "").replaceAll("\\]", ""); - UILabel jl = new UILabel(Inter.getLocText(new String[]{"Current_custom_global", "Has_been_gone"}, new String[]{message})); - jl.setHorizontalAlignment(SwingConstants.CENTER); - jd.add(jl, BorderLayout.CENTER); - JPanel jp = new JPanel(); - - // ”是“按钮,点击之后将生成一个全局样式,并写入xml - UIButton confirmButton = new UIButton(Inter.getLocText("FR-Designer_Yes")); - confirmButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - try { - for (int i = 0; i < namelist.size(); i++) { - ConfigManager.getProviderInstance().putStyle(namelist.get(i), Style.DEFAULT_STYLE); - FRContext.getCurrentEnv().writeResource(ConfigManager.getProviderInstance()); - } - } catch (Exception ex) { - FRLogger.getLogger().error(ex.getMessage()); - } - jd.dispose(); - new StyleListAction().actionPerformed(e);// 弹窗 - } - }); - - UIButton noButton = new UIButton(Inter.getLocText("FR-Designer_No")); - noButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - jd.dispose(); - } - }); - - jp.add(confirmButton); - jp.add(noButton); - jd.setTitle(Inter.getLocText("FR-Custom_styles_lost")); - jd.add(jp, BorderLayout.SOUTH); - GUICoreUtils.centerWindow(jd); - jd.setVisible(true); - } - - public Class[] actionsForInsertCellElement() { - return (Class[]) ArrayUtils.addAll(new Class[]{ - DSColumnCellAction.class, - GeneralCellAction.class, - RichTextCellAction.class, - FormulaCellAction.class, - ChartCellAction.class, - ImageCellAction.class, - BiasCellAction.class, - SubReportCellAction.class - }, super.actionsForInsertCellElement()); - } - - public Class[] actionsForInsertFloatElement() { - return (Class[]) ArrayUtils.addAll(new Class[]{ - TextBoxFloatAction.class, - FormulaFloatAction.class, - ChartFloatAction.class, - ImageFloatAction.class - }, super.actionsForInsertFloatElement()); - } - - - private void registerData4Form() { - StableFactory.registerMarkedClass(FormECDesignerProvider.XML_TAG, FormElementCaseDesigner.class); - StableFactory.registerMarkedClass(FormECCompositeProvider.XML_TAG, FormReportComponentComposite.class); - DesignModuleFactory.registerParameterReader(new WorkBookParameterReader()); - } +package com.fr.design.module; + +import com.fr.base.*; +import com.fr.base.io.XMLEncryptUtils; +import com.fr.base.process.ProcessOperator; +import com.fr.base.remote.RemoteDeziConstants; +import com.fr.design.DesignerEnvManager; +import com.fr.design.ExtraDesignClassManager; +import com.fr.design.actions.core.ActionFactory; +import com.fr.design.actions.insert.cell.*; +import com.fr.design.actions.insert.flot.ChartFloatAction; +import com.fr.design.actions.insert.flot.FormulaFloatAction; +import com.fr.design.actions.insert.flot.ImageFloatAction; +import com.fr.design.actions.insert.flot.TextBoxFloatAction; +import com.fr.design.actions.server.StyleListAction; +import com.fr.design.fun.ElementUIProvider; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.javascript.ProcessTransitionAdapter; +import com.fr.design.mainframe.*; +import com.fr.design.mainframe.bbs.BBSGuestPane; +import com.fr.design.mainframe.form.FormECCompositeProvider; +import com.fr.design.mainframe.form.FormECDesignerProvider; +import com.fr.design.mainframe.form.FormElementCaseDesigner; +import com.fr.design.mainframe.form.FormReportComponentComposite; +import com.fr.design.mainframe.loghandler.DesignerLogImpl; +import com.fr.design.parameter.WorkBookParameterReader; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.file.FILE; +import com.fr.general.*; +import com.fr.general.xml.GeneralXMLTools; +import com.fr.io.importer.Excel2007ReportImporter; +import com.fr.io.importer.ExcelReportImporter; +import com.fr.main.impl.WorkBook; +import com.fr.quickeditor.chartquick.BasicChartQuickEditor; +import com.fr.quickeditor.chartquick.FloatChartQuickEditor; +import com.fr.quickeditor.cellquick.*; +import com.fr.quickeditor.floatquick.FloatImageQuickEditor; +import com.fr.quickeditor.floatquick.FloatStringQuickEditor; +import com.fr.report.cell.CellElementValueConverter; +import com.fr.report.cell.cellattr.core.RichText; +import com.fr.report.cell.cellattr.core.SubReport; +import com.fr.report.cell.cellattr.core.group.DSColumn; +import com.fr.report.cell.painter.BiasTextPainter; +import com.fr.stable.ArrayUtils; +import com.fr.stable.ParameterProvider; +import com.fr.stable.StringUtils; +import com.fr.stable.bridge.StableFactory; +import com.fr.stable.fun.LogProvider; +import com.fr.stable.script.CalculatorProviderContext; +import com.fr.stable.script.ValueConverter; +import com.fr.stable.web.ServletContext; +import com.fr.stable.web.ServletContextAdapter; +import com.fr.stable.xml.ObjectTokenizer; +import com.fr.stable.xml.ObjectXMLWriterFinder; +import com.fr.start.BBSGuestPaneProvider; +import com.fr.xml.ReportXMLUtils; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.image.BufferedImage; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.Set; + +public class DesignerModule extends DesignModule { + + static { + ServletContext.addServletContextListener(new ServletContextAdapter() { + + public void onServletStart() { + ModuleContext.startModule(DesignerModule.class.getName()); + } + }); + } + + /** + * 启动设计器模块 + */ + public void start() { + super.start(); + + justStartModules4Engine(); + justStartModules4Designer(); + + CalculatorProviderContext.setValueConverter(valueConverter()); + GeneralXMLTools.Object_Tokenizer = startXMLReadObjectTokenizer(); + GeneralXMLTools.Object_XML_Writer_Finder = startObjectXMLWriterFinder(); + addAdapterForPlate(); + + registerCellEditor(); + registerFloatEditor(); + registerData4Form(); + registerOtherPane(); + + InformationCollector.getInstance().collectStartTime(); + + ExtraDesignClassManager.getInstance().getFeedback().didFeedback(); + StableFactory.registerMarkedObject(LogProvider.MARK_STRING, DesignerLogImpl.getInstance()); + } + + private void registerOtherPane() { + StableFactory.registerMarkedClass(BBSGuestPaneProvider.XML_TAG, BBSGuestPane.class); + } + + /** + * kunsnat:注册单元格选中Editor + */ + + private void registerCellEditor() { + ActionFactory.registerCellEditor(String.class, CellStringQuickEditor.class); + ActionFactory.registerCellEditor(Number.class, CellStringQuickEditor.class); + ActionFactory.registerCellEditor(Formula.class, CellFormulaQuickEditor.class); + ActionFactory.registerCellEditor(SubReport.class, CellSubReportEditor.class); + ActionFactory.registerCellEditor(RichText.class, CellRichTextEditor.class); + ActionFactory.registerCellEditor(DSColumn.class, CellDSColumnEditor.class); + ActionFactory.registerCellEditor(Image.class, CellImageQuickEditor.class); + ActionFactory.registerCellEditor(BiasTextPainter.class, CellBiasTextPainterEditor.class); + ActionFactory.registerCellEditor(BufferedImage.class, CellImageQuickEditor.class); + + ActionFactory.registerChartCellEditorInEditor(BasicChartQuickEditor.class); + + Set providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING); + for (ElementUIProvider provider : providers) { + ActionFactory.registerCellEditor(provider.targetObjectClass(), provider.quickEditor()); + } + } + + + public String getInterNationalName() { + return Inter.getLocText("FR-Module_Designer"); + } + + + /** + * kunnat: 注册悬浮选中Editor + */ + private void registerFloatEditor() { + ActionFactory.registerFloatEditor(String.class, FloatStringQuickEditor.class); + ActionFactory.registerFloatEditor(Formula.class, FloatStringQuickEditor.class); + ActionFactory.registerFloatEditor(Image.class, FloatImageQuickEditor.class); + ActionFactory.registerFloatEditor(BufferedImage.class, FloatImageQuickEditor.class); + + ActionFactory.registerChartFloatEditorInEditor(FloatChartQuickEditor.class); + } + + /** + * kunsnat: 一些模块信息 必须跟随设计器启动, + * 比如 读取CC.XML, 设计器启动之后, 马上会读取XML, 需要Chart_Module中的注册信息 + */ + private void justStartModules4Engine() { + ModuleContext.startModule(ENGINE_MODULE); + } + + private void justStartModules4Designer() { + ModuleContext.startModule(CHART_DESIGNER_MODULE); + ModuleContext.startModule(FORM_DESIGNER_MODULE); + } + + /** + * CellElementValueConverter用来处理设计器格子里的值,将公式/数组/其他元素转换成对应的值。 + * + * @return 返回处理格子值的转换器 + */ + public ValueConverter valueConverter() { + return new CellElementValueConverter(); + } + + @Override + /* + * 针对不同的对象,在读取Object对象的xml的时候需要使用不同的对象生成器 + * @return 返回对象生成器 + */ + public ObjectTokenizer startXMLReadObjectTokenizer() { + return new ReportXMLUtils.ReportObjectTokenizer(); + } + + /** + * 针对不同的对象,在写对象的XML时需要使用不同的XML生成器 + * + * @return 返回xml生成器 + */ + @Override + public ObjectXMLWriterFinder startObjectXMLWriterFinder() { + return new ReportXMLUtils.ReportObjectXMLWriterFinder(); + } + + //wei:fs的模块中可能有需要设计器界面做设置的地方,在这边添加 + private void addAdapterForPlate() { + + ProcessTransitionAdapter.setProcessTransitionAdapter(new ProcessTransitionAdapter() { + + @Override + protected String[] getTransitionNamesByBook(String book) { + return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getTransitionNamesByBook(book); + } + + @Override + protected String[] getParaNames(String book) { + return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getParaNames(book); + } + + @Override + protected ParameterProvider[] getParas(String book) { + return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getParas(book); + } + + protected MultiFieldParameter[] getAllMultiFieldParas(String book) { + return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getAllMultiFieldParas(book); + } + }); + } + + private static abstract class AbstractWorkBookApp implements App { + + @Override + public int currentAPILevel() { + return CURRENT_LEVEL; + } + + @Override + public JTemplate openTemplate(FILE tplFile) { + return new JWorkBook(asIOFile(tplFile), tplFile); + } + + @Override + public String mark4Provider() { + return getClass().getName(); + } + + @Override + public void process() { + + } + + @Override + public void undo() { + + } + } + + @Override + /* + * 返回设计器能打开的模板类型的一个数组列表 + * @return 可以打开的模板类型的数组 + */ + public App[] apps4TemplateOpener() { + return new App[]{getCptApp(), getXlsApp(), getXlsxApp()}; + } + + private AbstractWorkBookApp getXlsxApp() { + return new AbstractWorkBookApp() { + @Override + public String[] defaultExtentions() { + return new String[]{"xlsx"}; + } + + @Override + public WorkBook asIOFile(FILE tplFile) { + WorkBook workbook = null; + try { + workbook = new Excel2007ReportImporter().generateWorkBookByStream(tplFile.asInputStream()); + } catch (Exception exp) { + FRContext.getLogger().error("Failed to generate xlsx from " + tplFile, exp); + } + return workbook; + } + }; + } + + private AbstractWorkBookApp getXlsApp() { + return new AbstractWorkBookApp() { + @Override + public String[] defaultExtentions() { + return new String[]{"xls"}; + } + + @Override + public WorkBook asIOFile(FILE tplFile) { + WorkBook workbook = null; + try { + workbook = new ExcelReportImporter().generateWorkBookByStream(tplFile.asInputStream()); + } catch (Exception exp) { + FRContext.getLogger().error("Failed to generate xls from " + tplFile, exp); + } + return workbook; + } + }; + } + + private AbstractWorkBookApp getCptApp() { + return new AbstractWorkBookApp() { + public String[] defaultExtentions() { + return new String[]{"cpt"}; + } + + public WorkBook asIOFile(FILE file) { + if (XMLEncryptUtils.isCptEncoded() && + !XMLEncryptUtils.checkVaild(DesignerEnvManager.getEnvManager().getEncryptionKey())) { + if (!new DecodeDialog(file).isPwdRight()) { + FRContext.getLogger().error(Inter.getLocText("ECP-error_pwd")); + return new WorkBook(); + } + } + + WorkBook tpl = new WorkBook(); + // richer:打开报表通知 + FRContext.getLogger().info(Inter.getLocText(new String[]{"LOG-Is_Being_Openned", "LOG-Please_Wait"}, new String[]{"\"" + file.getName() + "\"" + ",", "..."})); + TempNameStyle namestyle = TempNameStyle.getInstance(); + namestyle.clear(); + String checkStr = StringUtils.EMPTY; + try { + checkStr = IOUtils.inputStream2String(file.asInputStream()); + tpl.readStream(file.asInputStream()); + } catch (Exception exp) { + String errorMessage = StringUtils.EMPTY; + errorMessage = ComparatorUtils.equals(RemoteDeziConstants.INVALID_USER, checkStr) ? Inter.getLocText("FR-Designer_No-Privilege") + : Inter.getLocText("NS-exception_readError"); + FRContext.getLogger().error(errorMessage + file, exp); + } + checkNameStyle(namestyle); + return tpl; + } + }; + } + + private static void checkNameStyle(TempNameStyle namestyle) { + Iterator it = namestyle.getIterator(); + ArrayList al = new ArrayList(); + while (it.hasNext()) { + al.add((String) it.next()); + } + if (!al.isEmpty()) { + showConfirmDialog(al); + } + } + + private static void showConfirmDialog(final ArrayList namelist) { + + final JDialog jd = new JDialog(); + // 模态一下,因为可能会多个样式丢失 + // jd.setModal(true); + jd.setAlwaysOnTop(true); + jd.setSize(450, 150); + jd.setResizable(false); + jd.setIconImage(BaseUtils.readImage("/com/fr/base/images/oem/logo.png")); + String message = namelist.toString().replaceAll("\\[", "").replaceAll("\\]", ""); + UILabel jl = new UILabel(Inter.getLocText(new String[]{"Current_custom_global", "Has_been_gone"}, new String[]{message})); + jl.setHorizontalAlignment(SwingConstants.CENTER); + jd.add(jl, BorderLayout.CENTER); + JPanel jp = new JPanel(); + + // ”是“按钮,点击之后将生成一个全局样式,并写入xml + UIButton confirmButton = new UIButton(Inter.getLocText("FR-Designer_Yes")); + confirmButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + try { + for (int i = 0; i < namelist.size(); i++) { + ConfigManager.getProviderInstance().putStyle(namelist.get(i), Style.DEFAULT_STYLE); + FRContext.getCurrentEnv().writeResource(ConfigManager.getProviderInstance()); + } + } catch (Exception ex) { + FRLogger.getLogger().error(ex.getMessage()); + } + jd.dispose(); + new StyleListAction().actionPerformed(e);// 弹窗 + } + }); + + UIButton noButton = new UIButton(Inter.getLocText("FR-Designer_No")); + noButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + jd.dispose(); + } + }); + + jp.add(confirmButton); + jp.add(noButton); + jd.setTitle(Inter.getLocText("FR-Custom_styles_lost")); + jd.add(jp, BorderLayout.SOUTH); + GUICoreUtils.centerWindow(jd); + jd.setVisible(true); + } + + public Class[] actionsForInsertCellElement() { + return (Class[]) ArrayUtils.addAll(new Class[]{ + DSColumnCellAction.class, + GeneralCellAction.class, + RichTextCellAction.class, + FormulaCellAction.class, + ChartCellAction.class, + ImageCellAction.class, + BiasCellAction.class, + SubReportCellAction.class + }, super.actionsForInsertCellElement()); + } + + public Class[] actionsForInsertFloatElement() { + return (Class[]) ArrayUtils.addAll(new Class[]{ + TextBoxFloatAction.class, + FormulaFloatAction.class, + ChartFloatAction.class, + ImageFloatAction.class + }, super.actionsForInsertFloatElement()); + } + + + private void registerData4Form() { + StableFactory.registerMarkedClass(FormECDesignerProvider.XML_TAG, FormElementCaseDesigner.class); + StableFactory.registerMarkedClass(FormECCompositeProvider.XML_TAG, FormReportComponentComposite.class); + DesignModuleFactory.registerParameterReader(new WorkBookParameterReader()); + } } \ No newline at end of file diff --git a/designer/src/com/fr/poly/creator/ChartBlockCreator.java b/designer/src/com/fr/poly/creator/ChartBlockCreator.java index d713356c6..ec74b3727 100644 --- a/designer/src/com/fr/poly/creator/ChartBlockCreator.java +++ b/designer/src/com/fr/poly/creator/ChartBlockCreator.java @@ -1,166 +1,156 @@ -/* - * Copyright(c) 2001-2010, FineReport Inc, All Rights Reserved. - */ -package com.fr.poly.creator; - -import java.awt.*; -import java.awt.image.BufferedImage; - -import javax.swing.*; - -import com.fr.base.ScreenResolution; -import com.fr.design.DesignState; -import com.fr.design.designer.TargetComponent; -import com.fr.design.file.HistoryTemplateListPane; -import com.fr.design.gui.chart.MiddleChartComponent; -import com.fr.design.menu.MenuDef; -import com.fr.design.menu.ShortCut; -import com.fr.design.menu.ToolBarDef; -import com.fr.design.module.DesignModuleFactory; -import com.fr.design.selection.QuickEditor; -import com.fr.quickeditor.ChartQuickEditor; -import com.fr.report.poly.PolyChartBlock; -import com.fr.stable.unit.FU; -import com.fr.stable.unit.UNIT; -import com.fr.stable.unit.UnitRectangle; - -/** - * @author richer - * @since 6.5.4 创建于2011-5-10 - */ -public class ChartBlockCreator extends BlockCreator { - private MiddleChartComponent cpm; - private ChartBlockEditor editor; - - //图表默认宽高330*240 - private static final UNIT DEFAULT_WIDTH = FU.getInstance(12573000); - private static final UNIT DEFAULT_HEIGHT = FU.getInstance(9144000); - - - public ChartBlockCreator() { - - } - - public ChartBlockCreator(PolyChartBlock block) { - super(block); - } - - public void setResolution(int resolution){ - this.resolution = resolution; - } - - /** - * 初始化 - * @return 初始化的控件. - */ - public JComponent initMonitor() { - cpm = DesignModuleFactory.getChartComponent(getValue().getChartCollection()); - cpm.setBorder(BorderFactory.createLineBorder(Color.lightGray)); - return cpm; - } - - public UnitRectangle getDefaultBlockBounds() { - return new UnitRectangle(UNIT.ZERO, UNIT.ZERO, DEFAULT_WIDTH, DEFAULT_HEIGHT); - } - - @Override - public BlockEditor getEditor() { - if (editor == null) { - editor = new ChartBlockEditor(designer, this); - } - return editor; - } - - @Override - public int getX(float time) { - return (int) (this.getX() * time); - } - - @Override - public int getY(float time) { - return (int) (this.getY() * time); - } - - - /** - * 检测按钮状态 - * - * @date 2015-2-5-上午11:33:46 - * - */ - public void checkButtonEnable() { - if (editor == null) { - editor = new ChartBlockEditor(designer, this); - } - editor.checkChartButtonsEnable(); - } - - @Override - public PolyChartBlock getValue() { - return block; - } - - @Override - public void setValue(PolyChartBlock block) { - this.block = block; - cpm.populate(this.block.getChartCollection()); - } - - - - /** - * 获取当前工具栏组 - * - * @return 工具栏组 - * - * @date 2015-2-5-上午11:29:07 - * - */ - public ToolBarDef[] toolbars4Target() { - return new ToolBarDef[0]; - } - - /** - * 在Form的工具栏组 - * - * @return 组件数组 - * - * @date 2015-2-5-上午11:31:46 - * - */ - public JComponent[] toolBarButton4Form() { - return new JComponent[0]; - } - - /** - * 目标的列表 - * @return 返回列表. - */ - public MenuDef[] menus4Target() { - return new MenuDef[0]; - } - - public int getMenuState(){ - return DesignState.POLY_SHEET; - } - - /** - * 模板的Menu - * @return 模板的menu - */ - public ShortCut[] shortcut4TemplateMenu() { - return new ShortCut[0]; - } - - @Override - public PolyElementCasePane getEditingElementCasePane() { - return null; - } - - @Override - public QuickEditor getQuickEditor(TargetComponent tc) { - ChartQuickEditor quitEditor = new ChartQuickEditor(); - quitEditor.populate(tc); - return quitEditor; - } +package com.fr.poly.creator; + +import com.fr.design.DesignState; +import com.fr.design.designer.TargetComponent; +import com.fr.design.gui.chart.MiddleChartComponent; +import com.fr.design.menu.MenuDef; +import com.fr.design.menu.ShortCut; +import com.fr.design.menu.ToolBarDef; +import com.fr.design.module.DesignModuleFactory; +import com.fr.design.selection.QuickEditor; +import com.fr.quickeditor.chartquick.PolyChartQuickEditor; +import com.fr.report.poly.PolyChartBlock; +import com.fr.stable.unit.FU; +import com.fr.stable.unit.UNIT; +import com.fr.stable.unit.UnitRectangle; + +import javax.swing.*; +import java.awt.*; + +/** + * @author richer + * @since 6.5.4 创建于2011-5-10 + */ +public class ChartBlockCreator extends BlockCreator { + private MiddleChartComponent cpm; + private ChartBlockEditor editor; + + //图表默认宽高330*240 + private static final UNIT DEFAULT_WIDTH = FU.getInstance(12573000); + private static final UNIT DEFAULT_HEIGHT = FU.getInstance(9144000); + + + public ChartBlockCreator() { + + } + + public ChartBlockCreator(PolyChartBlock block) { + super(block); + } + + public void setResolution(int resolution) { + this.resolution = resolution; + } + + /** + * 初始化 + * + * @return 初始化的控件. + */ + public JComponent initMonitor() { + cpm = DesignModuleFactory.getChartComponent(getValue().getChartCollection()); + cpm.setBorder(BorderFactory.createLineBorder(Color.lightGray)); + return cpm; + } + + public UnitRectangle getDefaultBlockBounds() { + return new UnitRectangle(UNIT.ZERO, UNIT.ZERO, DEFAULT_WIDTH, DEFAULT_HEIGHT); + } + + @Override + public BlockEditor getEditor() { + if (editor == null) { + editor = new ChartBlockEditor(designer, this); + } + return editor; + } + + @Override + public int getX(float time) { + return (int) (this.getX() * time); + } + + @Override + public int getY(float time) { + return (int) (this.getY() * time); + } + + + /** + * 检测按钮状态 + * + * @date 2015-2-5-上午11:33:46 + */ + public void checkButtonEnable() { + if (editor == null) { + editor = new ChartBlockEditor(designer, this); + } + editor.checkChartButtonsEnable(); + } + + @Override + public PolyChartBlock getValue() { + return block; + } + + @Override + public void setValue(PolyChartBlock block) { + this.block = block; + cpm.populate(this.block.getChartCollection()); + } + + + /** + * 获取当前工具栏组 + * + * @return 工具栏组 + * @date 2015-2-5-上午11:29:07 + */ + public ToolBarDef[] toolbars4Target() { + return new ToolBarDef[0]; + } + + /** + * 在Form的工具栏组 + * + * @return 组件数组 + * @date 2015-2-5-上午11:31:46 + */ + public JComponent[] toolBarButton4Form() { + return new JComponent[0]; + } + + /** + * 目标的列表 + * + * @return 返回列表. + */ + public MenuDef[] menus4Target() { + return new MenuDef[0]; + } + + public int getMenuState() { + return DesignState.POLY_SHEET; + } + + /** + * 模板的Menu + * + * @return 模板的menu + */ + public ShortCut[] shortcut4TemplateMenu() { + return new ShortCut[0]; + } + + @Override + public PolyElementCasePane getEditingElementCasePane() { + return null; + } + + @Override + public QuickEditor getQuickEditor(TargetComponent tc) { + PolyChartQuickEditor quitEditor = new PolyChartQuickEditor(); + quitEditor.populate(tc); + return quitEditor; + } } \ No newline at end of file diff --git a/designer/src/com/fr/quickeditor/ChartQuickEditor.java b/designer/src/com/fr/quickeditor/ChartQuickEditor.java deleted file mode 100644 index 91ddc28b6..000000000 --- a/designer/src/com/fr/quickeditor/ChartQuickEditor.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.fr.quickeditor; - -import com.fr.base.chart.BaseChartCollection; -//import com.fr.chart.chartattr.ChartCollection; -import com.fr.design.designer.TargetComponent; -import com.fr.design.gui.chart.BaseChartPropertyPane; -import com.fr.design.mainframe.ElementCasePane; -import com.fr.design.module.DesignModuleFactory; -import com.fr.design.selection.QuickEditor; -import com.fr.grid.selection.CellSelection; -import com.fr.grid.selection.FloatSelection; -import com.fr.grid.selection.Selection; -import com.fr.poly.PolyDesigner; -import com.fr.poly.creator.ChartBlockEditor; -import com.fr.report.cell.Elem; - -import java.awt.*; - -public class ChartQuickEditor extends QuickEditor{ - // kunsnat: editingPropertyPane初始化 避开设计器启动, 在用到的时候再初始化. - //private BaseChartPropertyPane editingPropertyPane = null; - public ChartQuickEditor() { - setLayout(new BorderLayout()); - setBorder(null); - } - - @Override - protected void refresh() { - BaseChartPropertyPane editingPropertyPane = null; - BaseChartCollection collection = null; - if(tc instanceof PolyDesigner) { - ChartBlockEditor chartBlockEditor = (ChartBlockEditor)((PolyDesigner)tc).getSelection().getEditor(); - collection = chartBlockEditor.getValue().getChartCollection(); - - add(editingPropertyPane = DesignModuleFactory.getChartPropertyPane(), BorderLayout.CENTER); - editingPropertyPane.setSupportCellData(false); - } else { - Selection selection = ((ElementCasePane)tc).getSelection(); - Elem element = null; - if(selection instanceof CellSelection) { - CellSelection cs = (CellSelection)selection; - element = ((ElementCasePane)tc).getEditingElementCase().getCellElement(cs.getColumn(), cs.getRow()); - } else if(selection instanceof FloatSelection){ - FloatSelection fs = (FloatSelection)selection; - element = ((ElementCasePane)tc).getEditingElementCase().getFloatElement(fs.getSelectedFloatName()); - } - collection = (BaseChartCollection) element.getValue(); - add(editingPropertyPane = DesignModuleFactory.getChartPropertyPane(), BorderLayout.CENTER); - - } - editingPropertyPane.populateChartPropertyPane(collection, tc); - } - -} \ No newline at end of file diff --git a/designer/src/com/fr/quickeditor/chartquick/BasicChartQuickEditor.java b/designer/src/com/fr/quickeditor/chartquick/BasicChartQuickEditor.java new file mode 100644 index 000000000..c0671dfb8 --- /dev/null +++ b/designer/src/com/fr/quickeditor/chartquick/BasicChartQuickEditor.java @@ -0,0 +1,56 @@ +package com.fr.quickeditor.chartquick; + +import com.fr.base.chart.BaseChartCollection; +import com.fr.design.actions.core.ActionFactory; +import com.fr.design.actions.insert.cell.ChartCellAction; +import com.fr.design.gui.chart.BaseChartPropertyPane; +import com.fr.design.module.DesignModuleFactory; +import com.fr.grid.selection.CellSelection; +import com.fr.grid.selection.Selection; +import com.fr.quickeditor.CellQuickEditor; +import com.fr.report.cell.Elem; + +import javax.swing.*; +import java.awt.*; + + +public class BasicChartQuickEditor extends CellQuickEditor { + private JPanel content; + + public BasicChartQuickEditor() { + super(); + } + + @Override + public JComponent createCenterBody() { + content = new JPanel(); + content.setLayout(new BorderLayout()); + return content; + } + + @Override + public boolean isScrollAll() { + return false; + } + + @Override + public Object getComboBoxSelected() { + return ActionFactory.createAction(ChartCellAction.class); + } + + @Override + protected void refreshDetails() { + BaseChartPropertyPane editingPropertyPane; + BaseChartCollection collection; + Selection selection = tc.getSelection(); + Elem element; + CellSelection cs = (CellSelection) selection; + element = tc.getEditingElementCase().getCellElement(cs.getColumn(), cs.getRow()); + collection = (BaseChartCollection) element.getValue(); + editingPropertyPane = DesignModuleFactory.getChartPropertyPane(); + editingPropertyPane.setBorder(BorderFactory.createEmptyBorder()); + content.add(editingPropertyPane, BorderLayout.CENTER); + editingPropertyPane.populateChartPropertyPane(collection, tc); + } + +} \ No newline at end of file diff --git a/designer/src/com/fr/quickeditor/chartquick/FloatChartQuickEditor.java b/designer/src/com/fr/quickeditor/chartquick/FloatChartQuickEditor.java new file mode 100644 index 000000000..723a3aba2 --- /dev/null +++ b/designer/src/com/fr/quickeditor/chartquick/FloatChartQuickEditor.java @@ -0,0 +1,34 @@ +package com.fr.quickeditor.chartquick; + +import com.fr.base.chart.BaseChartCollection; +import com.fr.design.gui.chart.BaseChartPropertyPane; +import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.module.DesignModuleFactory; +import com.fr.design.selection.QuickEditor; +import com.fr.grid.selection.FloatSelection; +import com.fr.grid.selection.Selection; +import com.fr.report.cell.Elem; + +import java.awt.*; + + +public class FloatChartQuickEditor extends QuickEditor { + public FloatChartQuickEditor() { + setLayout(new BorderLayout()); + setBorder(null); + } + + @Override + protected void refresh() { + BaseChartPropertyPane editingPropertyPane; + BaseChartCollection collection; + Selection selection = tc.getSelection(); + Elem element; + FloatSelection fs = (FloatSelection) selection; + element = tc.getEditingElementCase().getFloatElement(fs.getSelectedFloatName()); + collection = (BaseChartCollection) element.getValue(); + add(editingPropertyPane = DesignModuleFactory.getChartPropertyPane(), BorderLayout.CENTER); + editingPropertyPane.populateChartPropertyPane(collection, tc); + } + +} \ No newline at end of file diff --git a/designer/src/com/fr/quickeditor/chartquick/PolyChartQuickEditor.java b/designer/src/com/fr/quickeditor/chartquick/PolyChartQuickEditor.java new file mode 100644 index 000000000..f1584f9ad --- /dev/null +++ b/designer/src/com/fr/quickeditor/chartquick/PolyChartQuickEditor.java @@ -0,0 +1,31 @@ +package com.fr.quickeditor.chartquick; + +import com.fr.base.chart.BaseChartCollection; +import com.fr.design.designer.TargetComponent; +import com.fr.design.gui.chart.BaseChartPropertyPane; +import com.fr.design.module.DesignModuleFactory; +import com.fr.design.selection.QuickEditor; +import com.fr.poly.PolyDesigner; +import com.fr.poly.creator.ChartBlockEditor; + +import java.awt.*; + + +public class PolyChartQuickEditor extends QuickEditor { + public PolyChartQuickEditor() { + setLayout(new BorderLayout()); + setBorder(null); + } + + @Override + protected void refresh() { + BaseChartPropertyPane editingPropertyPane; + BaseChartCollection collection; + ChartBlockEditor chartBlockEditor = (ChartBlockEditor) ((PolyDesigner) tc).getSelection().getEditor(); + collection = chartBlockEditor.getValue().getChartCollection(); + add(editingPropertyPane = DesignModuleFactory.getChartPropertyPane(), BorderLayout.CENTER); + editingPropertyPane.setSupportCellData(false); + editingPropertyPane.populateChartPropertyPane(collection, tc); + } + +} \ No newline at end of file diff --git a/designer_base/src/com/fr/design/actions/core/ActionFactory.java b/designer_base/src/com/fr/design/actions/core/ActionFactory.java index a8d958533..bf59e8233 100644 --- a/designer_base/src/com/fr/design/actions/core/ActionFactory.java +++ b/designer_base/src/com/fr/design/actions/core/ActionFactory.java @@ -24,11 +24,11 @@ public class ActionFactory { private ActionFactory() { } - private static Map> floatEditor = new HashMap>(); + private static Map> floatEditor = new HashMap<>(); private static Class chartCollectionClass = null; - private static Map> cellEditor = new HashMap>(); + private static Map> cellEditor = new HashMap<>(); private static UpdateAction chartPreStyleAction = null; @@ -98,7 +98,7 @@ public class ActionFactory { } /** - * kunsnat: 图表注册 悬浮元素编辑器 , 因为ChartCollecion和ChartQuickEditor一个在Chart,一个在Designer, 所以分开注册. + * kunsnat: 图表注册 悬浮元素编辑器 , 因为ChartCollection和ChartQuickEditor一个在Chart,一个在Designer, 所以分开注册. * * @param editor 待说明 */ From 3e59cec9975d641c1621f2bb670a4fc853c3360a Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 9 Oct 2017 15:43:39 +0800 Subject: [PATCH 05/35] =?UTF-8?q?REPORT-4883=20=E6=A8=A1=E6=9D=BF=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=8E=A7=E4=BB=B6=E9=97=AE=E9=A2=98=3D>=E9=80=89?= =?UTF-8?q?=E4=B8=AD=E5=8F=82=E6=95=B0=E9=9D=A2=E6=9D=BF=E5=86=85=E9=83=A8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=97=B6=EF=BC=8C=E5=8F=AF=E7=BB=A7=E7=BB=AD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_form/src/com/fr/design/mainframe/JForm.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index 650c5fb3e..2aa57462b 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -331,7 +331,7 @@ public class JForm extends JTemplate implements BaseJForm { ParameterPropertyPane.getInstance().setAddParaPaneVisible(false, this); return; } - ParameterPropertyPane.getInstance().setAddParaPaneVisible(comp instanceof XWParameterLayout, this); + ParameterPropertyPane.getInstance().setAddParaPaneVisible(isAddParaPaneVisible(comp), this); editingComponent = comp.createToolPane(this, formDesign); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.FORM); if (BaseUtils.isAuthorityEditing()) { @@ -342,6 +342,16 @@ public class JForm extends JTemplate implements BaseJForm { } } + private boolean isAddParaPaneVisible(XComponent comp) { + boolean isVisible = false; + try { + isVisible = comp instanceof XWParameterLayout || ((XCreator) comp).getParent() instanceof XWParameterLayout; + } catch (Throwable throwable) { + // 发生异常则返回 false + } + return isVisible; + } + public JComponent getEditingPane() { return editingComponent; } From 318f3ca76b420a0b8ee093e00c0fa2297488ac15 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 9 Oct 2017 15:45:00 +0800 Subject: [PATCH 06/35] =?UTF-8?q?REPORT-4883=20=E6=A8=A1=E6=9D=BF=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=8E=A7=E4=BB=B6=E9=97=AE=E9=A2=98=3D>=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=8F=82=E6=95=B0=E9=9D=A2=E6=9D=BF=E5=86=85=E7=9A=84?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E5=90=8E=EF=BC=8C=E9=80=89=E4=B8=AD=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/designer/beans/models/SelectionModel.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java b/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java index 2fde27019..354ba3f63 100644 --- a/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java +++ b/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java @@ -227,7 +227,11 @@ public class SelectionModel { XCreator[] roots = selection.getSelectedCreators(); if (roots.length > 0) { + boolean isInPara = true; // 在参数面板内删除控件 for (XCreator creator : roots) { + if (isInPara && !(creator.getParent() instanceof XWParameterLayout)) { + isInPara = false; + } if (creator.acceptType(XWParameterLayout.class)) { designer.removeParaComponent(); } @@ -236,8 +240,7 @@ public class SelectionModel { // 清除被选中的组件 selection.reset(); } - setSelectedCreator(designer.getRootComponent()); - FormSelectionUtils.rebuildSelection(designer); + setSelectedCreator(isInPara ? designer.getParaComponent() : designer.getRootComponent()); // 触发事件 designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_DELETED); designer.repaint(); From 6fc74fc15ba1c7767ba94a95516f857aa63b5724 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Mon, 9 Oct 2017 16:03:01 +0800 Subject: [PATCH 07/35] =?UTF-8?q?REPORT-4604=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E4=BF=AE=E6=94=B9=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E5=B1=9E=E6=80=A7-=E5=BD=A2=E6=80=81-=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=AD=97=E5=85=B8-=E5=85=AC=E5=BC=8F=20=20=20?= =?UTF-8?q?=E6=9C=80=E4=B8=8B=E9=9D=A2=E7=9A=84=E6=96=87=E5=AD=97=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E5=92=8C=E5=86=85=E5=AE=B9=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 2 +- .../src/com/fr/design/locale/designer_en_US.properties | 2 +- .../src/com/fr/design/locale/designer_ja_JP.properties | 2 +- .../src/com/fr/design/locale/designer_ko_KR.properties | 2 +- .../src/com/fr/design/locale/designer_zh_CN.properties | 2 +- .../src/com/fr/design/locale/designer_zh_TW.properties | 2 +- .../src/com/fr/design/present/dict/FormulaDictPane.java | 2 ++ 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 938f9b164..59ead5237 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -856,7 +856,7 @@ RP_Authority_Edit=Authority Warnning=Warning RoleName_Can_Not_Be_Null=RoleName_Can_Not_Be_Null Application=Applications -Formula_Dictionary_Display_Examples_Html=the real value is \ +Formula_Dictionary_Display_Examples_Html=the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$,
the result is 1, 2, ..., 100 and -1, -2, ..., -100.
ECP-error_pwd= FR-Hyperlink_ChartHyperlink= M_Edit-FormatBrush=Format Painter diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index 53b7873e4..e7094c00c 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -859,7 +859,7 @@ RP_Authority_Edit=Permission Warnning=Warning RoleName_Can_Not_Be_Null=Role name can not be null or duplicate Application=Applications -Formula_Dictionary_Display_Examples_Html=the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$,
the result is 1, 2, ..., 100 and -1, -2, ..., -100.
+Formula_Dictionary_Display_Examples_Html=Tip: the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$,
the result is 1, 2, ..., 100 and -1, -2, ..., -100.
ECP-error_pwd=Password Error FR-Hyperlink_ChartHyperlink=Chart Hyperlink M_Edit-FormatBrush=Format Painter diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index 57c6eb3bb..2d6ec8641 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -857,7 +857,7 @@ RP_Authority_Edit=\u6A29\u9650\u7DE8\u96C6 Warnning=\u30EA\u30DE\u30A4\u30F3\u30C9 RoleName_Can_Not_Be_Null=\u5F79\u5272\u540D\u306F\u7A7A\u6B04\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u305A\u3001\u91CD\u8907\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u305B\u3093 Application=\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3 -Formula_Dictionary_Display_Examples_Html=\u5B9F\u969B\u306E\u5024\u304C \=range(100)\u306E\u3068\u304D\u3001\u5B9F\u969B\u306E\u5024($$$)\u306E\u8868\u793A\u3059\u308B\u5024\u306E\u6570\u5F0F\u304C \= 0 - $$$\u306E\u3068\u304D\u3001\n\u6700\u7D42\u7684\u306A\u5B9F\u969B\u306E\u5024\u306F\u30011, 2, ..., 100\u3067\u3042\u308A\u3001\n\u305D\u306E\u8868\u793A\u7D50\u679C\u306F-1, -2, ..., -100\u3068\u306A\u308B\u3002
+Formula_Dictionary_Display_Examples_Html=\u30D2\u30F3\u30C8: \u5B9F\u969B\u306E\u5024\u304C \=range(100)\u306E\u3068\u304D\u3001\u5B9F\u969B\u306E\u5024($$$)\u306E\u8868\u793A\u3059\u308B\u5024\u306E\u6570\u5F0F\u304C \= 0 - $$$\u306E\u3068\u304D\u3001\n\u6700\u7D42\u7684\u306A\u5B9F\u969B\u306E\u5024\u306F\u30011, 2, ..., 100\u3067\u3042\u308A\u3001\n\u305D\u306E\u8868\u793A\u7D50\u679C\u306F-1, -2, ..., -100\u3068\u306A\u308B\u3002
ECP-error_pwd=\u30D1\u30B9\u30EF\u30FC\u30C9\u30A8\u30E9\u30FC FR-Hyperlink_ChartHyperlink=\u30B0\u30E9\u30D5\u30CF\u30A4\u30D1\u30FC\u30EA\u30F3\u30AF M_Edit-FormatBrush=\u66F8\u5F0F\u30D6\u30E9\u30B7(B) diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index 37f64cf57..586d85869 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -857,7 +857,7 @@ RP_Authority_Edit=\uAD8C\uD55C\uD3B8\uC9D1 Warnning=\uC54C\uB9BC RoleName_Can_Not_Be_Null=\uC5ED\uD560\uC774\uB984\uC740\uBE44\uC5B4\uC788\uAC70\uB098\uC911\uBCF5\uB418\uC5B4\uC11C\uB294\uC548\uB429\uB2C8\uB2E4. Application=\uC560\uD50C\uB9AC\uCF00\uC774\uC158 -Formula_Dictionary_Display_Examples_Html=\uC2E4\uC81C\uAC12\uBC94\uC704:\=0 - $$$\uFF0C
\uCD5C\uC885\uACB0\uACFC\uC758\uC2E4\uC81C\uAC12: 1, 2, ..., 100,\uD45C\uC2DC\uAC12: -1, -2, ... , -100.
  +Formula_Dictionary_Display_Examples_Html=\uD301: \uC2E4\uC81C\uAC12\uBC94\uC704:\=0 - $$$\uFF0C
\uCD5C\uC885\uACB0\uACFC\uC758\uC2E4\uC81C\uAC12: 1, 2, ..., 100,\uD45C\uC2DC\uAC12: -1, -2, ... , -100.
  ECP-error_pwd=\uBE44\uBC00\uBC88\uD638\uC785\uB825\uC624\uB958 FR-Hyperlink_ChartHyperlink=\uCC28\uD2B8\uD558\uC774\uD37C\uB9C1\uD06C M_Edit-FormatBrush=\uC11C\uC2DD\uD504\uB9B0\uD2B8(B) diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index 37dee8ad4..4b38fc25e 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -860,7 +860,7 @@ RP_Authority_Edit=\u6743\u9650\u7F16\u8F91 Warnning=\u63D0\u9192 RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8BB8\u4E3A\u7A7A\u4E14\u4E0D\u80FD\u91CD\u590D Application=\u5E94\u7528\u7A0B\u5E8F -Formula_Dictionary_Display_Examples_Html=\u5B9E\u9645\u503C\u8303\u56F4\u4E3A \=range(100),\u5BF9\u5B9E\u9645\u503C\u8303\u56F4\u5185\u7684\u6BCF\u4E2A$$$\u7684\u663E\u793A\u516C\u5F0F\u4E3A \=0 - $$$\uFF0C
\u5219\u6700\u7EC8\u7684\u7ED3\u679C\u5B9E\u9645\u503C\u4E3A1, 2, ..., 100,\u663E\u793A\u503C\u4E3A-1, -2, ... , -100\u3002
  +Formula_Dictionary_Display_Examples_Html=\u63D0\u793A\uFF1A\u5B9E\u9645\u503C\u8303\u56F4\u4E3A \=range(100),\u5BF9\u5B9E\u9645\u503C\u8303\u56F4\u5185\u7684\u6BCF\u4E2A$$$\u7684\u663E\u793A\u516C\u5F0F\u4E3A \=0 - $$$\uFF0C\u5219\u6700\u7EC8\u7684\u7ED3\u679C\u5B9E\u9645\u503C\u4E3A1, 2, ..., 100,\u663E\u793A\u503C\u4E3A-1, -2, ... , -100\u3002
  ECP-error_pwd=\u5BC6\u7801\u9519\u8BEF FR-Hyperlink_ChartHyperlink=\u56FE\u8868\u8D85\u94FE M_Edit-FormatBrush=\u683C\u5F0F\u5237(B) diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index 41cb4bed8..2073e65ae 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -859,7 +859,7 @@ RP_Authority_Edit=\u6B0A\u9650\u7DE8\u8F2F Warnning=\u63D0\u9192 RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8A31\u70BA\u7A7A\u4E14\u4E0D\u80FD\u91CD\u8907 Application=\u61C9\u7528\u7A0B\u5F0F -Formula_Dictionary_Display_Examples_Html=\u5BE6\u969B\u503C\u7BC4\u570D\u70BA \=range(100),\u5C0D\u5BE6\u969B\u503C\u7BC4\u570D\u5167\u7684\u6BCF\u500B$$$\u7684\u986F\u793A\u516C\u5F0F\u70BA \=0 - $$$\uFF0C
\u5247\u6700\u7D42\u7684\u7D50\u679C\u5BE6\u969B\u503C\u70BA1, 2, ..., 100,\u986F\u793A\u503C\u70BA-1, -2, ... , -100\u3002
  +Formula_Dictionary_Display_Examples_Html=\u63D0\u793A\uFF1A\u5BE6\u969B\u503C\u7BC4\u570D\u70BA \=range(100),\u5C0D\u5BE6\u969B\u503C\u7BC4\u570D\u5167\u7684\u6BCF\u500B$$$\u7684\u986F\u793A\u516C\u5F0F\u70BA \=0 - $$$\uFF0C
\u5247\u6700\u7D42\u7684\u7D50\u679C\u5BE6\u969B\u503C\u70BA1, 2, ..., 100,\u986F\u793A\u503C\u70BA-1, -2, ... , -100\u3002
  ECP-error_pwd=\u5BC6\u78BC\u932F\u8AA4 FR-Hyperlink_ChartHyperlink=\u5716\u8868\u8D85\u93C8 M_Edit-FormatBrush=\u8907\u88FD\u683C\u5F0F(B) diff --git a/designer_base/src/com/fr/design/present/dict/FormulaDictPane.java b/designer_base/src/com/fr/design/present/dict/FormulaDictPane.java index 6a3130a9c..dab59eaff 100644 --- a/designer_base/src/com/fr/design/present/dict/FormulaDictPane.java +++ b/designer_base/src/com/fr/design/present/dict/FormulaDictPane.java @@ -5,6 +5,7 @@ import com.fr.base.Formula; import com.fr.data.impl.FormulaDictionary; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.constants.LayoutConstants; +import com.fr.design.constants.UIConstants; import com.fr.design.editor.editor.FormulaEditor; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; @@ -48,6 +49,7 @@ public class FormulaDictPane extends FurtherBasicBeanPane { int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}}; UILabel tag = new UILabel(Inter.getLocText("Formula_Dictionary_Display_Examples_Html")); + tag.setForeground(new Color(51, 51, 52)); tag.setPreferredSize(new Dimension(225, 80)); JPanel t = new JPanel(new BorderLayout()); t.add(tag, BorderLayout.CENTER); From 7f7c22f2c520e22c6ede74f91e19662e44eca8cc Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 9 Oct 2017 16:07:07 +0800 Subject: [PATCH 08/35] =?UTF-8?q?REPORT-4883=20=E6=A8=A1=E6=9D=BF=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=8E=A7=E4=BB=B6=E9=97=AE=E9=A2=98=3D>=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=8F=82=E6=95=B0=EF=BC=8C=E5=86=8D=E6=92=A4=E9=94=80?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=88=B7=E6=96=B0=E5=8F=B3=E4=B8=8A=E8=A7=92?= =?UTF-8?q?=E7=9A=84=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_form/src/com/fr/design/mainframe/JForm.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index 2aa57462b..6a1789b4b 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -556,6 +556,7 @@ public class JForm extends JTemplate implements BaseJForm { //撤销的时候要重新选择的body布局 this.formDesign.getSelectionModel().setSelectedCreators(FormSelectionUtils.rebuildSelection(formDesign.getRootComponent(), formDesign.getRootComponent() == selectedBodyLayout() ? u.getSelectWidgets() : new Widget[]{selectedBodyLayout().toData()})); + refreshToolArea(); } else { String widgetName = this.formDesign.getElementCaseContainerName(); //这儿太坑了,u.getForm() 与 getTarget内容不一样 From 315bed73112b850788ac137f1e68515e1fbb820a Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Mon, 9 Oct 2017 16:09:08 +0800 Subject: [PATCH 09/35] =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E5=A4=A7=E5=B0=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/quickeditor/CellQuickEditor.java | 2 +- .../chartquick/BasicChartQuickEditor.java | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/designer/src/com/fr/quickeditor/CellQuickEditor.java b/designer/src/com/fr/quickeditor/CellQuickEditor.java index 2b5ce14c7..43b291c97 100644 --- a/designer/src/com/fr/quickeditor/CellQuickEditor.java +++ b/designer/src/com/fr/quickeditor/CellQuickEditor.java @@ -66,7 +66,7 @@ public abstract class CellQuickEditor extends QuickEditor { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = {p, f}; - double[] rowSize = {p, p}; + double[] rowSize = {p, f}; JComponent centerBody = createCenterBody(); JPanel topContent = initTopContent(); if (isScrollAll()) { diff --git a/designer/src/com/fr/quickeditor/chartquick/BasicChartQuickEditor.java b/designer/src/com/fr/quickeditor/chartquick/BasicChartQuickEditor.java index c0671dfb8..7873f5089 100644 --- a/designer/src/com/fr/quickeditor/chartquick/BasicChartQuickEditor.java +++ b/designer/src/com/fr/quickeditor/chartquick/BasicChartQuickEditor.java @@ -11,11 +11,10 @@ import com.fr.quickeditor.CellQuickEditor; import com.fr.report.cell.Elem; import javax.swing.*; -import java.awt.*; public class BasicChartQuickEditor extends CellQuickEditor { - private JPanel content; + private BaseChartPropertyPane editingPropertyPane; public BasicChartQuickEditor() { super(); @@ -23,9 +22,9 @@ public class BasicChartQuickEditor extends CellQuickEditor { @Override public JComponent createCenterBody() { - content = new JPanel(); - content.setLayout(new BorderLayout()); - return content; + editingPropertyPane = DesignModuleFactory.getChartPropertyPane(); + editingPropertyPane.setBorder(BorderFactory.createEmptyBorder()); + return editingPropertyPane; } @Override @@ -40,16 +39,12 @@ public class BasicChartQuickEditor extends CellQuickEditor { @Override protected void refreshDetails() { - BaseChartPropertyPane editingPropertyPane; BaseChartCollection collection; Selection selection = tc.getSelection(); Elem element; CellSelection cs = (CellSelection) selection; element = tc.getEditingElementCase().getCellElement(cs.getColumn(), cs.getRow()); collection = (BaseChartCollection) element.getValue(); - editingPropertyPane = DesignModuleFactory.getChartPropertyPane(); - editingPropertyPane.setBorder(BorderFactory.createEmptyBorder()); - content.add(editingPropertyPane, BorderLayout.CENTER); editingPropertyPane.populateChartPropertyPane(collection, tc); } From 8a9a1d7e7316f2987c0bbcc31e7e973b5e793202 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 9 Oct 2017 18:55:52 +0800 Subject: [PATCH 10/35] =?UTF-8?q?REPORT-4883=20=E4=BB=A3=E7=A0=81=E8=A7=84?= =?UTF-8?q?=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../parameter/ParameterDefinitePane.java | 23 +-- .../designer/beans/models/SelectionModel.java | 150 ++++++++++-------- .../form/parameter/FormParaDesigner.java | 16 +- .../com/fr/design/mainframe/FormDesigner.java | 8 +- .../parameter/ParameterToolBarPane.java | 14 +- 5 files changed, 117 insertions(+), 94 deletions(-) diff --git a/designer/src/com/fr/design/parameter/ParameterDefinitePane.java b/designer/src/com/fr/design/parameter/ParameterDefinitePane.java index 4f8adabbb..cb53dd8b7 100644 --- a/designer/src/com/fr/design/parameter/ParameterDefinitePane.java +++ b/designer/src/com/fr/design/parameter/ParameterDefinitePane.java @@ -75,12 +75,23 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus this.setBorder(null); this.setLayout(FRGUIPaneFactory.createBorderLayout()); setComponentBg(this); -// formParaDesignEditor = new FormParaDesigner(new FormParameterUI()); paraDesignEditor = DesignModuleFactory.getFormParaDesigner(); if (paraDesignEditor == null) { return; } paraDesignEditor.initWidgetToolbarPane(); + + this.add(paraDesignEditor.createWrapper(), BorderLayout.CENTER); + + setButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/toolbarbtn/parametersetting.png")); + setButton.set4ToolbarButton(); + isshowWindowItem = new JCheckBoxMenuItem(Inter.getLocText("ParameterD-Show_Parameter_Window")); + isdelayItem = new JCheckBoxMenuItem(Inter.getLocText("ParameterD-Delay_Playing")); + + initListeners(); + } + + private void initListeners() { ((TargetComponent) paraDesignEditor).addTargetModifiedListener(new TargetModifiedListener() { @Override public void targetModified(TargetModifiedEvent e) { @@ -93,7 +104,6 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus paraDesignEditor.addListener(this); propertyChangeListener = new PropertyChangeAdapter() { - @Override public void propertyChange() { if (isEditing) { @@ -102,12 +112,7 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus } } }; - this.add(paraDesignEditor.createWrapper(), BorderLayout.CENTER); -// WidgetToolBarPane.getRecentSearchManger(formParaDesignEditor); - setButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/toolbarbtn/parametersetting.png")); - setButton.set4ToolbarButton(); - isshowWindowItem = new JCheckBoxMenuItem(Inter.getLocText("ParameterD-Show_Parameter_Window")); isshowWindowItem.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { @@ -116,9 +121,8 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus } } }); - isdelayItem = new JCheckBoxMenuItem(Inter.getLocText("ParameterD-Delay_Playing")); - isdelayItem.addItemListener(new ItemListener() { + isdelayItem.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { if (propertyChangeListener != null) { @@ -128,7 +132,6 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus } }); - setButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { diff --git a/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java b/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java index 354ba3f63..e805ced3c 100644 --- a/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java +++ b/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java @@ -136,37 +136,7 @@ public class SelectionModel { private void unselectedPaste() { if (designer.getClass().equals(FormDesigner.class)) { if (selection.getSelectedCreator() instanceof XWFitLayout) { - if (selection.getSelectedCreator().getClass().equals(XWTabFitLayout.class)) { - XLayoutContainer container = (XLayoutContainer) selection.getSelectedCreator(); - //tab布局编辑器内部左上角第一个坐标点 - int leftUpX = container.toData().getMargin().getLeft() + 1; - int leftUpY = container.toData().getMargin().getTop() + 1; - //选中第一个坐标点坐在的组件 - selection.setSelectedCreator((XCreator) container.getComponentAt(leftUpX, leftUpY)); - Rectangle rectangle = selection.getRelativeBounds(); - if (hasSelectedPasteSource()) { - selectedPaste(); - } else { - FormSelectionUtils.paste2Container(designer, container, clipboard, - rectangle.x + rectangle.width / 2, - rectangle.y + DELTA_X_Y); - } - } else { - //自适应布局编辑器内部左上角第一个坐标点 - int leftUpX = designer.getRootComponent().toData().getMargin().getLeft() + 1; - int leftUpY = designer.getRootComponent().toData().getMargin().getTop() + 1; - //选中第一个坐标点坐在的组件 - selection.setSelectedCreator((XCreator) designer.getRootComponent().getComponentAt(leftUpX, leftUpY)); - Rectangle rectangle = selection.getRelativeBounds(); - if (hasSelectedPasteSource()) { - selectedPaste(); - } else { - FormSelectionUtils.paste2Container(designer, designer.getRootComponent(), - clipboard, - rectangle.x + rectangle.width / 2, - rectangle.y + DELTA_X_Y); - } - } + pasteXWFitLayout(); } else { //绝对布局 //编辑器外面还有两层容器,使用designer.getRootComponent()获取到的是编辑器中层的容器,不是编辑器表层 @@ -186,6 +156,40 @@ public class SelectionModel { } } + private void pasteXWFitLayout() { + if (selection.getSelectedCreator().getClass().equals(XWTabFitLayout.class)) { + XLayoutContainer container = (XLayoutContainer) selection.getSelectedCreator(); + //tab布局编辑器内部左上角第一个坐标点 + int leftUpX = container.toData().getMargin().getLeft() + 1; + int leftUpY = container.toData().getMargin().getTop() + 1; + //选中第一个坐标点坐在的组件 + selection.setSelectedCreator((XCreator) container.getComponentAt(leftUpX, leftUpY)); + Rectangle rectangle = selection.getRelativeBounds(); + if (hasSelectedPasteSource()) { + selectedPaste(); + } else { + FormSelectionUtils.paste2Container(designer, container, clipboard, + rectangle.x + rectangle.width / 2, + rectangle.y + DELTA_X_Y); + } + } else { + //自适应布局编辑器内部左上角第一个坐标点 + int leftUpX = designer.getRootComponent().toData().getMargin().getLeft() + 1; + int leftUpY = designer.getRootComponent().toData().getMargin().getTop() + 1; + //选中第一个坐标点坐在的组件 + selection.setSelectedCreator((XCreator) designer.getRootComponent().getComponentAt(leftUpX, leftUpY)); + Rectangle rectangle = selection.getRelativeBounds(); + if (hasSelectedPasteSource()) { + selectedPaste(); + } else { + FormSelectionUtils.paste2Container(designer, designer.getRootComponent(), + clipboard, + rectangle.x + rectangle.width / 2, + rectangle.y + DELTA_X_Y); + } + } + } + /** * 粘贴时选择组件 */ @@ -404,45 +408,57 @@ public class SelectionModel { if (x < (bounds.x - XCreatorConstants.RESIZE_BOX_SIZ)) { return Location.outer; } else if ((x >= (bounds.x - XCreatorConstants.RESIZE_BOX_SIZ)) && (x <= bounds.x)) { - if (y < (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) { - return Location.outer; - } else if ((y >= (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) && (y <= bounds.y)) { - return Location.left_top; - } else if ((y > bounds.y) && (y < (bounds.y + bounds.height))) { - return Location.left; - } else if ((y >= (bounds.y + bounds.height)) - && (y <= (bounds.y + bounds.height + XCreatorConstants.RESIZE_BOX_SIZ))) { - return Location.left_bottom; - } else { - return Location.outer; - } + return getDirectionLeft(bounds, y); } else if ((x > bounds.x) && (x < (bounds.x + bounds.width))) { - if (y < (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) { - return Location.outer; - } else if ((y >= (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) && (y <= bounds.y)) { - return Location.top; - } else if ((y > bounds.y) && (y < (bounds.y + bounds.height))) { - return Location.inner; - } else if ((y >= (bounds.y + bounds.height)) - && (y <= (bounds.y + bounds.height + XCreatorConstants.RESIZE_BOX_SIZ))) { - return Location.bottom; - } else { - return Location.outer; - } + return getDirectionCenter(bounds, y); } else if ((x >= (bounds.x + bounds.width)) && (x <= (bounds.x + bounds.width + XCreatorConstants.RESIZE_BOX_SIZ))) { - if (y < (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) { - return Location.outer; - } else if ((y >= (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) && (y <= bounds.y)) { - return Location.right_top; - } else if ((y > bounds.y) && (y < (bounds.y + bounds.height))) { - return Location.right; - } else if ((y >= (bounds.y + bounds.height)) - && (y <= (bounds.y + bounds.height + XCreatorConstants.RESIZE_BOX_SIZ))) { - return Location.right_bottom; - } else { - return Location.outer; - } + return getDirectionRight(bounds, y); + } else { + return Location.outer; + } + } + + private Direction getDirectionRight(Rectangle bounds, int y) { + if (y < (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) { + return Location.outer; + } else if ((y >= (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) && (y <= bounds.y)) { + return Location.right_top; + } else if ((y > bounds.y) && (y < (bounds.y + bounds.height))) { + return Location.right; + } else if ((y >= (bounds.y + bounds.height)) + && (y <= (bounds.y + bounds.height + XCreatorConstants.RESIZE_BOX_SIZ))) { + return Location.right_bottom; + } else { + return Location.outer; + } + } + + private Direction getDirectionCenter(Rectangle bounds, int y) { + if (y < (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) { + return Location.outer; + } else if ((y >= (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) && (y <= bounds.y)) { + return Location.top; + } else if ((y > bounds.y) && (y < (bounds.y + bounds.height))) { + return Location.inner; + } else if ((y >= (bounds.y + bounds.height)) + && (y <= (bounds.y + bounds.height + XCreatorConstants.RESIZE_BOX_SIZ))) { + return Location.bottom; + } else { + return Location.outer; + } + } + + private Direction getDirectionLeft(Rectangle bounds, int y) { + if (y < (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) { + return Location.outer; + } else if ((y >= (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) && (y <= bounds.y)) { + return Location.left_top; + } else if ((y > bounds.y) && (y < (bounds.y + bounds.height))) { + return Location.left; + } else if ((y >= (bounds.y + bounds.height)) + && (y <= (bounds.y + bounds.height + XCreatorConstants.RESIZE_BOX_SIZ))) { + return Location.left_bottom; } else { return Location.outer; } diff --git a/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java b/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java index cc100df8e..b9d24b2cd 100644 --- a/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java +++ b/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java @@ -70,6 +70,9 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP private static final int SECOND_H_LOCATION = 170; private static final int ADD_HEIGHT = 20; private static final int H_GAP = 105; + private static final int SUBMIT_BUTTON_H_LOCATION = 270; + private static final int PARA_IMAGE_SHIFT_X = -4; + private static final int FORM_AREA_PADDING_LEFT = 13; private static Image paraImage = BaseUtils.readImage("/com/fr/design/images/form/parameter.png"); @@ -166,12 +169,7 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP @Override public void fireCreatorModified(DesignerEvent evt) { - if (evt.getCreatorEventID() == DesignerEvent.CREATOR_ADDED - || evt.getCreatorEventID() == DesignerEvent.CREATOR_CUTED - || evt.getCreatorEventID() == DesignerEvent.CREATOR_PASTED - || evt.getCreatorEventID() == DesignerEvent.CREATOR_DELETED - || evt.getCreatorEventID() == DesignerEvent.CREATOR_EDITED - || evt.getCreatorEventID() == DesignerEvent.CREATOR_RENAMED) { + if (evt.getCreatorEventID() != DesignerEvent.CREATOR_SELECTED) { paraDefinitePane.setParameterArray( paraDefinitePane.getNoRepeatParas(DesignModelAdapter.getCurrentModelAdapter().getParameters())); paraDefinitePane.refreshParameter(); @@ -187,7 +185,7 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP */ public Component createWrapper() { FormArea area = new FormArea(this, false); - area.setBorder(BorderFactory.createEmptyBorder(0, 13, 0, 0)); + area.setBorder(BorderFactory.createEmptyBorder(0, FORM_AREA_PADDING_LEFT, 0, 0)); return area; } @@ -439,7 +437,7 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP } for (Parameter p : paras) { if (p.getName().equalsIgnoreCase(creator.toData().getWidgetName())) { - g.drawImage(paraImage, creator.getX() - 4, creator.getY() + 2, null); + g.drawImage(paraImage, creator.getX() + PARA_IMAGE_SHIFT_X, creator.getY() + 2, null); break; } } @@ -617,7 +615,7 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP formSubmitButton.setWidgetName("Search"); formSubmitButton.setText(Inter.getLocText("FR-Designer_Query")); xCreator = XCreatorUtils.createXCreator(formSubmitButton); - if (!(this.autoAddComponent(xCreator, 270, FIRST_V_LOCATION + V_COMPONENT_GAP + if (!(this.autoAddComponent(xCreator, SUBMIT_BUTTON_H_LOCATION, FIRST_V_LOCATION + V_COMPONENT_GAP * (currentIndex / NUM_IN_A_LINE)))) { return false; } diff --git a/designer_form/src/com/fr/design/mainframe/FormDesigner.java b/designer_form/src/com/fr/design/mainframe/FormDesigner.java index 98bfbfeb4..fe998656b 100644 --- a/designer_form/src/com/fr/design/mainframe/FormDesigner.java +++ b/designer_form/src/com/fr/design/mainframe/FormDesigner.java @@ -123,6 +123,7 @@ public class FormDesigner extends TargetComponent implements TreeSelection private static final int SECOND_H_LOCATION = 170; private static final int ADD_HEIGHT = 20; private static final int H_GAP = 105; + private static final int SUBMIT_BUTTON_H_LOCATION = 270; public FormDesigner(Form form) { this(form, null); @@ -294,7 +295,7 @@ public class FormDesigner extends TargetComponent implements TreeSelection formSubmitButton.setWidgetName("Search"); formSubmitButton.setText(Inter.getLocText("FR-Designer_Query")); xCreator = XCreatorUtils.createXCreator(formSubmitButton); - if (!(this.autoAddComponent(xCreator, 270, FIRST_V_LOCATION + V_COMPONENT_GAP + if (!(this.autoAddComponent(xCreator, SUBMIT_BUTTON_H_LOCATION, FIRST_V_LOCATION + V_COMPONENT_GAP * (currentIndex / NUM_IN_A_LINE)))) { return; } @@ -1146,7 +1147,7 @@ public class FormDesigner extends TargetComponent implements TreeSelection * 同步 */ public void populateRootSize() { - + // do nothing } /** @@ -1232,6 +1233,7 @@ public class FormDesigner extends TargetComponent implements TreeSelection */ @Override public void stopEditing() { + // do nothing } /** @@ -1411,7 +1413,7 @@ public class FormDesigner extends TargetComponent implements TreeSelection parent = parent.getParent(); } - Object[] components = path.toArray(); + Object[] components = (Object[]) path.toArray(); if (components.length == 0) { return null; } diff --git a/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java b/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java index daac4c2db..422c08ab0 100644 --- a/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java +++ b/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java @@ -35,6 +35,7 @@ public class ParameterToolBarPane extends BasicBeanPane { private static final int BUTTON_HEIGHT = 20; private static final int WIDTH = 225; private static final int L_H = 18; + private static final int LABEL_PADDING_LEFT = 4; public ParameterToolBarPane() { this.setLayout(new FlowParameterPaneLayout()); @@ -47,9 +48,9 @@ public class ParameterToolBarPane extends BasicBeanPane { return new Dimension(super.getPreferredSize().width, 18); } }; - label.setText(Inter.getLocText("FR-Following_parameters_are_not_generated")+":"); + label.setText(Inter.getLocText("FR-Following_parameters_are_not_generated") + ":"); label.setHorizontalAlignment(SwingConstants.LEFT); - label.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 0)); + label.setBorder(BorderFactory.createEmptyBorder(0, LABEL_PADDING_LEFT, 0, 0)); this.add(label); addAll = new UIButton(Inter.getLocText("FR-Designer_Add_all")); @@ -68,7 +69,7 @@ public class ParameterToolBarPane extends BasicBeanPane { public Parameter getTargetParameter(UIButton button) { int index = parameterSelectedLabellist.indexOf(button); - if(index < 0 || index > parameterList.length - 1) { + if (index < 0 || index > parameterList.length - 1) { return null; } return parameterList[index]; @@ -122,12 +123,15 @@ public class ParameterToolBarPane extends BasicBeanPane { private class FlowParameterPaneLayout implements LayoutManager { public FlowParameterPaneLayout() { + // do nothing } public void addLayoutComponent(String name, Component comp) { + // do nothing } public void removeLayoutComponent(Component comp) { + // do nothing } public Dimension preferredLayoutSize(Container parent) { @@ -135,7 +139,7 @@ public class ParameterToolBarPane extends BasicBeanPane { layoutContainer(parent); - int h= ((parameterSelectedLabellist.size() == 0) ? 0 : breakid * (BUTTON_HEIGHT + GAP_V) + GAP_BV + L_H + GAP_H + addAll.getPreferredSize().height); + int h= (parameterSelectedLabellist.isEmpty() ? 0 : breakid * (BUTTON_HEIGHT + GAP_V) + GAP_BV + L_H + GAP_H + addAll.getPreferredSize().height); return new Dimension(w, h); } @@ -153,7 +157,7 @@ public class ParameterToolBarPane extends BasicBeanPane { breakid = 1; for (UIButton tab : parameterSelectedLabellist) { Dimension dim = tab.getPreferredSize(); - if(x + dim.width > width) { + if (x + dim.width > width) { breakid++; x = 0; y += (dim.height + GAP_V); From d9a13704c3ed3cc881c0927a7149bcf880cef5d4 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 10 Oct 2017 09:21:44 +0800 Subject: [PATCH 11/35] =?UTF-8?q?REPORT-4604=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E4=BF=AE=E6=94=B9=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E5=B1=9E=E6=80=A7-=E5=85=B6=E4=BB=96-=E6=8F=92?= =?UTF-8?q?=E5=85=A5=E8=A1=8C=E7=AD=96=E7=95=A5=20=E6=95=B0=E5=AD=97?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/editor/ValueEditorPaneFactory.java | 2 +- .../editor/editor/SpinnerIntegerEditor.java | 66 +++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 designer_base/src/com/fr/design/editor/editor/SpinnerIntegerEditor.java diff --git a/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java b/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java index 29ee9e60a..e63b3c974 100644 --- a/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java +++ b/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java @@ -202,7 +202,7 @@ public class ValueEditorPaneFactory { FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); return new Editor[]{ new TextEditor(), - new IntegerEditor(), + new SpinnerIntegerEditor(), new DoubleEditor(), new DateEditor(true, Inter.getLocText("Date")), new BooleanEditor(), diff --git a/designer_base/src/com/fr/design/editor/editor/SpinnerIntegerEditor.java b/designer_base/src/com/fr/design/editor/editor/SpinnerIntegerEditor.java new file mode 100644 index 000000000..2366350f6 --- /dev/null +++ b/designer_base/src/com/fr/design/editor/editor/SpinnerIntegerEditor.java @@ -0,0 +1,66 @@ +package com.fr.design.editor.editor; + +import com.fr.base.Utils; +import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.general.Inter; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; + +public class SpinnerIntegerEditor extends Editor { + + private UISpinner spinner; + private String oldValue = StringUtils.EMPTY; + + public SpinnerIntegerEditor(){ + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + spinner = new UISpinner(-Integer.MAX_VALUE, Integer.MAX_VALUE, 1, 0); + this.add(spinner, BorderLayout.CENTER); + this.spinner.addKeyListener(textKeyListener); + this.setName(Inter.getLocText("Parameter-Integer")); + } + + @Override + public Integer getValue() { + return new Integer((int) this.spinner.getValue()); + } + + @Override + public void setValue(Integer value) { + if (value == null) { + value = new Integer(0); + } + this.spinner.setValue(value.intValue()); + oldValue = Utils.objectToString(value); + } + + @Override + public boolean accept(Object object) { + return object != null && object instanceof Integer; + } + + public String getIconName() { + return "type_int"; + } + + KeyListener textKeyListener = new KeyAdapter() { + + public void keyReleased(KeyEvent evt) { + int code = evt.getKeyCode(); + + if (code == KeyEvent.VK_ESCAPE) { + spinner.setValue(Double.parseDouble(oldValue)); + } + if (code == KeyEvent.VK_ENTER) { + fireEditingStopped(); + } else { + fireStateChanged(); + } + } + }; +} From 038a911398173b861a8c7236c59b10c747e2b902 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 10 Oct 2017 09:51:01 +0800 Subject: [PATCH 12/35] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/editor/ValueEditorPaneFactory.java | 128 ++++++++++-------- .../design/editor/editor/IntegerEditor.java | 2 +- .../editor/editor/SpinnerIntegerEditor.java | 3 +- .../com/fr/design/locale/designer.properties | 4 +- .../design/locale/designer_en_US.properties | 4 +- .../design/locale/designer_ja_JP.properties | 4 +- .../design/locale/designer_ko_KR.properties | 4 +- .../design/locale/designer_zh_CN.properties | 5 +- .../design/locale/designer_zh_TW.properties | 4 +- .../design/present/dict/FormulaDictPane.java | 4 +- 10 files changed, 86 insertions(+), 76 deletions(-) diff --git a/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java b/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java index e63b3c974..ebf712cc8 100644 --- a/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java +++ b/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java @@ -65,9 +65,10 @@ public class ValueEditorPaneFactory { * @return 返回公式编辑器面板 */ public static ValueEditorPane createFormulaValueEditorPane() { - return createValueEditorPane(new Editor[]{new FormulaEditor(Inter.getLocText("Parameter-Formula"))}, + return createValueEditorPane(new Editor[]{new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"))}, StringUtils.EMPTY, StringUtils.EMPTY); } + /** * 创建基本的值编辑器面板 * @@ -138,11 +139,13 @@ public class ValueEditorPaneFactory { /** * 创建不带公式面板的pane + * * @return 编辑器面板 */ - public static ValueEditorPane createBasicEditorWithoutFormulaPane(){ + public static ValueEditorPane createBasicEditorWithoutFormulaPane() { return createValueEditorPane(basicEditorsWithoutFormula(), StringUtils.EMPTY, StringUtils.EMPTY); } + /** * 创建NoCRNoColumn * @@ -154,19 +157,22 @@ public class ValueEditorPaneFactory { /** * 创建数值编辑器 + * * @return 值编辑器 */ - public static ValueEditorPane createNumberValueEditorPane(){ + public static ValueEditorPane createNumberValueEditorPane() { return createValueEditorPane(numberEditors(), StringUtils.EMPTY, StringUtils.EMPTY); } /** * 创建日期编辑器 + * * @return 值编辑器 */ - public static ValueEditorPane createDateValueEditorPane(){ + public static ValueEditorPane createDateValueEditorPane() { return createValueEditorPane(dateEditors(), StringUtils.EMPTY, StringUtils.EMPTY); } + /** * 根据参数paraUseType 创建编辑器类型. * @@ -199,7 +205,7 @@ public class ValueEditorPaneFactory { * @return 值编辑器 */ public static Editor[] basicEditors() { - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); return new Editor[]{ new TextEditor(), new SpinnerIntegerEditor(), @@ -216,7 +222,7 @@ public class ValueEditorPaneFactory { * @return 值编辑器 */ public static Editor[] formEditors() { - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); return new Editor[]{ new TextEditor(), new IntegerEditor(), @@ -234,7 +240,7 @@ public class ValueEditorPaneFactory { * @return 值编辑器 */ public static Editor[] extendedEditors() { - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); return new Editor[]{ new TextEditor(), new IntegerEditor(), @@ -247,35 +253,37 @@ public class ValueEditorPaneFactory { }; } - /** - * 带单元格组的编辑器 - * @return 值编辑器 - */ - public static Editor[] extendedCellGroupEditors() { - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); - return new Editor[]{ - new TextEditor(), - new IntegerEditor(), - new DoubleEditor(), - new DateEditor(true, Inter.getLocText("Date")), - new BooleanEditor(), - formulaEditor, - new ParameterEditor(), - new ColumnRowEditor(Inter.getLocText("Cell")), - new ColumnRowGroupEditor(Inter.getLocText("Cell_Group")) - }; - } - - /** - * 只有单元格和单元格组的编辑器 - * @return 编辑器b - */ - public static Editor[] cellGroupEditor() { - return new Editor[] { - new ColumnRowEditor(Inter.getLocText("Cell")), - new ColumnRowGroupEditor(Inter.getLocText("Cell_Group")) - }; - } + /** + * 带单元格组的编辑器 + * + * @return 值编辑器 + */ + public static Editor[] extendedCellGroupEditors() { + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); + return new Editor[]{ + new TextEditor(), + new IntegerEditor(), + new DoubleEditor(), + new DateEditor(true, Inter.getLocText("Date")), + new BooleanEditor(), + formulaEditor, + new ParameterEditor(), + new ColumnRowEditor(Inter.getLocText("Cell")), + new ColumnRowGroupEditor(Inter.getLocText("FR-Designer-Cell_Group")) + }; + } + + /** + * 只有单元格和单元格组的编辑器 + * + * @return 编辑器b + */ + public static Editor[] cellGroupEditor() { + return new Editor[]{ + new ColumnRowEditor(Inter.getLocText("Cell")), + new ColumnRowGroupEditor(Inter.getLocText("FR-Designer-Cell_Group")) + }; + } /** * URL的一些编辑器. @@ -302,7 +310,7 @@ public class ValueEditorPaneFactory { return new Editor[]{ new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? Inter.getLocText("None") : popupName), new DateEditor(true, Inter.getLocText("Date")), - new FormulaEditor(Inter.getLocText("Parameter-Formula")) + new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")) }; } @@ -312,7 +320,7 @@ public class ValueEditorPaneFactory { * @return 值编辑器 */ public static Editor[] allEditors() { - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); // formulaEditor.setEnabled(true); return new Editor[]{ new TextEditor(), @@ -331,9 +339,10 @@ public class ValueEditorPaneFactory { /** * 不带公式编辑器 + * * @return 编辑器不带公式 */ - public static Editor[] basicEditorsWithoutFormula(){ + public static Editor[] basicEditorsWithoutFormula() { return new Editor[]{ new TextEditor(), new IntegerEditor(), @@ -349,7 +358,7 @@ public class ValueEditorPaneFactory { * @return 编辑器 */ public static Editor[] noCRnoColumnEditors() { - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); return new Editor[]{ new TextEditor(), new IntegerEditor(), @@ -363,10 +372,11 @@ public class ValueEditorPaneFactory { /** * 数值编辑器 - * @return 编辑器 + * + * @return 编辑器 */ public static Editor[] numberEditors() { - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); return new Editor[]{ new IntegerEditor(), new DoubleEditor(), @@ -377,10 +387,11 @@ public class ValueEditorPaneFactory { /** * 日期编辑器 + * * @return 编辑器 */ public static Editor[] dateEditors() { - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); return new Editor[]{ new DateEditor(true, Inter.getLocText("Date")), formulaEditor, @@ -394,7 +405,7 @@ public class ValueEditorPaneFactory { * @return 存储过程的编辑器 */ public static Editor[] StoreProcedureEditors() { - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); formulaEditor.setEnabled(true); return new Editor[]{ new CursorEditor(), @@ -422,7 +433,7 @@ public class ValueEditorPaneFactory { list.add(new DateEditor(true, Inter.getLocText("Date"))); list.add(new BooleanEditor()); - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); formulaEditor.setEnabled(true); list.add(formulaEditor); @@ -436,30 +447,29 @@ public class ValueEditorPaneFactory { * @return 值编辑器 */ private static List createEditors4Chart(int paraUseType) { - if(paraUseType == ParameterTableModel.CHART_PIE_USE) { + if (paraUseType == ParameterTableModel.CHART_PIE_USE) { return getPieEditor(); - } else if(paraUseType == ParameterTableModel.CHART_MAP_USE) { + } else if (paraUseType == ParameterTableModel.CHART_MAP_USE) { return getMapEditor(); - } else if(paraUseType == ParameterTableModel.CHART_GIS_USE) { + } else if (paraUseType == ParameterTableModel.CHART_GIS_USE) { return getGisEditor(); - } else if(paraUseType == ParameterTableModel.CHART__XY_USE) { + } else if (paraUseType == ParameterTableModel.CHART__XY_USE) { return getXYEditor(); - } else if(paraUseType == ParameterTableModel.CHART_BUBBLE_USE) { + } else if (paraUseType == ParameterTableModel.CHART_BUBBLE_USE) { return getBubbbleEdtor(); - } else if(paraUseType == ParameterTableModel.CHART_NO_USE) { + } else if (paraUseType == ParameterTableModel.CHART_NO_USE) { return getChartNoUseEditor(); - } else if(paraUseType == ParameterTableModel.CHART_METER_USE) { + } else if (paraUseType == ParameterTableModel.CHART_METER_USE) { return getMeterEditor(); - } else if(paraUseType == ParameterTableModel.CHART_STOCK_USE) { + } else if (paraUseType == ParameterTableModel.CHART_STOCK_USE) { return getStockEditor(); - } else if(paraUseType == ParameterTableModel.CHART_GANTT_USE) { + } else if (paraUseType == ParameterTableModel.CHART_GANTT_USE) { return getGanttEditor(); - } else if(paraUseType == ParameterTableModel.FORM_ELEMENTCASE_USE) { + } else if (paraUseType == ParameterTableModel.FORM_ELEMENTCASE_USE) { return getFormElementCaseEditor(); - } else if(paraUseType == ParameterTableModel.FORM_CHART_USE) { - return getFormChartEditor(); - } - else { + } else if (paraUseType == ParameterTableModel.FORM_CHART_USE) { + return getFormChartEditor(); + } else { return getChartEditor(); } } diff --git a/designer_base/src/com/fr/design/editor/editor/IntegerEditor.java b/designer_base/src/com/fr/design/editor/editor/IntegerEditor.java index b1661277a..ff69446ba 100644 --- a/designer_base/src/com/fr/design/editor/editor/IntegerEditor.java +++ b/designer_base/src/com/fr/design/editor/editor/IntegerEditor.java @@ -18,7 +18,7 @@ public class IntegerEditor extends NumberEditor { } public IntegerEditor(Integer value) { - super(value, Inter.getLocText("Parameter-Integer")); + super(value, Inter.getLocText("FR-Designer_Parameter_Integer")); } @Override diff --git a/designer_base/src/com/fr/design/editor/editor/SpinnerIntegerEditor.java b/designer_base/src/com/fr/design/editor/editor/SpinnerIntegerEditor.java index 2366350f6..5448a0868 100644 --- a/designer_base/src/com/fr/design/editor/editor/SpinnerIntegerEditor.java +++ b/designer_base/src/com/fr/design/editor/editor/SpinnerIntegerEditor.java @@ -6,7 +6,6 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.general.Inter; import com.fr.stable.StringUtils; -import javax.swing.*; import java.awt.*; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; @@ -22,7 +21,7 @@ public class SpinnerIntegerEditor extends Editor { spinner = new UISpinner(-Integer.MAX_VALUE, Integer.MAX_VALUE, 1, 0); this.add(spinner, BorderLayout.CENTER); this.spinner.addKeyListener(textKeyListener); - this.setName(Inter.getLocText("Parameter-Integer")); + this.setName(Inter.getLocText("FR-Designer_Parameter_Integer")); } @Override diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 59ead5237..f006d5afb 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -856,7 +856,7 @@ RP_Authority_Edit=Authority Warnning=Warning RoleName_Can_Not_Be_Null=RoleName_Can_Not_Be_Null Application=Applications -Formula_Dictionary_Display_Examples_Html=the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$,
the result is 1, 2, ..., 100 and -1, -2, ..., -100.
+FR-Designer-Formula_Dictionary_Display_Examples_Html=the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$,
the result is 1, 2, ..., 100 and -1, -2, ..., -100.
ECP-error_pwd= FR-Hyperlink_ChartHyperlink= M_Edit-FormatBrush=Format Painter @@ -1425,7 +1425,7 @@ Out_Thick_Border_Line=Out Thick Border Line FR-App-File_Lookup_range= ReportColumns-Columns_to=Columns to Transparent=Transparent -Parameter-Integer=Integer +FR-Designer_Parameter_Integer=Integer PDF-Print_Setting=PDF Print Setting Server-Embedded_Server=Embedded Server M_Server-Server_Config_Manager=Server Configuration Manager diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index e7094c00c..7392e9589 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -859,7 +859,7 @@ RP_Authority_Edit=Permission Warnning=Warning RoleName_Can_Not_Be_Null=Role name can not be null or duplicate Application=Applications -Formula_Dictionary_Display_Examples_Html=Tip: the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$,
the result is 1, 2, ..., 100 and -1, -2, ..., -100.
+FR-Designer-Formula_Dictionary_Display_Examples_Html=Tip: the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$,
the result is 1, 2, ..., 100 and -1, -2, ..., -100.
ECP-error_pwd=Password Error FR-Hyperlink_ChartHyperlink=Chart Hyperlink M_Edit-FormatBrush=Format Painter @@ -1427,7 +1427,7 @@ Out_Thick_Border_Line=Thick Border FR-App-File_Lookup_range=Search range ReportColumns-Columns_to=Split To Transparent=Transparent -Parameter-Integer=Integer +FR-Designer_Parameter_Integer=Integer PDF-Print_Setting=PDF Print Setting Server-Embedded_Server=Built-in server M_Server-Server_Config_Manager=Server Configuration Manager diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index 2d6ec8641..aa65d9ba4 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -857,7 +857,7 @@ RP_Authority_Edit=\u6A29\u9650\u7DE8\u96C6 Warnning=\u30EA\u30DE\u30A4\u30F3\u30C9 RoleName_Can_Not_Be_Null=\u5F79\u5272\u540D\u306F\u7A7A\u6B04\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u305A\u3001\u91CD\u8907\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u305B\u3093 Application=\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3 -Formula_Dictionary_Display_Examples_Html=\u30D2\u30F3\u30C8: \u5B9F\u969B\u306E\u5024\u304C \=range(100)\u306E\u3068\u304D\u3001\u5B9F\u969B\u306E\u5024($$$)\u306E\u8868\u793A\u3059\u308B\u5024\u306E\u6570\u5F0F\u304C \= 0 - $$$\u306E\u3068\u304D\u3001\n\u6700\u7D42\u7684\u306A\u5B9F\u969B\u306E\u5024\u306F\u30011, 2, ..., 100\u3067\u3042\u308A\u3001\n\u305D\u306E\u8868\u793A\u7D50\u679C\u306F-1, -2, ..., -100\u3068\u306A\u308B\u3002
+FR-Designer-Formula_Dictionary_Display_Examples_Html=\u30D2\u30F3\u30C8: \u5B9F\u969B\u306E\u5024\u304C \=range(100)\u306E\u3068\u304D\u3001\u5B9F\u969B\u306E\u5024($$$)\u306E\u8868\u793A\u3059\u308B\u5024\u306E\u6570\u5F0F\u304C \= 0 - $$$\u306E\u3068\u304D\u3001\n\u6700\u7D42\u7684\u306A\u5B9F\u969B\u306E\u5024\u306F\u30011, 2, ..., 100\u3067\u3042\u308A\u3001\n\u305D\u306E\u8868\u793A\u7D50\u679C\u306F-1, -2, ..., -100\u3068\u306A\u308B\u3002
ECP-error_pwd=\u30D1\u30B9\u30EF\u30FC\u30C9\u30A8\u30E9\u30FC FR-Hyperlink_ChartHyperlink=\u30B0\u30E9\u30D5\u30CF\u30A4\u30D1\u30FC\u30EA\u30F3\u30AF M_Edit-FormatBrush=\u66F8\u5F0F\u30D6\u30E9\u30B7(B) @@ -1427,7 +1427,7 @@ Out_Thick_Border_Line=\u30DC\u30C3\u30AF\u30B9\u30D5\u30EC\u30FC\u30E0\u30E9\u30 FR-App-File_Lookup_range=\u691C\u7D22\u7BC4\u56F2 ReportColumns-Columns_to=\u306E\u3088\u3046\u306B\u6539\u5217\u3059\u308B Transparent=\u900F\u660E -Parameter-Integer=\u6574\u6570\u578B +FR-Designer_Parameter_Integer=\u6574\u6570\u578B PDF-Print_Setting=PDF\u5370\u5237\u8A2D\u5B9A Server-Embedded_Server=\u5185\u8535\u30B5\u30FC\u30D0\u30FC M_Server-Server_Config_Manager=\u30B5\u30FC\u30D0\u30FC\u914D\u7F6E(S) diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index 586d85869..a600453f5 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -857,7 +857,7 @@ RP_Authority_Edit=\uAD8C\uD55C\uD3B8\uC9D1 Warnning=\uC54C\uB9BC RoleName_Can_Not_Be_Null=\uC5ED\uD560\uC774\uB984\uC740\uBE44\uC5B4\uC788\uAC70\uB098\uC911\uBCF5\uB418\uC5B4\uC11C\uB294\uC548\uB429\uB2C8\uB2E4. Application=\uC560\uD50C\uB9AC\uCF00\uC774\uC158 -Formula_Dictionary_Display_Examples_Html=\uD301: \uC2E4\uC81C\uAC12\uBC94\uC704:\=0 - $$$\uFF0C
\uCD5C\uC885\uACB0\uACFC\uC758\uC2E4\uC81C\uAC12: 1, 2, ..., 100,\uD45C\uC2DC\uAC12: -1, -2, ... , -100.
  +FR-Designer-Formula_Dictionary_Display_Examples_Html=\uD301: \uC2E4\uC81C\uAC12\uBC94\uC704:\=0 - $$$\uFF0C
\uCD5C\uC885\uACB0\uACFC\uC758\uC2E4\uC81C\uAC12: 1, 2, ..., 100,\uD45C\uC2DC\uAC12: -1, -2, ... , -100.
  ECP-error_pwd=\uBE44\uBC00\uBC88\uD638\uC785\uB825\uC624\uB958 FR-Hyperlink_ChartHyperlink=\uCC28\uD2B8\uD558\uC774\uD37C\uB9C1\uD06C M_Edit-FormatBrush=\uC11C\uC2DD\uD504\uB9B0\uD2B8(B) @@ -1426,7 +1426,7 @@ Out_Thick_Border_Line=\uAD75\uC740\uBC14\uAE65\uCABD\uD14C\uB450\uB9AC\uC120 FR-App-File_Lookup_range=\uBC94\uC704\uAC80\uC0C9 ReportColumns-Columns_to=\uC140\uB098\uB204\uAE30 Transparent=\uD22C\uBA85 -Parameter-Integer=\uC804\uCCB4\uD0C0\uC785 +FR-Designer_Parameter_Integer=\uC804\uCCB4\uD0C0\uC785 PDF-Print_Setting=PDF\uC778\uC1C4\uC124\uC815 Server-Embedded_Server=\uB0B4\uC7A5\uB41C\uC11C\uBC84 M_Server-Server_Config_Manager=\uC11C\uBC84\uAD6C\uC131 diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index 4b38fc25e..984a94a54 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -860,7 +860,7 @@ RP_Authority_Edit=\u6743\u9650\u7F16\u8F91 Warnning=\u63D0\u9192 RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8BB8\u4E3A\u7A7A\u4E14\u4E0D\u80FD\u91CD\u590D Application=\u5E94\u7528\u7A0B\u5E8F -Formula_Dictionary_Display_Examples_Html=\u63D0\u793A\uFF1A\u5B9E\u9645\u503C\u8303\u56F4\u4E3A \=range(100),\u5BF9\u5B9E\u9645\u503C\u8303\u56F4\u5185\u7684\u6BCF\u4E2A$$$\u7684\u663E\u793A\u516C\u5F0F\u4E3A \=0 - $$$\uFF0C\u5219\u6700\u7EC8\u7684\u7ED3\u679C\u5B9E\u9645\u503C\u4E3A1, 2, ..., 100,\u663E\u793A\u503C\u4E3A-1, -2, ... , -100\u3002
  +FR-Designer-Formula_Dictionary_Display_Examples_Html=\u63D0\u793A\uFF1A\u5B9E\u9645\u503C\u8303\u56F4\u4E3A \=range(100),\u5BF9\u5B9E\u9645\u503C\u8303\u56F4\u5185\u7684\u6BCF\u4E2A$$$\u7684\u663E\u793A\u516C\u5F0F\u4E3A \=0 - $$$\uFF0C\u5219\u6700\u7EC8\u7684\u7ED3\u679C\u5B9E\u9645\u503C\u4E3A1, 2, ..., 100,\u663E\u793A\u503C\u4E3A-1, -2, ... , -100\u3002
  ECP-error_pwd=\u5BC6\u7801\u9519\u8BEF FR-Hyperlink_ChartHyperlink=\u56FE\u8868\u8D85\u94FE M_Edit-FormatBrush=\u683C\u5F0F\u5237(B) @@ -1243,6 +1243,7 @@ Rose_Red=\u73AB\u7470\u7EA2 StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=\u65CB\u8F6C\u503C\u5FC5\u987B\u5728\u8D1F90\u5EA6\u523090\u5EA6 HF-Move_Left=\u5DE6\u79FB Cell_Group=\u5355\u5143\u683C\u7EC4 +FR-Designer-Cell_Group=\u5355\u5143\u683C\u7EC4 Week=\u5468 PageSetup-Orientation=\u65B9\u5411 M-Open_Recent=\u6700\u8FD1\u6253\u5F00\u7684 @@ -1428,7 +1429,7 @@ Out_Thick_Border_Line=\u7C97\u5323\u6846\u7EBF FR-App-File_Lookup_range=\u67E5\u627E\u8303\u56F4 ReportColumns-Columns_to=\u5206\u680F\u6210 Transparent=\u900F\u660E -Parameter-Integer=\u6574\u578B +FR-Designer_Parameter_Integer=\u6574\u578B PDF-Print_Setting=PDF\u6253\u5370\u8BBE\u7F6E Server-Embedded_Server=\u5167\u7F6E\u7684\u670D\u52A1\u5668 M_Server-Server_Config_Manager=\u670D\u52A1\u5668\u914D\u7F6E diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index 2073e65ae..e2a9d856a 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -859,7 +859,7 @@ RP_Authority_Edit=\u6B0A\u9650\u7DE8\u8F2F Warnning=\u63D0\u9192 RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8A31\u70BA\u7A7A\u4E14\u4E0D\u80FD\u91CD\u8907 Application=\u61C9\u7528\u7A0B\u5F0F -Formula_Dictionary_Display_Examples_Html=\u63D0\u793A\uFF1A\u5BE6\u969B\u503C\u7BC4\u570D\u70BA \=range(100),\u5C0D\u5BE6\u969B\u503C\u7BC4\u570D\u5167\u7684\u6BCF\u500B$$$\u7684\u986F\u793A\u516C\u5F0F\u70BA \=0 - $$$\uFF0C
\u5247\u6700\u7D42\u7684\u7D50\u679C\u5BE6\u969B\u503C\u70BA1, 2, ..., 100,\u986F\u793A\u503C\u70BA-1, -2, ... , -100\u3002
  +FR-Designer-Formula_Dictionary_Display_Examples_Html=\u63D0\u793A\uFF1A\u5BE6\u969B\u503C\u7BC4\u570D\u70BA \=range(100),\u5C0D\u5BE6\u969B\u503C\u7BC4\u570D\u5167\u7684\u6BCF\u500B$$$\u7684\u986F\u793A\u516C\u5F0F\u70BA \=0 - $$$\uFF0C
\u5247\u6700\u7D42\u7684\u7D50\u679C\u5BE6\u969B\u503C\u70BA1, 2, ..., 100,\u986F\u793A\u503C\u70BA-1, -2, ... , -100\u3002
  ECP-error_pwd=\u5BC6\u78BC\u932F\u8AA4 FR-Hyperlink_ChartHyperlink=\u5716\u8868\u8D85\u93C8 M_Edit-FormatBrush=\u8907\u88FD\u683C\u5F0F(B) @@ -1426,7 +1426,7 @@ Out_Thick_Border_Line=\u7C97\u5323\u6846\u7DDA FR-App-File_Lookup_range=\u67E5\u627E\u7BC4\u570D ReportColumns-Columns_to=\u5206\u6B04\u6210 Transparent=\u900F\u660E -Parameter-Integer=\u6574\u578B +FR-Designer_Parameter_Integer=\u6574\u578B PDF-Print_Setting=PDF\u5217\u5370\u8A2D\u5B9A Server-Embedded_Server=\u5167\u7F6E\u7684\u4F3A\u670D\u5668 M_Server-Server_Config_Manager=\u4F3A\u670D\u5668\u914D\u7F6E(S) diff --git a/designer_base/src/com/fr/design/present/dict/FormulaDictPane.java b/designer_base/src/com/fr/design/present/dict/FormulaDictPane.java index dab59eaff..bcc41943f 100644 --- a/designer_base/src/com/fr/design/present/dict/FormulaDictPane.java +++ b/designer_base/src/com/fr/design/present/dict/FormulaDictPane.java @@ -48,14 +48,14 @@ public class FormulaDictPane extends FurtherBasicBeanPane { double[] rowSize = {p, p, p}; int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}}; - UILabel tag = new UILabel(Inter.getLocText("Formula_Dictionary_Display_Examples_Html")); + UILabel tag = new UILabel(Inter.getLocText("FR-Designer-Formula_Dictionary_Display_Examples_Html")); tag.setForeground(new Color(51, 51, 52)); tag.setPreferredSize(new Dimension(225, 80)); JPanel t = new JPanel(new BorderLayout()); t.add(tag, BorderLayout.CENTER); Formula vf = new Formula("$$$"); - valueFormulaEditor = new FormulaEditor("", vf); + valueFormulaEditor = new FormulaEditor(StringUtils.EMPTY, vf); JPanel valueFormulaContainer = new JPanel(new FlowLayout(FlowLayout.RIGHT, LEFT_BORDER, 0)); valueFormulaContainer.setBorder(BorderFactory.createEmptyBorder(0, -LEFT_BORDER, 0, -LEFT_BORDER)); From 873016ea354fbcf33ab91b11a21e6e71c08165b6 Mon Sep 17 00:00:00 2001 From: zack Date: Tue, 10 Oct 2017 09:53:30 +0800 Subject: [PATCH 13/35] =?UTF-8?q?REPORT-4841=20=E5=B9=B3=E5=8F=B0=E5=86=85?= =?UTF-8?q?=E6=89=93=E5=BC=80=E6=A0=87=E7=AD=BE=E9=A1=B5=E6=8F=92=E4=BB=B6?= =?UTF-8?q?,=E5=90=AF=E7=94=A8=E7=A6=81=E7=94=A8=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/controlpane/UIControlPane.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java index 68b3675b6..d3bfb9662 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java @@ -302,6 +302,8 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH ShortCut addItem = addItemShortCut().getShortCut(); addItem.intoJToolBar(topToolBar); topToolBar.validate(); + this.controlUpdatePane = createControlUpdatePane();//REPORT-4841 刷新一下编辑面板 + cardPane.add(controlUpdatePane, "EDIT"); this.repaint(); } From 75f86a0c851f9cd256ddfcf9c7ef3f944bb64558 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 10 Oct 2017 10:00:50 +0800 Subject: [PATCH 14/35] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 1 + designer_base/src/com/fr/design/locale/designer_en_US.properties | 1 + designer_base/src/com/fr/design/locale/designer_ja_JP.properties | 1 + designer_base/src/com/fr/design/locale/designer_ko_KR.properties | 1 + designer_base/src/com/fr/design/locale/designer_zh_TW.properties | 1 + 5 files changed, 5 insertions(+) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index f006d5afb..3d7e807f3 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -1240,6 +1240,7 @@ Rose_Red=Rose Red StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=The value of rotation must between -90 and 90 degrees HF-Move_Left=To the left Cell_Group=Cell Group +FR-Designer-Cell_Group=Cell Group Week=Week PageSetup-Orientation=Orientation M-Open_Recent=Open Recent diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index 7392e9589..1658fecd6 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -1242,6 +1242,7 @@ Rose_Red=Rose Red StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=Rotation value must between -90 and 90 degrees HF-Move_Left=Left shift Cell_Group=Cell Group +FR-Designer-Cell_Group=Cell Group Week=Week PageSetup-Orientation=Orientation M-Open_Recent=Open Recent diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index aa65d9ba4..d1ea8fbd0 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -1240,6 +1240,7 @@ Rose_Red=\u30ED\u30FC\u30BA\u30EC\u30C3\u30C9 StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=\u56DE\u8EE2\u5024\u306F-90\u304B\u308990\u5EA6 HF-Move_Left=\u5DE6\u3078\u79FB\u52D5\u3059\u308B Cell_Group=\u30BB\u30EB\u7D44 +FR-Designer-Cell_Group=\u30BB\u30EB\u7D44 Week=\u5468 PageSetup-Orientation=\u65B9\u5411 M-Open_Recent=\u6700\u8FD1\u958B\u3044\u305F\u3082\u306E diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index a600453f5..667b1ba0f 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -1241,6 +1241,7 @@ Rose_Red=\uB85C\uC988\uBE68\uAC15 StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=\uD68C\uC804\uAC12\uC740-90\uB3C4\uC5D0\uC11C 90\uB3C4\uAE4C\uC9C0 HF-Move_Left=\uC67C\uCABD\uC73C\uB85C\uC774\uB3D9 Cell_Group=\uC140\uADF8\uB8F9 +FR-Designer-Cell_Group=\uC140\uADF8\uB8F9 Week=\uC8FC PageSetup-Orientation=\uBC29\uD5A5 M-Open_Recent=\uCD5C\uADFC\uC5F4\uC5B4\uBCF8 diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index e2a9d856a..b316f6ec7 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -1242,6 +1242,7 @@ Rose_Red=\u73AB\u7470\u7D05 StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=\u65CB\u8F49\u503C\u5FC5\u9808\u5728\u8CA090\u5EA6\u523090\u5EA6 HF-Move_Left=\u5DE6\u79FB Cell_Group=\u5132\u5B58\u683C\u7D44 +FR-Designer-Cell_Group=\u5132\u5B58\u683C\u7D44 Week=\u5468 PageSetup-Orientation=\u65B9\u5411 M-Open_Recent=\u958B\u555F\u6700\u8FD1\u4F7F\u7528\u6A94 From 22b5160845451e30ac1ca5145914df7745128cff Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Tue, 10 Oct 2017 10:22:46 +0800 Subject: [PATCH 15/35] =?UTF-8?q?REPORT-4944=20=E5=9B=BE=E8=A1=A8=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E8=AE=BE=E7=BD=AE=E6=8E=A5=E5=8F=A3=E9=80=82=E9=85=8D?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=E9=9D=A2=E6=9D=BF=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/quickeditor/CellQuickEditor.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/designer/src/com/fr/quickeditor/CellQuickEditor.java b/designer/src/com/fr/quickeditor/CellQuickEditor.java index 43b291c97..c218d9397 100644 --- a/designer/src/com/fr/quickeditor/CellQuickEditor.java +++ b/designer/src/com/fr/quickeditor/CellQuickEditor.java @@ -66,10 +66,10 @@ public abstract class CellQuickEditor extends QuickEditor { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = {p, f}; - double[] rowSize = {p, f}; JComponent centerBody = createCenterBody(); JPanel topContent = initTopContent(); if (isScrollAll()) { + double[] scrollAllRowSize = {p, p}; prepareScrollBar(); topContent.setBorder(BorderFactory.createMatteBorder(10, 10, 0, 0, this.getBackground())); centerBody.setBorder(BorderFactory.createMatteBorder(0, 10, 0, 0, this.getBackground())); @@ -77,7 +77,7 @@ public abstract class CellQuickEditor extends QuickEditor { new Component[]{topContent, null}, new Component[]{centerBody, null} }; - leftContentPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP); + leftContentPane = TableLayoutHelper.createGapTableLayoutPane(components, scrollAllRowSize, columnSize, HGAP, VGAP); this.setLayout(new CellElementBarLayout(leftContentPane) { @Override public void layoutContainer(Container parent) { @@ -104,6 +104,7 @@ public abstract class CellQuickEditor extends QuickEditor { this.add(scrollBar); this.add(leftContentPane); } else { + double[] scrollContentRowSize = {p, f}; topContent.setBorder(BorderFactory.createMatteBorder(10, 10, 0, 10, this.getBackground())); centerBody.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, this.getBackground())); Component[][] components = new Component[][]{ @@ -111,7 +112,7 @@ public abstract class CellQuickEditor extends QuickEditor { new Component[]{centerBody, null} }; this.setLayout(new BorderLayout()); - this.add(TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP), BorderLayout.CENTER); + this.add(TableLayoutHelper.createGapTableLayoutPane(components, scrollContentRowSize, columnSize, HGAP, VGAP), BorderLayout.CENTER); } } From 35e5c0dbf49781f65b6fce46c149276346d563b5 Mon Sep 17 00:00:00 2001 From: hzzz Date: Tue, 10 Oct 2017 10:27:15 +0800 Subject: [PATCH 16/35] REPORT-3903 --- .../src/com/fr/design/mainframe/JTemplate.java | 10 ++++++---- .../com/fr/design/parameter/RootDesignDefinePane.java | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/JTemplate.java b/designer_base/src/com/fr/design/mainframe/JTemplate.java index eaf8e76c9..fc46ab33f 100644 --- a/designer_base/src/com/fr/design/mainframe/JTemplate.java +++ b/designer_base/src/com/fr/design/mainframe/JTemplate.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe; import com.fr.base.*; import com.fr.base.io.IOFile; +import com.fr.base.iofileattr.TemplateIdAttrMark; import com.fr.design.DesignModelAdapter; import com.fr.design.DesignState; import com.fr.design.DesignerEnvManager; @@ -46,6 +47,7 @@ import com.fr.general.Inter; import com.fr.stable.ArrayUtils; import com.fr.stable.ProductConstants; import com.fr.stable.StringUtils; +import com.fr.stable.core.UUID; import com.fr.stable.project.ProjectConstants; import javax.swing.*; @@ -1066,12 +1068,12 @@ public abstract class JTemplate> ex } /** - * 由于老版本的模板没有模板ID,当勾选使用参数模板时候,就加一个模板ID + * 由于老版本的模板没有模板ID,当勾选使用参数模板时候,就加一个模板ID attr * @param isUseParamTemplate 是否使用参数模板 */ - public void needAddTemplateId(boolean isUseParamTemplate) { - if (isUseParamTemplate && StringUtils.isEmpty(template.getTemplateID())) { - template.initTemplateID(); + public void needAddTemplateIdAttr(boolean isUseParamTemplate) { + if (isUseParamTemplate && template.getAttrMark(TemplateIdAttrMark.XML_TAG) == null) { + template.addAttrMark(new TemplateIdAttrMark(UUID.randomUUID().toString())); } } } diff --git a/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java b/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java index 3a93e4fec..d8ef6f0fc 100644 --- a/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java +++ b/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java @@ -128,7 +128,7 @@ public class RootDesignDefinePane extends AbstractDataModify { wParameterLayout.setDelayDisplayContent(displayReport.isSelected()); wParameterLayout.setUseParamsTemplate(useParamsTemplate.isSelected()); JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - jTemplate.needAddTemplateId(useParamsTemplate.isSelected()); + jTemplate.needAddTemplateIdAttr(useParamsTemplate.isSelected()); wParameterLayout.setBackground((Background) background.getValue()); wParameterLayout.setPosition((int)hAlignmentPane.getSelectedItem()); return wParameterLayout; From 1f86bc3c2dc60e49c998cfdd369845abdcdc5ec2 Mon Sep 17 00:00:00 2001 From: Qin Xiaofu Date: Tue, 10 Oct 2017 11:07:40 +0800 Subject: [PATCH 17/35] =?UTF-8?q?CHART-1295=20=E8=A7=A3=E5=86=B3=E4=BB=AA?= =?UTF-8?q?=E8=A1=A8=E7=9B=98=E8=87=AA=E5=8A=A8=E5=88=B7=E6=96=B0=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E8=87=AA=E5=AE=9A=E4=B9=89=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E4=B8=8D=E5=BA=94=E8=AF=A5=E5=87=BA=E7=8E=B0this.seriesName?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/VanChartTooltipContentPane.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java index 9b38bc7c7..dfe6ed91d 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java @@ -219,6 +219,8 @@ public class VanChartTooltipContentPane extends BasicBeanPane Date: Tue, 10 Oct 2017 11:29:06 +0800 Subject: [PATCH 18/35] =?UTF-8?q?REPORT-4767=20[9.0=E5=86=85=E6=B5=8B]=20?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=A1=AB=E6=8A=A5=E5=B1=9E=E6=80=A7-?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E6=8F=90=E4=BA=A4=E6=9D=A1=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=B1=BB=E5=9E=8B=E6=97=B6=EF=BC=8C=E5=87=A0?= =?UTF-8?q?=E4=B8=AA=E5=9B=BE=E6=A0=87=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8?= =?UTF-8?q?=20REPORT-4604=20=E8=AE=BE=E8=AE=A1=E5=99=A8=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=8F=92=E5=85=A5=E6=82=AC=E6=B5=AE?= =?UTF-8?q?=E5=85=83=E7=B4=A0=20=E5=9B=BE=E8=A1=A8=E5=92=8C=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E9=83=BD=E6=98=BE=E7=A4=BA=E5=9C=A8=E4=B8=AD=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/insert/flot/ChartFloatAction.java | 29 ++++++++++++++-- .../actions/insert/flot/ImageFloatAction.java | 31 ++++++++++++++++-- .../fr/design/images/buttonicon/type_bool.png | Bin 362 -> 440 bytes .../fr/design/images/buttonicon/type_date.png | Bin 310 -> 317 bytes .../design/images/buttonicon/type_double.png | Bin 468 -> 522 bytes .../design/images/buttonicon/type_formula.png | Bin 306 -> 299 bytes .../fr/design/images/buttonicon/type_int.png | Bin 509 -> 395 bytes .../design/images/buttonicon/type_string.png | Bin 1295 -> 317 bytes 8 files changed, 55 insertions(+), 5 deletions(-) diff --git a/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java b/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java index ce05628da..292d4f287 100644 --- a/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java +++ b/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java @@ -4,6 +4,7 @@ package com.fr.design.actions.insert.flot; import com.fr.base.BaseUtils; +import com.fr.base.DynamicUnitList; import com.fr.base.Style; import com.fr.base.chart.BaseChartCollection; import com.fr.design.actions.ElementCaseAction; @@ -16,10 +17,14 @@ import com.fr.design.menu.MenuKeySet; import com.fr.design.module.DesignModuleFactory; import com.fr.general.FRLogger; import com.fr.general.Inter; +import com.fr.grid.Grid; import com.fr.grid.selection.FloatSelection; +import com.fr.report.ReportHelper; import com.fr.report.cell.FloatElement; +import com.fr.report.elementcase.TemplateElementCase; import com.fr.stable.Constants; import com.fr.stable.bridge.StableFactory; +import com.fr.stable.unit.FU; import com.fr.stable.unit.OLDPIX; import javax.swing.*; @@ -85,11 +90,31 @@ public class ChartFloatAction extends ElementCaseAction { FloatElement newFloatElement; try { newFloatElement = new FloatElement(chartDialog.getChartCollection().clone()); - newFloatElement.setLeftDistance(new OLDPIX(20)); - newFloatElement.setTopDistance(new OLDPIX(20)); newFloatElement.setWidth(new OLDPIX(BaseChartCollection.CHART_DEFAULT_WIDTH)); newFloatElement.setHeight(new OLDPIX(BaseChartCollection.CHART_DEFAULT_HEIGHT)); + Grid grid = reportPane.getGrid(); + TemplateElementCase report = reportPane.getEditingElementCase(); + DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(report); + DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(report); + int horizentalScrollValue = grid.getHorizontalValue(); + int verticalScrollValue = grid.getVerticalValue(); + + int resolution = grid.getResolution(); + int floatWdith = newFloatElement.getWidth().toPixI(resolution); + int floatHeight = newFloatElement.getWidth().toPixI(resolution); + + int leftDifference = (grid.getWidth() - floatWdith) > 0 ? (grid.getWidth() - floatWdith) : 0; + int topDifference = (grid.getHeight() - floatHeight) > 0 ? (grid.getHeight() - floatHeight) : 0; + FU evtX_fu = FU.valueOfPix((leftDifference) / 2, resolution); + FU evtY_fu = FU.valueOfPix((topDifference) / 2, resolution); + + FU leftDistance = FU.getInstance(evtX_fu.toFU() + columnWidthList.getRangeValue(0, horizentalScrollValue).toFU()); + FU topDistance = FU.getInstance(evtY_fu.toFU() + rowHeightList.getRangeValue(0, verticalScrollValue).toFU()); + + newFloatElement.setLeftDistance(leftDistance); + newFloatElement.setTopDistance(topDistance); + Style style = newFloatElement.getStyle(); if (style != null) { newFloatElement.setStyle(style.deriveBorder(Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black)); diff --git a/designer/src/com/fr/design/actions/insert/flot/ImageFloatAction.java b/designer/src/com/fr/design/actions/insert/flot/ImageFloatAction.java index 78b408347..9861499bf 100644 --- a/designer/src/com/fr/design/actions/insert/flot/ImageFloatAction.java +++ b/designer/src/com/fr/design/actions/insert/flot/ImageFloatAction.java @@ -4,6 +4,7 @@ package com.fr.design.actions.insert.flot; import com.fr.base.BaseUtils; +import com.fr.base.DynamicUnitList; import com.fr.base.ScreenResolution; import com.fr.design.actions.ElementCaseAction; import com.fr.design.dialog.BasicDialog; @@ -14,9 +15,12 @@ import com.fr.design.mainframe.ElementCasePane; import com.fr.design.menu.MenuKeySet; import com.fr.design.report.SelectImagePane; import com.fr.general.Inter; +import com.fr.grid.Grid; import com.fr.grid.selection.FloatSelection; +import com.fr.report.ReportHelper; import com.fr.report.cell.FloatElement; import com.fr.report.cell.cellattr.CellImage; +import com.fr.report.elementcase.TemplateElementCase; import com.fr.stable.CoreGraphHelper; import com.fr.stable.unit.FU; @@ -87,12 +91,33 @@ public class ImageFloatAction extends ElementCaseAction { CoreGraphHelper.waitForImage(image); floatElement.setValue(image); - - int resolution = ScreenResolution.getScreenResolution(); + Grid grid = reportPane.getGrid(); + int resolution = grid.getResolution(); floatElement.setWidth(FU.valueOfPix(image.getWidth(null), resolution)); floatElement.setHeight(FU.valueOfPix(image.getHeight(null), resolution)); + TemplateElementCase report = reportPane.getEditingElementCase(); + DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(report); + DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(report); + int horizentalScrollValue = grid.getHorizontalValue(); + int verticalScrollValue = grid.getVerticalValue(); + + int floatWdith = floatElement.getWidth().toPixI(resolution); + int floatHeight = floatElement.getHeight().toPixI(resolution); + + int leftDifference = (grid.getWidth() - floatWdith) > 0 ? (grid.getWidth() - floatWdith) : 0; + int topDifference = (grid.getHeight() - floatHeight) > 0 ? (grid.getHeight() - floatHeight) : 0; + FU evtX_fu = FU.valueOfPix((leftDifference) / 2, resolution); + FU evtY_fu = FU.valueOfPix((topDifference) / 2, resolution); + + FU leftDistance = FU.getInstance(evtX_fu.toFU() + columnWidthList.getRangeValue(0, horizentalScrollValue).toFU()); + FU topDistance = FU.getInstance(evtY_fu.toFU() + rowHeightList.getRangeValue(0, verticalScrollValue).toFU()); + + floatElement.setLeftDistance(leftDistance); + floatElement.setTopDistance(topDistance); + floatElement.setStyle(cellImage.getStyle()); - reportPane.addFloatElementToCenterOfElementPane(floatElement); +// reportPane.addFloatElementToCenterOfElementPane(floatElement); + reportPane.getEditingElementCase().addFloatElement(floatElement); reportPane.setSelection(new FloatSelection(floatElement.getName())); returnValue = true; diff --git a/designer_base/src/com/fr/design/images/buttonicon/type_bool.png b/designer_base/src/com/fr/design/images/buttonicon/type_bool.png index 7b0dfd3af67cf54b1bc3cb3725193ed45eac8929..e20938ff1676b3e9102c3c82fed306b898f747b0 100644 GIT binary patch literal 440 zcmV;p0Z0CcP)Px$a!Eu%R5%f1V4yN!1es@IVzTxBe+Dm7%w}X{*mma38E>q5jEznHW0k-oh)WL> z9z7UR4h{}17=ma5L>p*qY+?TS^Ox6z3?<4yPft&F28KWLnV1-79yoB|51OM;xI`KF z`t|E3kS-Ask$M!}SU3d3#KgqX?EnAY1&oZWw%fOF|B1y66d?>3nwpyWhK7bRgH(aM z3N&m1(5wAt&Ky65q7w%P#XwMi1JmP#d-onJ0vY<|&6`G$K4QEIGato3P=K?su{r@0 zt>yju_qYH1_rDP6)dXU^iq$}n;IU)J9{&H&?!dsns0=i?n^>>H3R#{m_l4MFE3XwBO~J;kUWUy;o<57vB5b4#2^(sc<|t#l9JMvzkmO#aB#54 i9XfRA8>waxr5*s%if$qQ-IGZG0000o5#&M>6O*m~|1)@@yOxoWVcVHAXS~tHN#V1A z6oU*ud-e?2G7ukVq2d4ktbhLh|9uI>rvxyeYqqww<^@`~o{{mtFuEK$e6SBd8jX!D zb%8;``Qyj06h=nIooCLRIACmS0yfjw*z^|ApQ@M^Fy20U_Ou$NI6?$&0myJ*kZc7? zePw57*F`8{U?5}&vRZUDJc!PmIevVF6n zn?p4pfDB!}e7OS9)dxUqpl=)^BO@Px*i;1|OF)>ah7PD<0M(0A=;VPrh5!Hn07*qo IM6N<$f}f|CkN^Mx diff --git a/designer_base/src/com/fr/design/images/buttonicon/type_date.png b/designer_base/src/com/fr/design/images/buttonicon/type_date.png index c38c9d3dde1ec396276e374f687997562551cd72..3a0ad5c7473b04905677f98cd26b14fc5918282e 100644 GIT binary patch literal 317 zcmV-D0mA-?P)Px#_en%SR5%f>R7(!RAP{A$iKb~cdV|IrfF45c;5B*$W1^?Au3UAg^bWm%F5R{0 z5SxB7q!h~nhMD)?JV=1Ckq4lj5F$~EZHH}FWe}I-75#Cm{K7YWWcF=OSS;sSWF zl=q|a9fqNQ`hIga6vQTAoLokp=VcT{m!c?E^Z9I_rs>;7rfTdyQ3~bpr7<00526oarzyavqDZ~gz zj#QIGnVQ9x{XTZ3y6cwy1T4_^%C{^s4DPElr?JK&f|NSGz4sd-#OT~(i+zZ5y`tfY zK-7ukId0q_2PB&HX^VJ{yQ&|jj=>thWH=p{msqg|CFEiZPFhSLz#KQ(fcq3&o%pb6 zV!)zW8@VF2odM*|TA!`a|+&deBd227&b+&wRRt-zJo^C=A^ZLMuS>mibn&efeAzqhq(Or0f5_V{PjYe`~Uy|07*qo IM6N<$f`%N5Bme*a diff --git a/designer_base/src/com/fr/design/images/buttonicon/type_double.png b/designer_base/src/com/fr/design/images/buttonicon/type_double.png index 4cdd73fb4f88fbe783804a0ca504d813169386a7..1701ff8d6c3d39b7dfd77c9981c0b063bb606c78 100644 GIT binary patch literal 522 zcmV+l0`>igP)Px$#7RU!R5%gElRHZTK@i7x?~)iof(W9GAtd-{>^5g0q|j1~WkAqqVZ%AE#G!hy?iGrRMj-_Fk7A>{GEoJUBK zdBN2*^^@lbP!uJ3QJItBb54YxPNzpq)0|^WepA(lJF(u4?O0)}Wu7sHP7$(qoRC~D z7hsIF`}7q^rBV}wEQW;c7m$#dHH26UfJGtV7S=Z!jpn(c%#;B_M9i}2t|Yxqin$Az z$z+BQqDL6}*D=P15Vb9S$z~UpF-A84nI%NIN+y+ih)p?lE}*U(TafT1%Tx#OCx0ztLj@%ofv)XgucMnC$o%j96)t~p%bt&-Y6yWyvMFPfBK~-x9efKaD z2_3_CSm8i!!{N{g_htU-XEd8lnn)yWZQC9X1_xHF)#`gcoIi6u0AWj+{)oiy^8f$< M07*qoM6N<$g3D&@Bme*a literal 468 zcmV;_0W1EAP)lp%tzNzQFGw7y&XkFX>Fb|AU@lB4 z294qapdRgi{}_1~7#Od^R5~~~u>AS+C*c48|3>%jJtzf^Tz?!&?&*v-E%e7{YA+!^p^Z?*D&=XdwQ}%*?p)@85r$k@aG=j8Ia;stGDc zNH07U5mJcH5`1#-$i%0J7`bK3mgxb5F9=yJFy7X|eSj=M4x62w{oT)>KNEm@<)Qi? z0>$P~%?BVumoHzg0Ce>M5F6+lhsemt2Ou_80mu>%rmCR>Y8U`nYljA<$b6~*0000< KMNUMnLSTYD7Sc!n diff --git a/designer_base/src/com/fr/design/images/buttonicon/type_formula.png b/designer_base/src/com/fr/design/images/buttonicon/type_formula.png index cffd7e46132c2d3c1d907704d9fb02c1b663f944..278ddc985a7d4afe8965b131366a65ca0ec1fde5 100644 GIT binary patch literal 299 zcmV+`0o4A9P)Px#*Aevl{6JN zE(DnCq>Z5gkP^m8fbf`>69B2JGz~$a6AV6@!3IDCVyz0)CYWoa0;NKJRc(h`D&#@< z(uB}prKUe?Xv7O7jmQ7QU;bPAF2=cIWlVp@o~%tO@1K`NpACx17DaZo);`E5o9Ee$ x{0%)~PTRJ9S(f*%>-K57JJoglis8)GyaB#URY!+C2V(#L002ovPDHLkV1kq5dS(Cs literal 306 zcmV-20nPr2P)Px$MM*?KR5%f1V4yN!1es@IVzTxBe+Dm7%w}X{*mma38E>q5jEznHW0k-oh)WL> z9zA49vEb8XWo0Gy`}c3h|Nog^o;h>k06w)aIlKn`{P}w>Fsv*Y82+9IY9Pu$oL)9I zHj8Iq_%9EPtXVMIiJ`F?Xk%j|$iVQghmnyrg^`i*7cmCG)L=F6$B$o?K(Ah5X8!jB zXs|d?F+VUo4PbHXX%}xSgA6%)_H-q>Vfgr1y^K!-AvvlW2=+24qvH!l9Io1mL!7$8;NpuM zBY`=o9GFHsV0sxDnaaZ;I9 z5GOZ5aImzS2-V3YL!gi*;A(Nu$;l2XlB7w_d%+hvH0{uWARdH!@9ulwz3<+I zcYsiZilV|ON^RSUcoI2ADKPA;$f_0!g-OS8&j4n&ZM*T6&*!H-&$|R5E@Ix&X=&du zjL&Q~cLTr$gm4pr!0-Bgz$p59o<$wU+ron@naoENlO*XKU{-^0;!a^ zNn==`>ic1dolo*{0n0K^I1btjsO!2zmC!x%E~1Na&1SQss<}P9Oi>j1D#IuFxJ5|- zMadpu;l~yl!|*(J7ltt9`%q-DBp)m22SD;8yuEB$)*;OUJ_z-uX|@5x1|gwJ_k*lw zOvx!ytYdHQ0iHGPYMLg{39D2p zk@{g{+M{5Q(7`#XpjN9bqe?n)v0+QEqemVpF+P&KkY%~!y6y%d=6+Bw7`qt!izoB- z&D87ldAzkwlc;93TrNM;^;nG-q2E|Zf0gVT3VW~Yq#x;y00000NkvXXu0mjfQLE*A diff --git a/designer_base/src/com/fr/design/images/buttonicon/type_string.png b/designer_base/src/com/fr/design/images/buttonicon/type_string.png index 0101426ea2ef6e5c3925cf7a5b8e843740b5dd4f..b9aafab2d01a40d146f8a71666a9d98fc58f323d 100644 GIT binary patch delta 290 zcmV+-0p0$O3cUi5B!2;OQb$4nuFf3k0002@Nkl_)?2o7A*RM4kb%O+_+sBapdW_!^ngF`hNBFH$Qs4Yb( zreSn7YyKw*yVE=q7;~tSWH@1qD6N|2aaOktHbbx|vI`O2*~^&c*_HWl^wRle5_K2JHrY`P_4=8~^|S07*qoM6N<$g6nXF`2YX_ literal 1295 zcmbVMZA=?w9KWWD6R0K=7e=Bxu6%ID_U^g9U+Cz|wWX0(EJeB)W!K&VJ?Xvd?yxN; z*ew%791+8ZZN7w!Xf&F**bl~tI=0NHe9<@-aelzJX|fL(opI9)@HwF92Qm{cxqIGz zzu*7$x$*8~%u?S{k71Z4-pQuW*krsr>d<#${2mJ$cI%Oh-Xjm_MNWlSke9O%kBi(O zOhJw>AN&lqW0;v2(iuII=wfoRXy*)!y(B7#jbZH_C56ikK^@P+K|%5pzs#N?aDn#| zeXazRP{J@TbdIR7XC#@AIz%7x z6B|xt65V)MRw3@PQ??xCrf@f~1BcV&@jQUj6rf0oCIM{&9>zg46oqd-1hS^`15ApI zZrVaCKatmUg(1mev1l(k?6NvY0-w)kXwb9`A#7S%(z%jN(yTQF7HT=Y@AMqKM?O;5pp+}IYarOOH=Q&5wK)f}qF zfVDH-GKJGS(*w*C;+@6pErV% z007H^XxLrT*p3T)4%!KV5h~2O0EkdQSI`>_`RGs-P;O6{s&V6zrgKsb*6a$%?k1PL zDVGVWkke%~Ez5;k2XyCUUDoolf`@xtc%LBga#1sivk@x`RpCjOcwI7ZqI$lQR1nhM9tKHkdA5%HCL8 z>oE74?lt=lm3DRBzOV7i=Z_xTo!@bO=)wA{tJCe(Yilcy9$S67y!QLr>z+Hgv5LuU z-mkouJom{r);Hd4oA_>NX(_PWKelJO-}LpFZ|g@_{(7d@YW*}FjYfIk!$+@QS&i3$ zh&C2G=AOwe}kk2j!^)ug+P_-+TG+SLE`M@!69f zR~sHTpIXG`W1#7Y=12DIoGLU=S|ZgWCl4)VPs|)OJ$JdYjf~CQYN|H7hcjZ}-Jd#I zCi)utlV^7wr{1~0aN_W?ouB*R+z%vsUX}chBde{EIJK d>cs*T6V^0s`}4;ed#lDTDjrF)Z-)*X{u_i$yZ!(G From 9473835b57450873139c2965d8a34b2b8b0dab87 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 10 Oct 2017 12:02:55 +0800 Subject: [PATCH 19/35] =?UTF-8?q?REPORT-4888=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/data/datapane/VerticalChoosePane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/data/datapane/VerticalChoosePane.java b/designer_base/src/com/fr/design/data/datapane/VerticalChoosePane.java index 9f90737b6..1e9f89d96 100644 --- a/designer_base/src/com/fr/design/data/datapane/VerticalChoosePane.java +++ b/designer_base/src/com/fr/design/data/datapane/VerticalChoosePane.java @@ -15,6 +15,7 @@ import javax.swing.*; import java.awt.*; public class VerticalChoosePane extends ChoosePane implements DesignerBean { + private static final int RIGHTBORDER = 5; public VerticalChoosePane(Previewable previewable) { this(previewable, -1); @@ -36,7 +37,7 @@ public class VerticalChoosePane extends ChoosePane implements DesignerBean { JPanel rs = new JPanel(new BorderLayout(0, 0)); rs.add(tableNameComboBox, BorderLayout.CENTER); rs.add(GUICoreUtils.createFlowPane(new Component[]{new RefreshLabel(this), previewLabel}, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST); - + rs.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, -RIGHTBORDER)); UILabel l1 = new UILabel(Inter.getLocText("FR-Designer_Database"), UILabel.LEFT); UILabel l2 = new UILabel(Inter.getLocText("FR-Designer_Model"), UILabel.LEFT); UILabel l3 = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Database", "FR-Designer_Table"}), UILabel.LEFT); From d386dd825a4941087f12dc27a64048c20219c1a7 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Tue, 10 Oct 2017 13:36:27 +0800 Subject: [PATCH 20/35] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E5=9B=BE=E7=89=87=20=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E8=87=AA=E5=8A=A8=E5=88=B7=E6=96=B0=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=97=B6=E9=97=B4=E8=AE=BE=E7=BD=AE=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/chart/gui/other/ChartInteractivePane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java index e7ffd5c3c..e0f4fa311 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java @@ -821,7 +821,7 @@ public class ChartInteractivePane extends BasicScrollPane implements UIOb if(isAutoRefresh.isSelected() && autoRefreshTime.getValue() >= 2) { plot.setAutoRefreshPerSecond((int) autoRefreshTime.getValue()); } else { - plot.setAutoRefreshPerSecond(-1); + plot.setAutoRefreshPerSecond(0); } } } From 35cd80a22ac385a2ea55a1318a6167cfd44485db Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 10 Oct 2017 14:56:35 +0800 Subject: [PATCH 21/35] =?UTF-8?q?REPORT-4887=20@plough=EF=BC=9A9.0?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E4=BA=A4=E4=BA=92=E9=AA=8C=E6=94=B6?= =?UTF-8?q?=E9=97=AE=E9=A2=98=3D>=E9=80=89=E4=B8=AD=E6=82=AC=E6=B5=AE?= =?UTF-8?q?=E5=85=83=E7=B4=A0=E6=97=B6=EF=BC=8C=E5=8E=BB=E9=99=A4=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=A0=BC=E8=8F=9C=E5=8D=95=E4=B8=AD=E7=9A=84=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/actions/cell/CellAttributeTableAction.java | 6 ++++++ .../fr/design/actions/cell/CellWidgetAttrAction.java | 6 ++++++ .../actions/cell/ConditionAttributesAction.java | 6 ++++++ .../fr/design/mainframe/EastRegionContainerPane.java | 11 +++++++++++ 4 files changed, 29 insertions(+) diff --git a/designer/src/com/fr/design/actions/cell/CellAttributeTableAction.java b/designer/src/com/fr/design/actions/cell/CellAttributeTableAction.java index 7c554ff04..70812af32 100644 --- a/designer/src/com/fr/design/actions/cell/CellAttributeTableAction.java +++ b/designer/src/com/fr/design/actions/cell/CellAttributeTableAction.java @@ -2,6 +2,7 @@ package com.fr.design.actions.cell; import com.fr.design.actions.UpdateAction; import com.fr.design.mainframe.CellElementPropertyPane; +import com.fr.design.mainframe.EastRegionContainerPane; import java.awt.event.ActionEvent; @@ -20,4 +21,9 @@ public abstract class CellAttributeTableAction extends UpdateAction { CellElementPropertyPane.getInstance().GoToPane(getID()); } + @Override + public void update() { + super.update(); + this.setEnabled(EastRegionContainerPane.getInstance().isCellAttrPaneEnabled()); + } } \ No newline at end of file diff --git a/designer/src/com/fr/design/actions/cell/CellWidgetAttrAction.java b/designer/src/com/fr/design/actions/cell/CellWidgetAttrAction.java index 7c4ee7087..e6f0fec24 100644 --- a/designer/src/com/fr/design/actions/cell/CellWidgetAttrAction.java +++ b/designer/src/com/fr/design/actions/cell/CellWidgetAttrAction.java @@ -24,4 +24,10 @@ public class CellWidgetAttrAction extends UpdateAction { EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_WIDGET_SETTINGS); EastRegionContainerPane.getInstance().setWindow2PreferWidth(); } + + @Override + public void update() { + super.update(); + this.setEnabled(EastRegionContainerPane.getInstance().isWidgetSettingsPaneEnabled()); + } } \ No newline at end of file diff --git a/designer/src/com/fr/design/actions/cell/ConditionAttributesAction.java b/designer/src/com/fr/design/actions/cell/ConditionAttributesAction.java index 0d5d7202c..1aecf94d5 100644 --- a/designer/src/com/fr/design/actions/cell/ConditionAttributesAction.java +++ b/designer/src/com/fr/design/actions/cell/ConditionAttributesAction.java @@ -26,4 +26,10 @@ public class ConditionAttributesAction extends UpdateAction { EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_CONDITION_ATTR); EastRegionContainerPane.getInstance().setWindow2PreferWidth(); } + + @Override + public void update() { + super.update(); + this.setEnabled(EastRegionContainerPane.getInstance().isConditionAttrPaneEnabled()); + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index cd5a03f65..f6393add6 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -466,6 +466,17 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } } + public boolean isConditionAttrPaneEnabled() { + return propertyItemMap.get(KEY_CONDITION_ATTR).isEnabled(); + } + + public boolean isWidgetSettingsPaneEnabled() { + return propertyItemMap.get(KEY_WIDGET_SETTINGS).isEnabled(); + } + + public boolean isCellAttrPaneEnabled() { + return propertyItemMap.get(KEY_CELL_ATTR).isEnabled(); + } class PropertyItem { From 18a88cf470a83b646c38c18106ca00233716bf6e Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Tue, 10 Oct 2017 16:05:12 +0800 Subject: [PATCH 22/35] =?UTF-8?q?REPORT-4851=20[9.0=E6=8F=92=E4=BB=B6]?= =?UTF-8?q?=E6=90=9C=E7=B4=A2bug=E4=BF=A1=E6=81=AF=EF=BC=8C=E5=89=8D?= =?UTF-8?q?=E5=8F=B0=E6=8E=A5=E5=8F=A3=E8=A2=ABAlphaFine=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=8D=A0=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/DesignerFrame.java | 18 +++++++----------- .../mainframe/hold/DefaultTitlePlace.java | 14 -------------- 2 files changed, 7 insertions(+), 25 deletions(-) delete mode 100644 designer_base/src/com/fr/design/mainframe/hold/DefaultTitlePlace.java diff --git a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java index 5135cf299..080f0f985 100644 --- a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java +++ b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java @@ -10,7 +10,6 @@ import com.fr.design.DesignModelAdapter; import com.fr.design.DesignState; import com.fr.design.DesignerEnvManager; import com.fr.design.ExtraDesignClassManager; -import com.fr.design.actions.help.alphafine.AlphaFineConfigManager; import com.fr.design.constants.UIConstants; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.datapane.TableDataTreePane; @@ -27,7 +26,6 @@ import com.fr.design.gui.imenu.UIMenuHighLight; import com.fr.design.gui.iscrollbar.UIScrollBar; import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.mainframe.hold.DefaultTitlePlace; import com.fr.design.mainframe.loghandler.LogMessageBar; import com.fr.design.mainframe.toolbar.ToolBarMenuDock; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; @@ -233,11 +231,6 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta basePane.add(centerPane, BorderLayout.CENTER); laoyoutWestPane(); -// JPanel eastRegionPane = new JPanel(new BorderLayout()); -// eastRegionPane.add(EastRegionContainerPane.getInstance(), BorderLayout.CENTER); -// eastRegionPane.add(JSliderPane.getInstance(), BorderLayout.SOUTH); -// basePane.add(eastRegionPane, BorderLayout.EAST); - basePane.add(EastRegionContainerPane.getInstance(), BorderLayout.EAST); basePane.setBounds(0, 0, contentWidth, contentHeight); @@ -334,14 +327,17 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta private void refreshNorthEastPane(JPanel northEastPane, ToolBarMenuDock ad) { northEastPane.removeAll(); + northEastPane.setOpaque(false); + northEastPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0)); + northEastPane.add(LogMessageBar.getInstance()); TitlePlaceProcessor processor = ExtraDesignClassManager.getInstance().getSingle(TitlePlaceProcessor.MARK_STRING); - if (processor == null) { - processor = new DefaultTitlePlace(); + if (processor != null) { + processor.hold(northEastPane, LogMessageBar.getInstance(), ad.createBBSLoginPane()); } - processor.hold(northEastPane, LogMessageBar.getInstance(), ad.createBBSLoginPane()); if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) { - northEastPane.add(ad.createAlphaFinePane(), BorderLayout.CENTER); + northEastPane.add(ad.createAlphaFinePane()); } + northEastPane.add(ad.createBBSLoginPane()); } diff --git a/designer_base/src/com/fr/design/mainframe/hold/DefaultTitlePlace.java b/designer_base/src/com/fr/design/mainframe/hold/DefaultTitlePlace.java deleted file mode 100644 index 0dee1644c..000000000 --- a/designer_base/src/com/fr/design/mainframe/hold/DefaultTitlePlace.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.fr.design.mainframe.hold; - -import com.fr.design.fun.impl.AbstractTitleProcessor; - -import java.awt.*; - -public class DefaultTitlePlace extends AbstractTitleProcessor { - - @Override - public void hold(Container container, Component loggerComponent, Component loginComponent) { - container.add(loggerComponent, BorderLayout.WEST); - container.add(loginComponent, BorderLayout.EAST); - } -} \ No newline at end of file From e0d58cac46881022834caa50eac49b23468fb269 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Tue, 10 Oct 2017 16:07:12 +0800 Subject: [PATCH 23/35] RT --- designer_base/src/com/fr/design/mainframe/DesignerFrame.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java index 080f0f985..87369d459 100644 --- a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java +++ b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java @@ -325,7 +325,6 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta } private void refreshNorthEastPane(JPanel northEastPane, ToolBarMenuDock ad) { - northEastPane.removeAll(); northEastPane.setOpaque(false); northEastPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0)); From 6cc3bff6a4670aa9516e33afdf8b70a90b88bd4b Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Tue, 10 Oct 2017 16:08:22 +0800 Subject: [PATCH 24/35] RT --- .../fr/design/mainframe/alphafine/component/AlphaFinePane.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java index d4ab8326d..e6fb64634 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java @@ -21,6 +21,7 @@ public class AlphaFinePane extends BasicPane { private static AlphaFinePane alphaFinePane; public AlphaFinePane() { + setPreferredSize(new Dimension(24,24)); setLayout(new BorderLayout()); if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) { Toolkit.getDefaultToolkit().addAWTEventListener(AlphaFineDialog.listener(), AWTEvent.KEY_EVENT_MASK); From 5bd4469238c15b8dd97d2943159acf261c5faa40 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 10 Oct 2017 16:10:31 +0800 Subject: [PATCH 25/35] =?UTF-8?q?RES-21=09=E5=9C=A8core=E4=B8=AD=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=BA=91=E6=8E=88=E6=9D=83=E7=9A=84=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=20=E4=BA=91=E6=8E=88=E6=9D=83=E7=9A=84=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=BF=98=E6=B2=A1=E5=86=99=EF=BC=8C=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E7=9A=84=E5=86=99=E5=AE=8C=E5=8F=AF=E4=BB=A5=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/errorinfo/ErrorInfoUploader.java | 10 +++++++--- .../fr/design/actions/file/SwitchExistEnv.java | 2 -- .../help/alphafine/AlphaFineConfigManager.java | 6 +++--- .../com/fr/design/mainframe/DesignerFrame.java | 5 +++-- designer_base/src/com/fr/env/RemoteEnv.java | 15 ++++++--------- designer_base/src/com/fr/env/SignIn.java | 7 ++++--- .../src/com/fr/design/chart/ChartTypePane.java | 10 ++++------ 7 files changed, 27 insertions(+), 28 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java index 07aadbe91..2651fdd1c 100644 --- a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java +++ b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java @@ -1,11 +1,15 @@ package com.fr.design.mainframe.errorinfo; import com.fr.base.FRContext; -import com.fr.base.FRCoreContext; -import com.fr.general.*; +import com.fr.general.ComparatorUtils; +import com.fr.general.FRLogger; +import com.fr.general.GeneralContext; +import com.fr.general.IOUtils; +import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; import com.fr.json.JSONException; import com.fr.json.JSONObject; +import com.fr.license.function.VT4FR; import com.fr.stable.CodeUtils; import com.fr.stable.EnvChangedListener; import com.fr.stable.ProductConstants; @@ -41,7 +45,7 @@ public class ErrorInfoUploader { }); // 这个控制没啥意义, 主要在于宣传功能. - licSupport = VT4FR.isLicAvailable(FRCoreContext.getBytes()) && VT4FR.ALPHA_FINE.support(); + licSupport = VT4FR.AlphaFine.support(); } private ErrorInfoUploader() { diff --git a/designer_base/src/com/fr/design/actions/file/SwitchExistEnv.java b/designer_base/src/com/fr/design/actions/file/SwitchExistEnv.java index fbb7d0ae1..6b2688767 100644 --- a/designer_base/src/com/fr/design/actions/file/SwitchExistEnv.java +++ b/designer_base/src/com/fr/design/actions/file/SwitchExistEnv.java @@ -3,7 +3,6 @@ package com.fr.design.actions.file; import com.fr.base.BaseUtils; import com.fr.base.Env; import com.fr.base.FRContext; -import com.fr.base.FRCoreContext; import com.fr.dav.LocalEnv; import com.fr.design.DesignerEnvManager; import com.fr.design.actions.UpdateAction; @@ -118,7 +117,6 @@ public class SwitchExistEnv extends MenuDef { return; } SignIn.signIn(selectedEnv); - FRCoreContext.resetBytes(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshToolArea(); fireDSChanged(); } catch (Exception em) { diff --git a/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java b/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java index 8d58ce457..b601a3429 100644 --- a/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java +++ b/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java @@ -1,8 +1,7 @@ package com.fr.design.actions.help.alphafine; import com.fr.base.FRContext; -import com.fr.base.FRCoreContext; -import com.fr.general.VT4FR; +import com.fr.license.function.VT4FR; import com.fr.stable.OperatingSystem; import com.fr.stable.StringUtils; import com.fr.stable.xml.XMLPrintWriter; @@ -75,7 +74,8 @@ public class AlphaFineConfigManager implements XMLable { } public static boolean isALPHALicAvailable() { - return FRContext.getCurrentEnv() != null && VT4FR.isLicAvailable(FRCoreContext.getBytes()) && VT4FR.ALPHA_FINE.support(); + + return FRContext.getCurrentEnv() != null && VT4FR.AlphaFine.support(); } @Override diff --git a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java index 5135cf299..6bf974e9d 100644 --- a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java +++ b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java @@ -10,7 +10,6 @@ import com.fr.design.DesignModelAdapter; import com.fr.design.DesignState; import com.fr.design.DesignerEnvManager; import com.fr.design.ExtraDesignClassManager; -import com.fr.design.actions.help.alphafine.AlphaFineConfigManager; import com.fr.design.constants.UIConstants; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.datapane.TableDataTreePane; @@ -42,6 +41,7 @@ import com.fr.general.ComparatorUtils; import com.fr.general.FRLogger; import com.fr.general.GeneralContext; import com.fr.general.Inter; +import com.fr.general.env.EnvContext; import com.fr.plugin.context.PluginContext; import com.fr.plugin.injectable.PluginModule; import com.fr.plugin.manage.PluginFilter; @@ -966,8 +966,9 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta Env currentEnv = FRContext.getCurrentEnv(); try { + EnvContext.fireBeforeSignOut(); currentEnv.signOut(); - GeneralContext.fireEnvSignOutListener(); + EnvContext.fireAfterSignOut(); } catch (Exception e) { FRContext.getLogger().error(e.getMessage(), e); } diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 165ed3468..efcf5f583 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -3,7 +3,6 @@ package com.fr.env; import com.fr.base.AbstractEnv; import com.fr.base.EnvException; import com.fr.base.FRContext; -import com.fr.base.FRCoreContext; import com.fr.base.ModifiedTable; import com.fr.base.Parameter; import com.fr.base.StoreProcedureParameter; @@ -35,16 +34,16 @@ import com.fr.general.FRLogger; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.general.LogRecordTime; -import com.fr.general.VT4FR; import com.fr.general.http.HttpClient; import com.fr.json.JSONArray; import com.fr.json.JSONException; import com.fr.json.JSONObject; +import com.fr.license.function.VT4FR; +import com.fr.regist.License; import com.fr.share.ShareConstants; import com.fr.stable.ArrayUtils; import com.fr.stable.EncodeConstants; import com.fr.stable.JavaCompileInfo; -import com.fr.stable.LicUtils; import com.fr.stable.ProductConstants; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; @@ -56,8 +55,7 @@ import com.fr.stable.xml.XMLTools; import com.fr.stable.xml.XMLableReader; import com.fr.web.ResourceConstants; -import javax.swing.JOptionPane; -import javax.swing.UIManager; +import javax.swing.*; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; @@ -65,7 +63,7 @@ import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; -import java.awt.Component; +import java.awt.*; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -198,7 +196,7 @@ public class RemoteEnv extends AbstractEnv { private String createUserID() throws EnvException { // 如果登录之后userID还是null if (this.userID == null) { - if (!VT4FR.REMOTE_DESIGN.support() && licNotSupport <= 0) { + if (!VT4FR.RemoteDesign.support() && licNotSupport <= 0) { licNotSupport++; JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Lic_does_not_Support_Remote")); } @@ -1438,7 +1436,6 @@ public class RemoteEnv extends AbstractEnv { return; } SignIn.signIn(remoteEnv); - FRCoreContext.resetBytes(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshToolArea(); } catch (Exception em) { FRContext.getLogger().error(em.getMessage(), em); @@ -2036,7 +2033,7 @@ public class RemoteEnv extends AbstractEnv { @Override public String getLicName() { - return LicUtils.FILE_NAME; + return License.FILE_NAME; } @Override diff --git a/designer_base/src/com/fr/env/SignIn.java b/designer_base/src/com/fr/env/SignIn.java index 79e677234..355fb3c92 100644 --- a/designer_base/src/com/fr/env/SignIn.java +++ b/designer_base/src/com/fr/env/SignIn.java @@ -3,9 +3,9 @@ package com.fr.env; import com.fr.base.Env; import com.fr.base.FRContext; -import com.fr.general.ComparatorUtils; import com.fr.design.utils.DesignUtils; -import com.fr.general.GeneralContext; +import com.fr.general.ComparatorUtils; +import com.fr.general.env.EnvContext; public class SignIn { @@ -33,8 +33,9 @@ public class SignIn { return; } try { - GeneralContext.fireEnvSignOutListener(); + EnvContext.fireBeforeSignOut(); lastSelectedEnv.signOut(); + EnvContext.fireAfterSignOut(); } catch (Exception e) { FRContext.getLogger().error(e.getMessage(), e); } diff --git a/designer_chart/src/com/fr/design/chart/ChartTypePane.java b/designer_chart/src/com/fr/design/chart/ChartTypePane.java index 01040d6c5..1c056cd23 100644 --- a/designer_chart/src/com/fr/design/chart/ChartTypePane.java +++ b/designer_chart/src/com/fr/design/chart/ChartTypePane.java @@ -5,7 +5,6 @@ package com.fr.design.chart; */ import com.fr.base.FRContext; -import com.fr.base.FRCoreContext; import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; @@ -17,8 +16,8 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.Inter; -import com.fr.general.RegistEditionException; -import com.fr.general.VT4FR; +import com.fr.license.exception.RegistEditionException; +import com.fr.license.function.VT4FR; import javax.swing.*; import javax.swing.event.ListSelectionEvent; @@ -159,7 +158,7 @@ public class ChartTypePane extends ChartCommonWizardPane { if(chart.getPlot() != null){ if(chart.getPlot() instanceof MapPlot && !supportMap()){ JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Chart-Map_Not_Supported")); - throw new RegistEditionException(VT4FR.CHART_MAP); + throw new RegistEditionException(VT4FR.ChartMap); } if (chart.getPlot() != null) { @@ -173,8 +172,7 @@ public class ChartTypePane extends ChartCommonWizardPane { } private boolean supportMap() { - byte[] bytes = FRCoreContext.getBytes(); - return VT4FR.isLicAvailable(bytes) && VT4FR.CHART_MAP.support(); + return VT4FR.ChartMap.support(); } public void update(ChartCollection cc) { From 3ad5ecf3df555c6e176b4ce86345ec7f03fd7f84 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Tue, 10 Oct 2017 16:10:31 +0800 Subject: [PATCH 26/35] RT --- designer_base/src/com/fr/design/mainframe/DesignerFrame.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java index 87369d459..2a6efc31a 100644 --- a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java +++ b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java @@ -326,7 +326,6 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta private void refreshNorthEastPane(JPanel northEastPane, ToolBarMenuDock ad) { northEastPane.removeAll(); - northEastPane.setOpaque(false); northEastPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0)); northEastPane.add(LogMessageBar.getInstance()); TitlePlaceProcessor processor = ExtraDesignClassManager.getInstance().getSingle(TitlePlaceProcessor.MARK_STRING); From bf588b70c9549cb73be8f1ba07be74973a24a628 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 10 Oct 2017 16:20:26 +0800 Subject: [PATCH 27/35] =?UTF-8?q?REPORT-4999=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E7=9A=84=E5=B0=8F=E9=97=AE=E9=A2=98-?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E9=9D=A0=E5=B7=A6=E6=88=96=E9=9D=A0=E5=8F=B3?= =?UTF-8?q?=E7=AD=89=E8=AE=BE=E7=BD=AE=E6=97=B6=EF=BC=8C=E4=B9=8B=E5=89=8D?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=9A=84=E5=9C=B0=E6=96=B9=E4=BC=9A=E5=8F=98?= =?UTF-8?q?=E6=88=90=E7=A9=BA=E7=99=BD=E5=86=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit REPORT-4888 设计器交互修改-优化加粗、倾斜、下划线点击触发效果 --- .../fr/design/actions/ButtonGroupAction.java | 4 +- .../actions/cell/style/AlignmentAction.java | 40 ++++------ .../cell/style/ReportFontBoldAction.java | 76 +++++++++---------- .../cell/style/ReportFontItalicAction.java | 9 +-- .../cell/style/ReportFontUnderlineAction.java | 8 +- .../com/fr/design/actions/UpdateAction.java | 4 + .../fr/design/gui/ibutton/UIToggleButton.java | 14 +++- .../fr/design/gui/style/AlignmentPane.java | 14 ++-- .../com/fr/design/utils/gui/GUICoreUtils.java | 27 +++++++ 9 files changed, 106 insertions(+), 90 deletions(-) diff --git a/designer/src/com/fr/design/actions/ButtonGroupAction.java b/designer/src/com/fr/design/actions/ButtonGroupAction.java index e3f20f70b..b45a5d34a 100644 --- a/designer/src/com/fr/design/actions/ButtonGroupAction.java +++ b/designer/src/com/fr/design/actions/ButtonGroupAction.java @@ -6,12 +6,12 @@ import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.mainframe.ElementCasePane; public abstract class ButtonGroupAction extends ElementCaseAction{ - protected Icon[] iconArray; + protected Icon[][] iconArray; protected Integer[] valueArray; private UIButtonGroup group; - protected ButtonGroupAction(ElementCasePane t, Icon[] iconArray, Integer[] valueArray) { + protected ButtonGroupAction(ElementCasePane t, Icon[][] iconArray, Integer[] valueArray) { super(t); this.iconArray = iconArray; this.valueArray = valueArray; diff --git a/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java b/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java index c3b690c97..b7857fb7e 100644 --- a/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java +++ b/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java @@ -21,20 +21,16 @@ import javax.swing.*; public class AlignmentAction extends ButtonGroupAction implements StyleActionInterface { - private static final Icon[] normalBlackIcon = new Icon[]{ - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png")}; + private static final Icon[][] icons = new Icon[][]{ + {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal_white.png")}, + {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal_white.png")}, + {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal_white.png")}}; - private static final Icon[] toggleWhiteIcon = new Icon[]{ - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal_white.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal_white.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal_white.png")}; private static final Integer[] valueArray = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT}; public AlignmentAction(ElementCasePane t) { - super(t, normalBlackIcon, valueArray); + super(t, icons, valueArray); } @@ -49,24 +45,14 @@ public class AlignmentAction extends ButtonGroupAction implements StyleActionInt return style.deriveHorizontalAlignment(getSelectedValue()); } - /** - * 更新Style - * - * @param style style - */ - public void updateStyle(Style style) { - UIButtonGroup buttonGroup = createToolBarComponent(); - int selected = BaseUtils.getAlignment4Horizontal(style); - for (int i = 0; i < normalBlackIcon.length; i++) { - UIToggleButton button = buttonGroup.getButton(i); - Icon currentIcon = button.getIcon(); - Icon newIcon = selected == valueArray[i] ? toggleWhiteIcon[i] : normalBlackIcon[i]; - if (newIcon != currentIcon) { - button.setIcon(newIcon); - } - } - setSelectedIndex(selected); - } + /** + * 更新Style + * + * @param style style + */ + public void updateStyle(Style style) { + setSelectedIndex(BaseUtils.getAlignment4Horizontal(style)); + } /** * executeActionReturnUndoRecordNeeded diff --git a/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java b/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java index 0abe5ff4b..0c1af52b0 100644 --- a/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java +++ b/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java @@ -21,42 +21,36 @@ import javax.swing.*; public class ReportFontBoldAction extends AbstractStyleAction implements ToggleButtonUpdateAction { private UIToggleButton button; protected Style style; - private final static Icon blackIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"); - private final static Icon whiteIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold_white.png"); + private final static Icon[] icons = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold_white.png")}; public ReportFontBoldAction(ElementCasePane t) { super(t); this.setName(Inter.getLocText("FRFont-bold")); - this.setSmallIcon(blackIcon); + this.setSmallIcon(icons, true); } - /** - * 根据按钮状态获取格式 - * - * @param style - * @param defStyle - * @return - */ - @Override - public Style executeStyle(Style style, Style defStyle) { - button = createToolBarComponent(); - button.setIcon(getToggleButtonIcon(button.isSelected())); - button.setSelected(!button.isSelected()); - if (button.isSelected()) { - setSelectedFont(style); - button.setSelected(false); - } else { - setUnselectedFont(style); - button.setSelected(true); - } + /** + * 根据按钮状态获取格式 + * + * @param style + * @param defStyle + * @return + */ + @Override + public Style executeStyle(Style style, Style defStyle) { + createToolBarComponent().setSelected(!createToolBarComponent().isSelected()); + if (createToolBarComponent().isSelected()) { + setSelectedFont(style); + createToolBarComponent().setSelected(false); + } else { + setUnselectedFont(style); + createToolBarComponent().setSelected(true); + } return this.style; } - protected Icon getToggleButtonIcon(boolean isSelected) { - return isSelected ? blackIcon : whiteIcon; - } protected void setSelectedFont(Style style) { this.style = StyleUtils.boldReportFont(style); @@ -66,22 +60,20 @@ public class ReportFontBoldAction extends AbstractStyleAction implements ToggleB this.style = StyleUtils.unBoldReportFont(style); } - /** - * Update Style. - */ - @Override - public void updateStyle(Style style) { - if (style == null) { - return; - } - FRFont frFont = style.getFRFont(); - if (frFont == null) { - return; - } - button = createToolBarComponent(); - button.setSelected(isStyle(frFont)); - button.setIcon(getToggleButtonIcon(!button.isSelected())); - } + /** + * Update Style. + */ + @Override + public void updateStyle(Style style) { + if (style == null) { + return; + } + FRFont frFont = style.getFRFont(); + if (frFont == null) { + return; + } + createToolBarComponent().setSelected(isStyle(frFont)); + } protected boolean isStyle(FRFont frFont) { return frFont.isBold(); @@ -95,7 +87,7 @@ public class ReportFontBoldAction extends AbstractStyleAction implements ToggleB @Override public UIToggleButton createToolBarComponent() { if (button == null) { - button = GUICoreUtils.createToolBarComponent(this); + button = GUICoreUtils.createToolBarComponentWhiteIcon(this); button.setEventBannded(true); } return button; diff --git a/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java b/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java index 7857cefe8..9f9f21885 100644 --- a/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java +++ b/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java @@ -17,14 +17,13 @@ import javax.swing.*; */ public class ReportFontItalicAction extends ReportFontBoldAction { - private final static Icon blackIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"); - private final static Icon whiteIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic_white.png"); + private final static Icon[] icons = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic_white.png")}; public ReportFontItalicAction(ElementCasePane t) { super(t); this.setName(Inter.getLocText("FRFont-italic")); - this.setSmallIcon(blackIcon); + this.setSmallIcon(icons, true); } @@ -36,10 +35,6 @@ public class ReportFontItalicAction extends ReportFontBoldAction { this.style = StyleUtils.unItalicReportFont(style); } - protected Icon getToggleButtonIcon(boolean isSelected) { - return isSelected ? blackIcon : whiteIcon; - } - protected boolean isStyle(FRFont frFont) { return frFont.isItalic(); } diff --git a/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java b/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java index 96369867d..dc4fbe788 100644 --- a/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java +++ b/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java @@ -18,14 +18,13 @@ import javax.swing.*; */ public class ReportFontUnderlineAction extends ReportFontBoldAction { - private final static Icon blackIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.png"); - private final static Icon whiteIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline_white.png"); + private final static Icon[] icons = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline_white.png")}; public ReportFontUnderlineAction(ElementCasePane t) { super(t); this.setName(Inter.getLocText("FRFont-Underline")); - this.setSmallIcon(blackIcon); + this.setSmallIcon(icons, true); } protected void setSelectedFont (Style style) { @@ -36,9 +35,6 @@ public class ReportFontUnderlineAction extends ReportFontBoldAction { this.style = StyleUtils.setReportFontUnderline(style, false); } - protected Icon getToggleButtonIcon(boolean isSelected) { - return isSelected ? blackIcon : whiteIcon; - } protected boolean isStyle(FRFont frFont) { return frFont.getUnderline() != Constants.LINE_NONE; diff --git a/designer_base/src/com/fr/design/actions/UpdateAction.java b/designer_base/src/com/fr/design/actions/UpdateAction.java index eb0ede5fa..8c458b53f 100644 --- a/designer_base/src/com/fr/design/actions/UpdateAction.java +++ b/designer_base/src/com/fr/design/actions/UpdateAction.java @@ -139,6 +139,10 @@ public abstract class UpdateAction extends ShortCut implements Action { this.putValue(Action.SMALL_ICON, smallIcon); } + public void setSmallIcon(Icon[] smallIcon, boolean white) { + this.putValue(Action.SMALL_ICON, smallIcon); + } + /** * Returns the mnemonic property setting. * diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java b/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java index c51a72acd..0a5351048 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java @@ -48,7 +48,7 @@ public class UIToggleButton extends UIButton implements GlobalNameObserver{ } /** - * 需要反白的按钮接口 + * 需要反白的按钮接口(组合按钮情况-UIButtonGroup) * support icons[normalIcon, selectedIcon] * @param icons */ @@ -67,6 +67,18 @@ public class UIToggleButton extends UIButton implements GlobalNameObserver{ addMouseListener(getMouseListener()); } + /** + * 需要反白的按钮接口(单个按钮情况)-再次点击取消选中状态 + * support icons[normalIcon, selectedIcon] + * @param icons + */ + public UIToggleButton(Icon[] icons, boolean needRelease) { + super(icons[0], null, icons[1]); + setSelectedIcon(icons[1]); + setExtraPainted(true); + addMouseListener(getMouseListener()); + } + public void setGlobalName(String name){ toggleButtonName = name ; } diff --git a/designer_base/src/com/fr/design/gui/style/AlignmentPane.java b/designer_base/src/com/fr/design/gui/style/AlignmentPane.java index 116c85342..f0e760cfd 100644 --- a/designer_base/src/com/fr/design/gui/style/AlignmentPane.java +++ b/designer_base/src/com/fr/design/gui/style/AlignmentPane.java @@ -80,11 +80,15 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO imageLayoutComboBox = new UIComboBox(LAYOUT); initTextRotationCombox(); - Icon[] hAlignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png")}; + Icon[][] hAlignmentIconArray = {{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal_white.png")}, + {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal_white.png")}, + {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal_white.png")}, + {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png")}, + {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png")}}; +// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), +// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"), +// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png"), +// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png")}; Integer[] hAlignment = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT, Integer.valueOf(Constants.DISTRIBUTED), Constants.NULL}; hAlignmentPane = new UIButtonGroup(hAlignmentIconArray, hAlignment); hAlignmentPane.setAllToolTips(new String[]{Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Left"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Center"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Right"), diff --git a/designer_base/src/com/fr/design/utils/gui/GUICoreUtils.java b/designer_base/src/com/fr/design/utils/gui/GUICoreUtils.java index b68418cc3..0225cf542 100644 --- a/designer_base/src/com/fr/design/utils/gui/GUICoreUtils.java +++ b/designer_base/src/com/fr/design/utils/gui/GUICoreUtils.java @@ -221,6 +221,33 @@ public abstract class GUICoreUtils{ return (UIToggleButton) object; } + /** + * 创建工具栏组件-反白icon + * @param updateAction 更新动作 + * @return UIToggleButton 按钮 + * + */ + public static UIToggleButton createToolBarComponentWhiteIcon(UpdateAction updateAction) { + UIToggleButton button = new UIToggleButton((Icon[]) updateAction.getValue(Action.SMALL_ICON), true); + button.set4ToolbarButton(); + Integer mnemonicInteger = (Integer) updateAction.getValue(Action.MNEMONIC_KEY); + if (mnemonicInteger != null) { + button.setMnemonic((char) mnemonicInteger.intValue()); + } + + button.addActionListener(updateAction); + + button.registerKeyboardAction(updateAction, updateAction.getAccelerator(), JComponent.WHEN_IN_FOCUSED_WINDOW); + + updateAction.putValue(UIToggleButton.class.getName(), button); + button.setText(StringUtils.EMPTY); + button.setEnabled(updateAction.isEnabled()); + + button.setToolTipText(ActionFactory.createButtonToolTipText(updateAction)); + + return button; + } + /** * 设置一个窗口 * From b55bc7dbc054a82137d1ba196528c40ef5414b5f Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 10 Oct 2017 17:01:41 +0800 Subject: [PATCH 28/35] =?UTF-8?q?REPORT-4887=20@plough=EF=BC=9A9.0?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E4=BA=A4=E4=BA=92=E9=AA=8C=E6=94=B6?= =?UTF-8?q?=E9=97=AE=E9=A2=98=3D>=E8=81=9A=E5=90=88=E8=A1=A8=3D=E3=80=8B?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=B0=BA=E5=AF=B8=E3=80=81=E5=AF=B9=E9=BD=90?= =?UTF-8?q?=E9=97=B4=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/poly/PolyBlockProperTable.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer/src/com/fr/poly/PolyBlockProperTable.java b/designer/src/com/fr/poly/PolyBlockProperTable.java index 647427c64..91a879412 100644 --- a/designer/src/com/fr/poly/PolyBlockProperTable.java +++ b/designer/src/com/fr/poly/PolyBlockProperTable.java @@ -42,6 +42,8 @@ public class PolyBlockProperTable extends JPanel { height = new UISpinner(0, MAX_SPINNER_VALUE, 1); UIExpandablePane boundsPane = WidgetBoundsPaneFactory.createAbsoluteBoundsPane(x, y, width, height); this.add(boundsPane, BorderLayout.CENTER); + + this.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); } private void initListener(Container parentComponent) { From 6b75e5eca3e537384ab482e38f00acab619ae083 Mon Sep 17 00:00:00 2001 From: hzzz Date: Tue, 10 Oct 2017 17:23:31 +0800 Subject: [PATCH 29/35] =?UTF-8?q?tab=E4=B8=8A=E8=BE=B9=E7=9A=84=E7=BA=BF?= =?UTF-8?q?=20=E6=95=B0=E6=8D=AE=E9=9B=86=E5=9B=BE=E6=A0=87=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=20=E6=95=B0=E6=8D=AE=E9=9B=86=E5=92=8C=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=A0=91=E7=9A=84=E5=AD=97=E9=A2=9C=E8=89=B2=20?= =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E6=8B=89=E5=8A=A8=E6=9D=A1=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E5=92=8C=E9=A2=9C=E8=89=B2=20=E8=A1=A8=E6=A0=BC=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=BB=9A=E5=8A=A8=E6=9D=A1=E4=B8=A4=E4=BE=A7=E7=AE=AD?= =?UTF-8?q?=E5=A4=B4=E5=9B=BE=E6=A0=87=20=E8=A1=A8=E6=A0=BC=E9=83=A8?= =?UTF-8?q?=E5=88=86=E5=B7=A6=E4=B8=8A=E8=A7=92=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/cell/bar/DynamicScrollButton.java | 41 ++----------- designer/src/com/fr/grid/GridCorner.java | 54 +++++++++--------- .../com/fr/design/constants/UIConstants.java | 7 +++ .../design/data/datapane/TableDataTree.java | 2 +- .../data/datapane/TableDataTreePane.java | 4 +- .../fr/design/file/MutilTempalteTabPane.java | 2 +- .../gui/icontainer/UIResizableContainer.java | 8 +-- .../gui/itree/filetree/EnvFileTree.java | 5 +- .../src/com/fr/design/images/control/dotv.png | Bin 2865 -> 100 bytes 9 files changed, 49 insertions(+), 74 deletions(-) diff --git a/designer/src/com/fr/design/cell/bar/DynamicScrollButton.java b/designer/src/com/fr/design/cell/bar/DynamicScrollButton.java index d4a3db8a7..680244f89 100644 --- a/designer/src/com/fr/design/cell/bar/DynamicScrollButton.java +++ b/designer/src/com/fr/design/cell/bar/DynamicScrollButton.java @@ -1,5 +1,6 @@ package com.fr.design.cell.bar; +import com.fr.design.constants.UIConstants; import com.fr.general.ComparatorUtils; import javax.swing.*; @@ -63,48 +64,16 @@ public class DynamicScrollButton extends BasicArrowButton { private void paintArrow(Graphics g, Dimension size) { switch (direction) { case SwingConstants.NORTH: - g.drawLine(8, 5, 8, 5); - g.drawLine(7, 6, 9, 6); - g.drawLine(6, 7, 10, 7); - g.drawLine(5, 8, 7, 8); - g.drawLine(9, 8, 11, 8); - g.drawLine(4, 9, 6, 9); - g.drawLine(10, 9, 12, 9); - g.drawLine(5, 10, 5, 10); - g.drawLine(11, 10, 11, 10); + g.drawImage(UIConstants.ARROW_NORTH, 0, 0, this); break; case SwingConstants.SOUTH: - g.drawLine(5, 6, 5, 6); - g.drawLine(11, 6, 11, 6); - g.drawLine(4, 7, 6, 7); - g.drawLine(10, 7, 12, 7); - g.drawLine(5, 8, 7, 8); - g.drawLine(9, 8, 11, 8); - g.drawLine(6, 9, 10, 9); - g.drawLine(7, 10, 9, 10); - g.drawLine(8, 11, 8, 11); + g.drawImage(UIConstants.ARROW_SOUTH, 0, 0, this); break; case SwingConstants.EAST: - g.drawLine(6, 5, 6, 5); - g.drawLine(6, 11, 6, 11); - g.drawLine(7, 4, 7, 6); - g.drawLine(7, 10, 7, 12); - g.drawLine(8, 5, 8, 7); - g.drawLine(8, 9, 8, 11); - g.drawLine(9, 6, 9, 10); - g.drawLine(10, 7, 10, 9); - g.drawLine(11, 8, 11, 8); + g.drawImage(UIConstants.ARROW_EAST, 0, 0, this); break; case SwingConstants.WEST: - g.drawLine(4, 8, 4, 8); - g.drawLine(5, 7, 5, 9); - g.drawLine(6, 6, 6, 10); - g.drawLine(7, 5, 7, 7); - g.drawLine(7, 9, 7, 11); - g.drawLine(8, 4, 8, 6); - g.drawLine(8, 10, 8, 12); - g.drawLine(9, 5, 9, 5); - g.drawLine(9, 11, 9, 11); + g.drawImage(UIConstants.ARROW_WEST, 0, 0, this); break; } } diff --git a/designer/src/com/fr/grid/GridCorner.java b/designer/src/com/fr/grid/GridCorner.java index 91891fd44..8cb236d2d 100644 --- a/designer/src/com/fr/grid/GridCorner.java +++ b/designer/src/com/fr/grid/GridCorner.java @@ -3,18 +3,15 @@ */ package com.fr.grid; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.geom.Rectangle2D; - -import javax.swing.event.MouseInputListener; - import com.fr.base.GraphHelper; import com.fr.base.ScreenResolution; +import com.fr.design.constants.UIConstants; import com.fr.design.mainframe.ElementCasePane; +import javax.swing.event.MouseInputListener; +import java.awt.*; +import java.awt.geom.Rectangle2D; + /** * GridCorner used to paint and edit grid cornor. */ @@ -29,16 +26,16 @@ public class GridCorner extends BaseGridComponent { this.addMouseListener(l); this.addMouseMotionListener(l); } - + /** * Paints component */ @Override - public void paintComponent(Graphics g) { + public void paintComponent(Graphics g) { Graphics2D g2d = (Graphics2D) g; ElementCasePane reportPane = this.getElementCasePane(); - float time = (float)reportPane.getResolution()/ ScreenResolution.getScreenResolution(); + float time = (float) reportPane.getResolution() / ScreenResolution.getScreenResolution(); //size Dimension size = this.getSize(); Rectangle2D rect2D = new Rectangle2D.Double(0, 0, size.getWidth(), size.getHeight()); @@ -50,9 +47,9 @@ public class GridCorner extends BaseGridComponent { g2d.setPaint(reportPane.getBackground()); GraphHelper.fill(g2d, rect2D); } - + paintArc(g2d, size, time); - + //画左边的边框线. g2d.setColor(reportPane.getGridColumn().getSeparatorLineColor()); GraphHelper.drawLine(g2d, 0, 0, 0, size.getHeight()); @@ -66,7 +63,7 @@ public class GridCorner extends BaseGridComponent { * Gets the preferred size. */ @Override - public Dimension getPreferredSize() { + public Dimension getPreferredSize() { ElementCasePane reportPane = this.getElementCasePane(); if (!reportPane.isColumnHeaderVisible() || !reportPane.isRowHeaderVisible()) { @@ -74,28 +71,31 @@ public class GridCorner extends BaseGridComponent { } return new Dimension(reportPane.getGridRow().getPreferredSize().width, - reportPane.getGridColumn().getPreferredSize().height); + reportPane.getGridColumn().getPreferredSize().height); } /** * Gets corner background. */ @Override - public Color getBackground() { + public Color getBackground() { return super.getBackground(); } - + private void paintArc(Graphics2D g2d, Dimension size, float time) { - g2d.setColor(Color.gray); - int width = (int) (size.width - (16 * time)); - int avgWidth = width / 3; - int height = (int) (size.height - (8 * time)); - int avgHeight = height / 3; - for (int i = 0; i < 3; i ++) { - for (int j = 0; j < 3; j ++) { - GraphHelper.fillArc(g2d, (8 * time) + (i * avgWidth), (4 * time) + (j * avgHeight), 3, 3, 0, 360); - } - } + g2d.setColor(UIConstants.LINE_COLOR); + float height = 2 * time; + float width = 2 * time; + float hgap = 4 * time; + float vgap = 3 * time; + + int x = (int) ((size.width - (hgap * 2 + width * 3)) / 2); + int y = (int) (size.height - (vgap * 2 + height * 3)); + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 3; j++) { + GraphHelper.fillRect(g2d, x + (i * hgap), y + (j * vgap), width, height); + } + } } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/constants/UIConstants.java b/designer_base/src/com/fr/design/constants/UIConstants.java index 5552b09bc..fde81e885 100644 --- a/designer_base/src/com/fr/design/constants/UIConstants.java +++ b/designer_base/src/com/fr/design/constants/UIConstants.java @@ -120,6 +120,12 @@ public interface UIConstants { public static final BufferedImage DRAG_BAR = BaseUtils.readImage("com/fr/design/images/control/bar.png"); + public static final BufferedImage DRAG_BAR_LIGHT = BaseUtils.readImage("com/fr/design/images/control/bar-light.png"); + public static final BufferedImage ARROW_NORTH = BaseUtils.readImage("com/fr/design/images/control/up_arrow.png"); + public static final BufferedImage ARROW_SOUTH = BaseUtils.readImage("com/fr/design/images/control/down_arrow.png"); + public static final BufferedImage ARROW_EAST = BaseUtils.readImage("com/fr/design/images/control/east_arrow.png"); + public static final BufferedImage ARROW_WEST = BaseUtils.readImage("com/fr/design/images/control/west_arrow.png"); + public static final BufferedImage DRAG_BAR_RIGHT = BaseUtils.readImage("com/fr/design/images/control/barm.png"); public static final BufferedImage DRAG_BAR_LEFT = BaseUtils.readImage("com/fr/design/images/control/barl.png"); public static final BufferedImage DRAG_UP_NORMAL = BaseUtils.readImage("com/fr/design/images/control/upnor.png"); @@ -131,6 +137,7 @@ public interface UIConstants { public static final BufferedImage DRAG_LEFT_NORMAL = BaseUtils.readImage("com/fr/design/images/control/leftnor.png"); public static final BufferedImage DRAG_LEFT_PRESS = BaseUtils.readImage("com/fr/design/images/control/leftpre.png"); public static final BufferedImage DRAG_DOT = BaseUtils.readImage("com/fr/design/images/control/dot.png"); + public static final BufferedImage DRAG_LINE = BaseUtils.readImage("com/fr/design/images/control/dot-line.png"); public static final BufferedImage ACCESSIBLE_EDITOR_DOT = BaseUtils.readImage("com/fr/design/images/control/dot.png"); public static final BufferedImage DRAG_DOT_VERTICAL = BaseUtils.readImage("com/fr/design/images/control/dotv.png"); public static final BufferedImage POP_BUTTON_DOWN = BaseUtils.readImage("com/fr/design/images/buttonicon/popdownarrow.png"); diff --git a/designer_base/src/com/fr/design/data/datapane/TableDataTree.java b/designer_base/src/com/fr/design/data/datapane/TableDataTree.java index 8082d8c1e..2d3b5e4be 100644 --- a/designer_base/src/com/fr/design/data/datapane/TableDataTree.java +++ b/designer_base/src/com/fr/design/data/datapane/TableDataTree.java @@ -75,7 +75,7 @@ public class TableDataTree extends UserObjectRefreshJTree { this.setSize(dim); this.setPreferredSize(dim); this.setBackgroundNonSelectionColor(UIConstants.TREE_BACKGROUND); - this.setForeground(UIConstants.FONT_COLOR); + this.setTextSelectionColor(Color.WHITE); this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE); return this; } diff --git a/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java b/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java index 7a4cf5204..3a3e877eb 100644 --- a/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java +++ b/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java @@ -159,10 +159,10 @@ public class TableDataTreePane extends BasicTableDataTreePane { } protected void initbuttonGroup() { - Icon[] iconArray = {BaseUtils.readIcon("/com/fr/design/images/data/datasource.png"), BaseUtils.readIcon("/com/fr/design/images/data/dock/serverdatabase.png")}; +// Icon[] iconArray = {BaseUtils.readIcon("/com/fr/design/images/data/datasource.png"), BaseUtils.readIcon("/com/fr/design/images/data/dock/serverdatabase.png")}; final Integer[] modeArray = {TEMPLATE_TABLE_DATA, SERVER_TABLE_DATA}; String[] textArray = {Inter.getLocText(new String[]{"Template", "DS-TableData"}), Inter.getLocText("DS-Server_TableData")}; - buttonGroup = new UIHeadGroup(iconArray, textArray) { + buttonGroup = new UIHeadGroup(textArray) { public void tabChanged(int index) { if (op != null) { op.setDataMode(modeArray[buttonGroup.getSelectedIndex()]); diff --git a/designer_base/src/com/fr/design/file/MutilTempalteTabPane.java b/designer_base/src/com/fr/design/file/MutilTempalteTabPane.java index 44307b018..4c4dc8236 100644 --- a/designer_base/src/com/fr/design/file/MutilTempalteTabPane.java +++ b/designer_base/src/com/fr/design/file/MutilTempalteTabPane.java @@ -496,7 +496,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M */ private int paintSelectedTab(Graphics2D g2d, Icon sheeticon, double templateStartX, String sheetName, Icon closeIcon) { double[] x = {templateStartX, templateStartX, templateStartX + realWidth, templateStartX + realWidth, templateStartX}; - double[] y = {-1, getHeight(), getHeight(), -1, -1}; + double[] y = {1, getHeight() + 1, getHeight() + 1, 1, 1}; RoundRectangle2D.Double rect1 = new RoundRectangle2D.Double(templateStartX, 1, this.getWidth(), this.getHeight(), 7, 7); g2d.setPaint(new GradientPaint(1, 1, UIConstants.SELECT_TAB, 1, getHeight() - 1, UIConstants.SELECT_TAB)); //选了30度和60度的特殊角度的x,y作为经过的两个点的坐标 diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java index 5d35bf02e..5f28fadde 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -397,8 +397,8 @@ public class UIResizableContainer extends JPanel { Image upButton = (upModel == UIConstants.MODEL_NORMAL ? UIConstants.DRAG_UP_NORMAL : UIConstants.DRAG_UP_PRESS); Image downButton = (downModel == UIConstants.MODEL_NORMAL ? UIConstants.DRAG_DOWN_NORMAL : UIConstants.DRAG_DOWN_PRESS); - g.drawImage(UIConstants.DRAG_BAR, 0, 0, getWidth(), getHeight(), null); - g.drawImage(UIConstants.DRAG_DOT, (getWidth() - toolPaneHeight) / 2, 3, toolPaneHeight, 5, null); + g.drawImage(UIConstants.DRAG_BAR_LIGHT, 0, 0, getWidth(), getHeight(), null); + g.drawImage(UIConstants.DRAG_LINE, (getWidth() - toolPaneHeight) / 2, 3, toolPaneHeight, 5, null); g.drawImage(upButton, ARROW_MARGIN, 3, toolPaneHeight, 5, null); g.drawImage(downButton, getWidth() - toolPaneHeight - ARROW_MARGIN, 3, toolPaneHeight, 5, null); } @@ -488,7 +488,7 @@ public class UIResizableContainer extends JPanel { public void paint(Graphics g) { Image button; if (direction == Constants.RIGHT) { - g.drawImage(UIConstants.DRAG_BAR, 0, 0, toolPaneHeight, getHeight(), null); + g.drawImage(UIConstants.DRAG_BAR_LIGHT, 0, 0, toolPaneHeight, getHeight(), null); if (containerWidth == toolPaneHeight) { if (model == UIConstants.MODEL_NORMAL) { button = UIConstants.DRAG_RIGHT_NORMAL; @@ -504,7 +504,7 @@ public class UIResizableContainer extends JPanel { } g.drawImage(button, 3, ARROW_MARGIN_VERTICAL, 5, toolPaneHeight, null); } else { - g.drawImage(UIConstants.DRAG_BAR, 0, 0, toolPaneHeight, getHeight(), null); + g.drawImage(UIConstants.DRAG_BAR_LIGHT, 0, 0, toolPaneHeight, getHeight(), null); if (containerWidth == toolPaneHeight) { if (model == UIConstants.MODEL_NORMAL) { button = UIConstants.DRAG_LEFT_NORMAL; diff --git a/designer_base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java b/designer_base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java index 8cfde735d..7aa9dd2c4 100644 --- a/designer_base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java +++ b/designer_base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java @@ -1,7 +1,6 @@ package com.fr.design.gui.itree.filetree; -import java.awt.Component; -import java.awt.Dimension; +import java.awt.*; import java.io.File; import java.util.ArrayList; import java.util.Arrays; @@ -107,7 +106,7 @@ public class EnvFileTree extends RefreshableJTree { dim.height += 2; this.setPreferredSize(dim); this.setBackgroundNonSelectionColor(UIConstants.TREE_BACKGROUND); - this.setForeground(UIConstants.FONT_COLOR); + this.setTextSelectionColor(Color.WHITE); this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE); return this; } diff --git a/designer_base/src/com/fr/design/images/control/dotv.png b/designer_base/src/com/fr/design/images/control/dotv.png index a9a1b9048cc21c664b1769772de7cced66e188d4..a806ba2eaacf741188e334326949e8058c42b9a7 100644 GIT binary patch delta 70 zcmdlemNG%bfw4Hq-HBn{IhmIX3=DFfE{-7_vdIYwoI26l-q?FE_oN+KHe0Oe#+!qB aYz&KLvc669OKJqFWbkzLb6Mw<&;$TD;uq@x delta 2857 zcmV+^3)b{xu@;ade+h6%S#tmY3ljhU3ljkVnw%H_018cMLqkwdXm50Hb7*gHAW1_* zAaHVTW@&6?004N}ol|#MllK-r-}hw?RzleDv6pOt03su-2*?mwq7ae*VT2G8K*fcK z3RV;q5u8X>#DdidNS%n{peVR!L5hf4i&b1W?jPKzwS9W;f9>u2*ZaKZoag+`dCw1k z5fUbm=AvoAR{$W90N^4L=L-RlQUJ&HumpsYY5E(E}?0f1Sy zGDiY{y#)Yvj#!WnKwtoXnL;eg03bL507D)V%>y7z1E4U{zu>7~aD})?0RX_umCct+ z(lZpemCzb@^6=o|A>zVpu|i=NDG+7}=onn6low3K2mk;?f1rUXut5h5!4#~(4xGUqyucR%VFpA% z3?#rj5JCpzfE)^;7?wd9RKPme1hudO8lVxH;SjXJF*pt9;1XPc>u?taU>Kgl7`%oF z1VP9M6Ja4bh!J9r*dopd7nzO(B4J20l7OTj>4+3jBE`sZqynizYLQ(?Bl0bB6giDt ze?a<>+sGg?iu{VaM=_LvvQY!n0(C&Ss2>`N#-MZ2bTkiLfR>_b(HgWKJ%F~Nr_oF3 zb#wrIijHG|(J>BYjM-sajE6;FiC7vY#};GdST$CUHDeuEH+B^pz@B062qXfFfD`Np zUW5?BY=V%GM_5c)L#QR}BeW8_2v-S%e}pl@CnA%mPqZa^68XeKabh-)MgC0ef(3jF{=m+WN>4Wrl3=M`2 zgU3i>C>d)Rdl{z~w;3;)Or{0Xmzl^^FxN60nP->}m~T~BD)uUT6_Lskl{%GHm421y zs#H~TRX^2vstZ)BRS&CPR(+;Me^s+kfR^vEcAI*_=wwAhIR? z(H}Q3Gzd138Ei2)WAMz7W9Vy`X}HnwgyE!jf{!>Pon!|7LN8)u<&o%1yprc02^5|?(D7gKGgil=U$ddrpN8t%H% zwbS*Zo4cFbt=VnV-ON43eXILTE}I+4UBf-^LGTx1&sx}1}_Xg6+#RN4Ot&@ zlW)Km@*DYMGu&q^n$Z=?2%QyL8~QNJCQKgI5srq>2;UHXe{ZJwOzF(F2#DZEY>2oY zX&IRp`F#{ADl)1r>QS^)ba8a|EY_^#S^HjiOPpx423?lIEROmG(H@JAFg? zXogQlb;dIZPf{y+kr|S?BlAsGMAqJ{&)IR=Ejg5&l$@hd4QZCNE7vf$D7Q~$D=U)? zNn}(WA6du22pZOfRS_e|TFMTX?ugy+~TrGv8+Z>iHuJ zf);$ekg!m=u(Q~>cv!j;$toK>JuS&gYLDkTP@C~gS@r~shUu{a>bfJ1`^^VQ7 z&C1OKHDNXFTgC{M|V%fo{xK_e|rb^MeplsbZ>0jufM;t32jm~jUGrk zaOInTZ`zyfns>EuS}G30LFK_G-==(f<51|K&cocp&EJ`SxAh3?NO>#LI=^+SEu(Fq zJ)ynt=!~PC9bO$rzPJB=?=jR&z?UQbnZ;IU-!xL-sg{9@Vs#JBKKn3CAUkhJ+3`ResKNaNUvLO>t*-L z?N>ambo5Q@JJIjcfBI^`)pOVQ*DhV3dA;w(>>IakCfyvkCA#(acJ}QTcM9%I++BK) zc(44v+WqPW`VZ=VwEnSWz-{38V8CF{f5TZ1?+yuvp8k~o(}&^GN6bgnBSs^QkDVVM z8x0!0@?_4F;is~v6VJ+iR{weHbF1gy{o?ye&shA}@C*5i&%dsDsq=F0tEsO#$0Nrd zyv}(&@uvK(&f9(OxbM2($Gsn!DEvVFQ1j9HW5=h^Pxn6OeE$3|_k{ENCDNZWe*gdg zAY({UO#lFTB>(_`g8%^e{{R4h=>PzAFaQARU;qF*m;eA5Z<1fdMgRZ+UP(kjRCwB~ zj4=&>Fcbw3aDsuRshRumE(Dc++2EX5%B~oD<-sBb4cmKRhM5nSGy<7JzdALBuWL1gI8C00000NkvXX Hu0mjf*vEI> From 8602863faf0caa6d0c3f1e35a1e3acdcb444f067 Mon Sep 17 00:00:00 2001 From: hzzz Date: Tue, 10 Oct 2017 17:23:42 +0800 Subject: [PATCH 30/35] =?UTF-8?q?=E5=9B=BE=E6=A0=87=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/.DS_Store | Bin 0 -> 6148 bytes .../src/com/fr/design/images/.DS_Store | Bin 0 -> 8196 bytes .../src/com/fr/design/images/control/.DS_Store | Bin 0 -> 10244 bytes .../com/fr/design/images/control/bar-light.png | Bin 0 -> 106 bytes .../com/fr/design/images/control/dot-line.png | Bin 0 -> 106 bytes .../com/fr/design/images/control/down_arrow.png | Bin 0 -> 218 bytes .../com/fr/design/images/control/east_arrow.png | Bin 0 -> 241 bytes .../com/fr/design/images/control/up_arrow.png | Bin 0 -> 190 bytes .../com/fr/design/images/control/west_arrow.png | Bin 0 -> 242 bytes 9 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 designer_base/src/com/fr/design/.DS_Store create mode 100644 designer_base/src/com/fr/design/images/.DS_Store create mode 100644 designer_base/src/com/fr/design/images/control/.DS_Store create mode 100644 designer_base/src/com/fr/design/images/control/bar-light.png create mode 100644 designer_base/src/com/fr/design/images/control/dot-line.png create mode 100644 designer_base/src/com/fr/design/images/control/down_arrow.png create mode 100644 designer_base/src/com/fr/design/images/control/east_arrow.png create mode 100644 designer_base/src/com/fr/design/images/control/up_arrow.png create mode 100644 designer_base/src/com/fr/design/images/control/west_arrow.png diff --git a/designer_base/src/com/fr/design/.DS_Store b/designer_base/src/com/fr/design/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..3838ca5a172699ad8de11d98cef8ea09ecffeb9a GIT binary patch literal 6148 zcmeHKJC4FY47FJb5Dn#)bA`RZ2*C-s04tETK|$hIr{Y{3jpvULQL@cSG^=OHels4w ziSmj#77<-sc3&cM5t+aZ3UH7Vo6ULp&Ru15uUirsn ze`tQ<=3y$cRDcRl0V+TRsK6f-u-*%s%mNvy02QDDPX+AzP~e6&u?_T32ZE0Pz%kNp zSods4KR{c};8sosPWIf&3XTU1(I`-3mMaRreLa literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/.DS_Store b/designer_base/src/com/fr/design/images/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..44e20257a909636796ce6fe737b51f9c8e2e94fd GIT binary patch literal 8196 zcmeHM%Wl&^6unalbqEiqG>{4w7FmEqkx~Q_ED#}-M**p!t{_z@shvy{3o{ehlLn|N zMSK7s09zg(z=k!Ce?V;b0Tygv&7B#il%!o2keG?)o|~Ebu+KQQ?*srysa>B0$N_+b zU80>vu}PEjvJbSOWMl-9pg#Zy1_9I*4w#z(!+>GHFkl!k3>XIf0S54yEt|E)b6?LI zX&5jJ{Fe;K`-6jBVllz4Ms@2zp-KS6VH{Qsb*uxFkCR|A!LCN-iZONdKoVDylo&+2 z~cs~D4U6HdV)p^(s+*Z5Dm2M`L_ewsoGA3T~cS2vQkw$x4L?=FyWjmtW7wpljlyMK3O<(c5N+XS>wm9%-(B1dHU@6 zixMbL*rDph;5&u*61@BJE@d(=Xkv0no! z*42now$O-z`poijOhsjbK3}!>$F+!uVVTE)2soR+8{<+;3;JN1EpyDcg3B<|l2h?* z8pVhMK9zYdiage!rALdQ=hJY8mADZ6fwYv-@I=ZHm623#x8>CW*2rJ@rYX%A%RS|| zR&2;?1z$mJGRHWhsZ_prBN?>d1YCsc;6f8R@D!fGD|ibZ;WK=NA7q#uBuB{!a+;hc z7sxd-O>U4fxkYBR_fT(HkMvS#Bnya}F6)XLv5>O{&P(5&xQo>U4ATSUZ2n+-U{zV4x&gK#|wGGF>Kwuy+ zFkyh_hXj>vyRc(zW$M5|mH@B~T$X}!tOEp-6t-R1v9JggTEAzsaW&2Ry)^H^ zhh=pEb@8VZoDsEv+r}@ayVL=mZ6<5~Y3!R4c7b|=UZRw4(FSeO$cX8D; zdkj-?)QM7@sPIlbtv~koZ+ZN`l>FzYj~?W-LjyOW_MwD0W*|DkUMel@qJ?cw8{JYH z^F|vU-s%@im>8Ixw!lX&^`1Lc{ap!nTyPo2hetZ4CHxl7*g;5IqraYC(|=fr4?mf{5cZOp>7N-(~L9+Oyzq= zlw~4f15v>=YfD8&rkl75u323cu4TkK;8{82Eo>92Wc82eGS2#LPFQ0Wst*4y_3XDk zE5h=c#}0p1od>K13o|?UDlqlNW*u0*vG^W1qo~ioJvDfq6I{hy$;z=JX+*_XvT7WN zicw_6ScnL-70->HS%Vd0`M2Od_`^B%Jg~0}1{Q|zuYd3D^?p#Yo;^E7$%8%j$k#sM zz4p*RLL8w41_A?tfxy6_VW6&in(+Sr7614DL&HbtXkg$lGN2l(H&$2B^I~s(iUZzj zPf%~7a$&!*wgSO{UHH0e$Kwxg$1fJwc#lyE?zi~_cC0PVQ2zSI0Pk*HSpS~GheLzUx-bMQa4;uZiyHyeGkCiCxvX2~M*@JHhTV$W) z%;E|G%P#T*`y{`|HCuZ`jas?fP|j=WB;M&NOaxlyYcm zFljiF@MhPpUCjoj22!gT6+Bl=4sX1n(7Yj&?c_sN2j?>m66+TQdY*D-U?}x+agbD+ RQU`P&gQu&X%Q~loCIE&}SR?=d literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/control/east_arrow.png b/designer_base/src/com/fr/design/images/control/east_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..918d75a9f910fdabb1e3f79faac235803684e51a GIT binary patch literal 241 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|R(rZQhFAzD zCrHd&uyUp6_Js=%_DI|}Obq_={=U7R!aXLF6LPa{Hc1#8u^+Q5cyJ&%J^gub{l7nv zyoTd0x1ULBNs1z{BnPPeK_;WW`*escQa&5EYLo5{CGBl zhCpNE&aT#0RS^m8qa90 literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/control/west_arrow.png b/designer_base/src/com/fr/design/images/control/west_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..5693190f9646d3cf5fca20ff24bf9d114e07c833 GIT binary patch literal 242 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|)_A%&hFAzD zCrC&xSh(=unw2X(#b@Ww+`y^S&1h=<=lAz~Zh>N@?!z}Kco}YG@n6}|)!M2ml5s(E zhFZ!j!I{lx*fRfpette{!n0kwb~T?UI+3%6t>F((k(uIIh2{@cj5pO{a?)~y*!g5C zUcGr!!}Ww!U~m2Zf9*G}G#=R?#W0B>Q|Xw%9JT{Ig(W36f4{%Kf7Ria!iiLc!W0Js po(9IMhR)8D>>c}+vt`_J820A+P5iQ={VdSk44$rjF6*2UngD4wV8H+Y literal 0 HcmV?d00001 From a6aaeeebb7187791c0c5005fefaeea11484169cc Mon Sep 17 00:00:00 2001 From: hzzz Date: Tue, 10 Oct 2017 17:23:59 +0800 Subject: [PATCH 31/35] tmp --- designer_base/src/com/fr/design/.DS_Store | Bin 6148 -> 0 bytes .../src/com/fr/design/images/.DS_Store | Bin 8196 -> 0 bytes .../src/com/fr/design/images/control/.DS_Store | Bin 10244 -> 0 bytes 3 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 designer_base/src/com/fr/design/.DS_Store delete mode 100644 designer_base/src/com/fr/design/images/.DS_Store delete mode 100644 designer_base/src/com/fr/design/images/control/.DS_Store diff --git a/designer_base/src/com/fr/design/.DS_Store b/designer_base/src/com/fr/design/.DS_Store deleted file mode 100644 index 3838ca5a172699ad8de11d98cef8ea09ecffeb9a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKJC4FY47FJb5Dn#)bA`RZ2*C-s04tETK|$hIr{Y{3jpvULQL@cSG^=OHels4w ziSmj#77<-sc3&cM5t+aZ3UH7Vo6ULp&Ru15uUirsn ze`tQ<=3y$cRDcRl0V+TRsK6f-u-*%s%mNvy02QDDPX+AzP~e6&u?_T32ZE0Pz%kNp zSods4KR{c};8sosPWIf&3XTU1(I`-3mMaRreLa diff --git a/designer_base/src/com/fr/design/images/.DS_Store b/designer_base/src/com/fr/design/images/.DS_Store deleted file mode 100644 index 44e20257a909636796ce6fe737b51f9c8e2e94fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHM%Wl&^6unalbqEiqG>{4w7FmEqkx~Q_ED#}-M**p!t{_z@shvy{3o{ehlLn|N zMSK7s09zg(z=k!Ce?V;b0Tygv&7B#il%!o2keG?)o|~Ebu+KQQ?*srysa>B0$N_+b zU80>vu}PEjvJbSOWMl-9pg#Zy1_9I*4w#z(!+>GHFkl!k3>XIf0S54yEt|E)b6?LI zX&5jJ{Fe;K`-6jBVllz4Ms@2zp-KS6VH{Qsb*uxFkCR|A!LCN-iZONdKoVDylo&+2 z~cs~D4U6HdV)p^(s+*Z5Dm2M`L_ewsoGA3T~cS2vQkw$x4L?=FyWjmtW7wpljlyMK3O<(c5N+XS>wm9%-(B1dHU@6 zixMbL*rDph;5&u*61@BJE@d(=Xkv0no! z*42now$O-z`poijOhsjbK3}!>$F+!uVVTE)2soR+8{<+;3;JN1EpyDcg3B<|l2h?* z8pVhMK9zYdiage!rALdQ=hJY8mADZ6fwYv-@I=ZHm623#x8>CW*2rJ@rYX%A%RS|| zR&2;?1z$mJGRHWhsZ_prBN?>d1YCsc;6f8R@D!fGD|ibZ;WK=NA7q#uBuB{!a+;hc z7sxd-O>U4fxkYBR_fT(HkMvS#Bnya}F6)XLv5>O{&P(5&xQo>U4ATSUZ2n+-U{zV4x&gK#|wGGF>Kwuy+ zFkyh_hXj>vyRc(zW$M5|mH@B~T$X}!tOEp-6t-R1v9JggTEAzsaW&2Ry)^H^ zhh=pEb@8VZoDsEv+r}@ayVL=mZ6<5~Y3!R4c7b|=UZRw4(FSeO$cX8D; zdkj-?)QM7@sPIlbtv~koZ+ZN`l>FzYj~?W-LjyOW_MwD0W*|DkUMel@qJ?cw8{JYH z^F|vU-s%@im>8Ixw!lX&^`1Lc{ap!nTyPo2hetZ4CHxl7*g;5IqraYC(|=fr4?mf{5cZOp>7N-(~L9+Oyzq= zlw~4f15v>=YfD8&rkl75u323cu4TkK;8{82Eo>92Wc82eGS2#LPFQ0Wst*4y_3XDk zE5h=c#}0p1od>K13o|?UDlqlNW*u0*vG^W1qo~ioJvDfq6I{hy$;z=JX+*_XvT7WN zicw_6ScnL-70->HS%Vd0`M2Od_`^B%Jg~0}1{Q|zuYd3D^?p#Yo;^E7$%8%j$k#sM zz4p*RLL8w41_A?tfxy6_VW6&in(+Sr7614DL&HbtXkg$lGN2l(H&$2B^I~s(iUZzj zPf%~7a$&!*wgSO{UHH0e$Kwxg$1fJwc#lyE?zi~_cC0PVQ2zSI0Pk*HSpS Date: Tue, 10 Oct 2017 17:32:38 +0800 Subject: [PATCH 32/35] =?UTF-8?q?REPORT-4887=20@plough=EF=BC=9A9.0?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E4=BA=A4=E4=BA=92=E9=AA=8C=E6=94=B6?= =?UTF-8?q?=E9=97=AE=E9=A2=98=3D>=E8=A1=A8=E5=8D=95=3D=E3=80=8B=E5=A4=9A?= =?UTF-8?q?=E4=BD=99=E8=BE=B9=E6=A1=86=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/FormWidgetDetailPane.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java index 43c3cf4e0..83f2b057f 100644 --- a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -147,6 +147,7 @@ public class FormWidgetDetailPane extends FormDockView{ private void initReuWidgetPanel() { elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); downPane = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList, false)); + downPane.setBorder(null); reuWidgetPanel.add(downPane); } @@ -429,6 +430,7 @@ public class FormWidgetDetailPane extends FormDockView{ public void refreshDownPanel(boolean isEdit) { reuWidgetPanel.remove(downPane); downPane = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList, isEdit)); + downPane.setBorder(null); reuWidgetPanel.add(downPane); repaintContainer(); From 5f6ce89082adafdb085f6d831a68aa0ebc6748d1 Mon Sep 17 00:00:00 2001 From: hzzz Date: Tue, 10 Oct 2017 17:43:57 +0800 Subject: [PATCH 33/35] =?UTF-8?q?=E5=B1=9E=E6=80=A7=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E6=A0=8F=E7=82=B9=E5=87=BB=E5=8F=98=E8=89=B2=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/foldablepane/HeaderPane.java | 8 +++++++- .../design/foldablepane/UIExpandablePane.java | 17 ++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/foldablepane/HeaderPane.java b/designer_base/src/com/fr/design/foldablepane/HeaderPane.java index 8e99896bc..31cc29032 100644 --- a/designer_base/src/com/fr/design/foldablepane/HeaderPane.java +++ b/designer_base/src/com/fr/design/foldablepane/HeaderPane.java @@ -22,10 +22,15 @@ public class HeaderPane extends JPanel { private int headHeight; private Color bgColor; private boolean isShow; + private boolean isPressed = false; private String title; private Image image; private int fontSize; + public void setPressed(boolean pressed) { + this.isPressed = pressed; + } + public void setShow(boolean isShow) { this.isShow = isShow; } @@ -60,7 +65,8 @@ public class HeaderPane extends JPanel { private BufferedImage createPanelImage() { BufferedImage panelImage = new BufferedImage(getWidth(), headHeight, BufferedImage.TYPE_INT_ARGB); Graphics2D g2d = panelImage.createGraphics(); - g2d.setColor(UIConstants.COMPONENT_BACKGROUND_COLOR); + + g2d.setColor(isPressed ? UIConstants.POPUP_TITLE_BACKGROUND : UIConstants.COMPONENT_BACKGROUND_COLOR); headWidth = this.getWidth(); g2d.fillRect(0, 0, headWidth, headHeight); g2d.setFont(new Font("SimSun", 0, fontSize)); diff --git a/designer_base/src/com/fr/design/foldablepane/UIExpandablePane.java b/designer_base/src/com/fr/design/foldablepane/UIExpandablePane.java index 924415aea..9ed2d9757 100644 --- a/designer_base/src/com/fr/design/foldablepane/UIExpandablePane.java +++ b/designer_base/src/com/fr/design/foldablepane/UIExpandablePane.java @@ -58,7 +58,8 @@ public class UIExpandablePane extends JPanel { } class PanelAction extends MouseAdapter { - public void mousePressed(MouseEvent e) { + @Override + public void mouseClicked(MouseEvent e) { HeaderPane hp = (HeaderPane) e.getSource(); if (contentPanel.isShowing()) { contentPanel.setVisible(false); @@ -67,9 +68,23 @@ public class UIExpandablePane extends JPanel { contentPanel.setVisible(true); hp.setShow(true); } + hp.setPressed(false); hp.getParent().validate(); hp.getParent().repaint(); } + + public void mousePressed(MouseEvent e) { + HeaderPane hp = (HeaderPane) e.getSource(); + hp.setPressed(true); + hp.getParent().repaint(); + } + + @Override + public void mouseExited(MouseEvent e) { + HeaderPane hp = (HeaderPane) e.getSource(); + hp.setPressed(false); + hp.getParent().repaint(); + } } From a71f01976c475a4a39323f76ce24ec4448f87fc9 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Wed, 11 Oct 2017 09:49:24 +0800 Subject: [PATCH 34/35] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/cell/style/AlignmentAction.java | 4 +- .../cell/style/ReportFontBoldAction.java | 4 +- .../cell/style/ReportFontItalicAction.java | 4 +- .../cell/style/ReportFontUnderlineAction.java | 4 +- .../design/editor/ValueEditorPaneFactory.java | 79 ++++++++++--------- 5 files changed, 48 insertions(+), 47 deletions(-) diff --git a/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java b/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java index b7857fb7e..acc9b6302 100644 --- a/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java +++ b/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java @@ -21,7 +21,7 @@ import javax.swing.*; public class AlignmentAction extends ButtonGroupAction implements StyleActionInterface { - private static final Icon[][] icons = new Icon[][]{ + private static final Icon[][] ICONS = new Icon[][]{ {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal_white.png")}, {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal_white.png")}, {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal_white.png")}}; @@ -30,7 +30,7 @@ public class AlignmentAction extends ButtonGroupAction implements StyleActionInt private static final Integer[] valueArray = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT}; public AlignmentAction(ElementCasePane t) { - super(t, icons, valueArray); + super(t, ICONS, valueArray); } diff --git a/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java b/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java index 0c1af52b0..7b62ffb51 100644 --- a/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java +++ b/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java @@ -21,13 +21,13 @@ import javax.swing.*; public class ReportFontBoldAction extends AbstractStyleAction implements ToggleButtonUpdateAction { private UIToggleButton button; protected Style style; - private final static Icon[] icons = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold_white.png")}; + private final static Icon[] ICONS = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold_white.png")}; public ReportFontBoldAction(ElementCasePane t) { super(t); this.setName(Inter.getLocText("FRFont-bold")); - this.setSmallIcon(icons, true); + this.setSmallIcon(ICONS, true); } /** diff --git a/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java b/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java index 9f9f21885..66e2d97cf 100644 --- a/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java +++ b/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java @@ -17,13 +17,13 @@ import javax.swing.*; */ public class ReportFontItalicAction extends ReportFontBoldAction { - private final static Icon[] icons = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic_white.png")}; + private final static Icon[] ICONS = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic_white.png")}; public ReportFontItalicAction(ElementCasePane t) { super(t); this.setName(Inter.getLocText("FRFont-italic")); - this.setSmallIcon(icons, true); + this.setSmallIcon(ICONS, true); } diff --git a/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java b/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java index dc4fbe788..b44d696ce 100644 --- a/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java +++ b/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java @@ -18,13 +18,13 @@ import javax.swing.*; */ public class ReportFontUnderlineAction extends ReportFontBoldAction { - private final static Icon[] icons = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline_white.png")}; + private final static Icon[] ICONS = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline_white.png")}; public ReportFontUnderlineAction(ElementCasePane t) { super(t); this.setName(Inter.getLocText("FRFont-Underline")); - this.setSmallIcon(icons, true); + this.setSmallIcon(ICONS, true); } protected void setSelectedFont (Style style) { diff --git a/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java b/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java index ebf712cc8..4000176bb 100644 --- a/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java +++ b/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java @@ -210,7 +210,7 @@ public class ValueEditorPaneFactory { new TextEditor(), new SpinnerIntegerEditor(), new DoubleEditor(), - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new BooleanEditor(), formulaEditor }; @@ -227,7 +227,7 @@ public class ValueEditorPaneFactory { new TextEditor(), new IntegerEditor(), new DoubleEditor(), - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new BooleanEditor(), formulaEditor, new WidgetNameEditor(Inter.getLocText("Widget")) @@ -245,11 +245,11 @@ public class ValueEditorPaneFactory { new TextEditor(), new IntegerEditor(), new DoubleEditor(), - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new BooleanEditor(), formulaEditor, new ParameterEditor(), - new ColumnRowEditor(Inter.getLocText("Cell")) + new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")) }; } @@ -264,11 +264,11 @@ public class ValueEditorPaneFactory { new TextEditor(), new IntegerEditor(), new DoubleEditor(), - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new BooleanEditor(), formulaEditor, new ParameterEditor(), - new ColumnRowEditor(Inter.getLocText("Cell")), + new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")), new ColumnRowGroupEditor(Inter.getLocText("FR-Designer-Cell_Group")) }; } @@ -280,7 +280,7 @@ public class ValueEditorPaneFactory { */ public static Editor[] cellGroupEditor() { return new Editor[]{ - new ColumnRowEditor(Inter.getLocText("Cell")), + new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")), new ColumnRowGroupEditor(Inter.getLocText("FR-Designer-Cell_Group")) }; } @@ -309,7 +309,7 @@ public class ValueEditorPaneFactory { public static Editor[] dateEditors(String popupName, String textEditorValue) { return new Editor[]{ new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? Inter.getLocText("None") : popupName), - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")) }; } @@ -326,11 +326,11 @@ public class ValueEditorPaneFactory { new TextEditor(), new IntegerEditor(), new DoubleEditor(), - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new BooleanEditor(), formulaEditor, new ParameterEditor(), - new ColumnRowEditor(Inter.getLocText("Cell")), + new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")), new ColumnSelectedEditor(), //23328 allEditors中删除控件选项 // new WidgetNameEditor(Inter.getLocText("Widget")) @@ -347,7 +347,7 @@ public class ValueEditorPaneFactory { new TextEditor(), new IntegerEditor(), new DoubleEditor(), - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new BooleanEditor(), }; } @@ -363,7 +363,7 @@ public class ValueEditorPaneFactory { new TextEditor(), new IntegerEditor(), new DoubleEditor(), - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new BooleanEditor(), formulaEditor, new ParameterEditor(), @@ -393,7 +393,7 @@ public class ValueEditorPaneFactory { public static Editor[] dateEditors() { FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); return new Editor[]{ - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), formulaEditor, new ParameterEditor(), }; @@ -412,7 +412,7 @@ public class ValueEditorPaneFactory { new TextEditor(), new IntegerEditor(), new DoubleEditor(), - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new BooleanEditor(), formulaEditor }; @@ -430,7 +430,7 @@ public class ValueEditorPaneFactory { list.add(new TextEditor()); list.add(new IntegerEditor()); list.add(new DoubleEditor()); - list.add(new DateEditor(true, Inter.getLocText("Date"))); + list.add(new DateEditor(true, Inter.getLocText("FR-Designer_Date"))); list.add(new BooleanEditor()); FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); @@ -447,30 +447,31 @@ public class ValueEditorPaneFactory { * @return 值编辑器 */ private static List createEditors4Chart(int paraUseType) { - if (paraUseType == ParameterTableModel.CHART_PIE_USE) { - return getPieEditor(); - } else if (paraUseType == ParameterTableModel.CHART_MAP_USE) { - return getMapEditor(); - } else if (paraUseType == ParameterTableModel.CHART_GIS_USE) { - return getGisEditor(); - } else if (paraUseType == ParameterTableModel.CHART__XY_USE) { - return getXYEditor(); - } else if (paraUseType == ParameterTableModel.CHART_BUBBLE_USE) { - return getBubbbleEdtor(); - } else if (paraUseType == ParameterTableModel.CHART_NO_USE) { - return getChartNoUseEditor(); - } else if (paraUseType == ParameterTableModel.CHART_METER_USE) { - return getMeterEditor(); - } else if (paraUseType == ParameterTableModel.CHART_STOCK_USE) { - return getStockEditor(); - } else if (paraUseType == ParameterTableModel.CHART_GANTT_USE) { - return getGanttEditor(); - } else if (paraUseType == ParameterTableModel.FORM_ELEMENTCASE_USE) { - return getFormElementCaseEditor(); - } else if (paraUseType == ParameterTableModel.FORM_CHART_USE) { - return getFormChartEditor(); - } else { - return getChartEditor(); + switch (paraUseType) { + case ParameterTableModel.CHART_PIE_USE: + return getPieEditor(); + case ParameterTableModel.CHART_MAP_USE: + return getMapEditor(); + case ParameterTableModel.CHART_GIS_USE: + return getGisEditor(); + case ParameterTableModel.CHART__XY_USE: + return getXYEditor(); + case ParameterTableModel.CHART_BUBBLE_USE: + return getBubbbleEdtor(); + case ParameterTableModel.CHART_NO_USE: + return getChartNoUseEditor(); + case ParameterTableModel.CHART_METER_USE: + return getMeterEditor(); + case ParameterTableModel.CHART_STOCK_USE: + return getStockEditor(); + case ParameterTableModel.CHART_GANTT_USE: + return getGanttEditor(); + case ParameterTableModel.FORM_ELEMENTCASE_USE: + return getFormElementCaseEditor(); + case ParameterTableModel.FORM_CHART_USE: + return getFormChartEditor(); + default: + return getChartEditor(); } } From 5e7f9afa0021272231d6e3b2de8809e9fc2d964e Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 11 Oct 2017 10:08:29 +0800 Subject: [PATCH 35/35] =?UTF-8?q?REPORT-4985=20=E6=96=87=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8-=E5=88=87=E6=8D=A2=E5=B7=A5=E4=BD=9C=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=20=E4=B8=AD=E5=87=BA=E7=8E=B0=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E2=80=9C=E9=BB=98=E8=AE=A4=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/DesignerEnvManager.java | 27 +++++++++++++------ .../src/com/fr/start/BaseDesigner.java | 3 ++- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/designer_base/src/com/fr/design/DesignerEnvManager.java b/designer_base/src/com/fr/design/DesignerEnvManager.java index 568deb96d..0e7612214 100644 --- a/designer_base/src/com/fr/design/DesignerEnvManager.java +++ b/designer_base/src/com/fr/design/DesignerEnvManager.java @@ -153,6 +153,10 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { * DesignerEnvManager. */ public static DesignerEnvManager getEnvManager() { + return getEnvManager(true); + } + + public static DesignerEnvManager getEnvManager(boolean needCheckEnv) { if (designerEnvManager == null) { designerEnvManager = new DesignerEnvManager(); try { @@ -162,14 +166,8 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } // james:如果没有env定义,要设置一个默认的 - if (designerEnvManager.nameEnvMap.size() <= 0) { - String installHome = StableUtils.getInstallHome(); - if (installHome != null) { - String name = Inter.getLocText("FR-Engine_DEFAULT"); - String envPath = StableUtils.pathJoin(new String[]{installHome, ProjectConstants.WEBAPP_NAME, ProjectConstants.WEBINF_NAME}); - designerEnvManager.putEnv(name, LocalEnv.createEnv(envPath)); - designerEnvManager.setCurEnvName(name); - } + if (needCheckEnv) { + checkNameEnvMap(); } GeneralContext.addEnvChangedListener(new EnvChangedListener() { @@ -187,6 +185,19 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { return designerEnvManager; } + public static void checkNameEnvMap() { + if (designerEnvManager == null || designerEnvManager.nameEnvMap.size() > 0) { + return; + } + String installHome = StableUtils.getInstallHome(); + if (installHome != null) { + String name = Inter.getLocText("FR-Engine_DEFAULT"); + String envPath = StableUtils.pathJoin(new String[]{installHome, ProjectConstants.WEBAPP_NAME, ProjectConstants.WEBINF_NAME}); + designerEnvManager.putEnv(name, LocalEnv.createEnv(envPath)); + designerEnvManager.setCurEnvName(name); + } + } + /** * 添加设计器中相关的worker * diff --git a/designer_base/src/com/fr/start/BaseDesigner.java b/designer_base/src/com/fr/start/BaseDesigner.java index 3f24b645a..2b8aacd62 100644 --- a/designer_base/src/com/fr/start/BaseDesigner.java +++ b/designer_base/src/com/fr/start/BaseDesigner.java @@ -171,7 +171,8 @@ public abstract class BaseDesigner extends ToolBarMenuDock { protected void initLanguage() { //这两句的位置不能随便调换,因为会影响语言切换的问题 - FRContext.setLanguage(DesignerEnvManager.getEnvManager().getLanguage()); + FRContext.setLanguage(DesignerEnvManager.getEnvManager(false).getLanguage()); + DesignerEnvManager.checkNameEnvMap(); } protected void initDefaultFont() {