From 19fc0f2b912812b3f352abe533ce2300ed18f554 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Thu, 14 Sep 2017 09:16:23 +0800 Subject: [PATCH 01/11] fix --- designer_base/src/com/fr/start/BaseDesigner.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/start/BaseDesigner.java b/designer_base/src/com/fr/start/BaseDesigner.java index bda412b852..43a3377ccc 100644 --- a/designer_base/src/com/fr/start/BaseDesigner.java +++ b/designer_base/src/com/fr/start/BaseDesigner.java @@ -64,7 +64,9 @@ public abstract class BaseDesigner extends ToolBarMenuDock { setDebugEnv(); } RestartHelper.deleteRecordFilesWhenStart(); - + //初始化插件引擎 + PluginStartup.start(); + SiteCenter.getInstance(); DesignUtils.setPort(getStartPort()); @@ -95,8 +97,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock { DesignUtils.initLookAndFeel(); DesignUtils.creatListeningServer(getStartPort(), startFileSuffix()); - //初始化插件引擎 - PluginStartup.start(); + // 初始化Log Handler DesignerEnvManager.loadLogSetting(); DesignerFrame df = createDesignerFrame(); From 40e05c554075b2cf5f0ed739c0191ed6b7671892 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Thu, 14 Sep 2017 09:51:20 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E8=A7=A3=E5=86=B39.0bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/gui/data/table/MeterPlotTableDataContentPane.java | 5 +---- .../mainframe/chart/gui/other/ChartInteractivePane.java | 2 +- .../plugin/chart/designer/other/VanChartInteractivePane.java | 2 +- .../chart/designer/style/tooltip/VanChartTooltipPane.java | 4 ++-- .../desinger/data/StructurePlotTableDataContentPane.java | 2 +- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java index 4bf7e3168b..b8cb14bed5 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java @@ -37,12 +37,9 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane valueBox = new UIComboBox(); filterPane = new ChartDataFilterPane(new MeterPlot(), parent); - nameBox.setPreferredSize(new Dimension(100, 20)); - valueBox.setPreferredSize(new Dimension(100, 20)); - double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = { p,f}; + double[] columnSize = {f, COMPONENT_WIDTH}; double[] rowSize = {p, p}; Component[][] components = createComponents(); 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 a56468c739..e7ffd5c3cc 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 @@ -216,7 +216,7 @@ public class ChartInteractivePane extends BasicScrollPane implements UIOb @Override public void mouseClicked(MouseEvent e) { if (valueFormatPane == null) { - valueFormatPane = new FormatPane(); + valueFormatPane = new FormatPaneWithOutFont(); } Point comPoint = dataPointValueFormat.getLocationOnScreen(); Point arrowPoint = new Point(comPoint.x - DET, comPoint.y + dataPointValueFormat.getHeight()); diff --git a/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java b/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java index 5fb6d29c0f..41cd7aa025 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java @@ -111,7 +111,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane { return null; } zoomWidget = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")}); - zoomResize = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")}); + zoomResize = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Change"), Inter.getLocText("Plugin-ChartF_Non_Adjustment")}); from = new TinyFormulaPane(); to = new TinyFormulaPane(); zoomType = new UIButtonGroup(getNameArray(), getValueArray()); diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartTooltipPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartTooltipPane.java index f332efbb47..b92377f8a7 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartTooltipPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartTooltipPane.java @@ -58,12 +58,12 @@ public class VanChartTooltipPane extends AbstractVanChartScrollPane { if(chart == null) { return; } - ConditionAttr attrList = chart.getPlot().getConditionCollection().getDefaultAttr(); + AttrTooltip attrTooltip = tooltipPane.update(); DataSeriesCondition attr = ((VanChartPlot)chart.getPlot()).getAttrTooltipFromConditionCollection(); + ConditionAttr attrList = chart.getPlot().getConditionCollection().getDefaultAttr(); if(attr != null) { attrList.remove(attr); } - AttrTooltip attrTooltip = tooltipPane.update(); if (attrTooltip != null) { attrList.addDataSeriesCondition(attrTooltip); } diff --git a/designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotTableDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotTableDataContentPane.java index 26ad1dbae0..5611f72844 100644 --- a/designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotTableDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotTableDataContentPane.java @@ -31,7 +31,7 @@ public class StructurePlotTableDataContentPane extends AbstractTableDataContentP public StructurePlotTableDataContentPane() { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = {p, f}; + double[] columnSize = {f, COMPONENT_WIDTH}; double[] rowSize = {p, p, p, p, p, p}; nodeName = new UIComboBox(); From f5f57da3254b946f5aba28ffdcf6aeb4f6f4acfb Mon Sep 17 00:00:00 2001 From: momeak Date: Thu, 14 Sep 2017 11:04:37 +0800 Subject: [PATCH 03/11] =?UTF-8?q?REPORT-4047=20[9.0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E5=8D=95=E4=B8=AA=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E8=AE=BE=E7=BD=AE=E8=BE=B9=E6=A1=86=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E5=86=8D=E5=AF=B9=E5=8C=85=E5=90=AB=E6=AD=A4=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E7=9A=84=E4=B8=80=E7=89=87=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E8=83=8C=E6=99=AF=EF=BC=8C=E8=BE=B9=E6=A1=86?= =?UTF-8?q?=E6=B6=88=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/gui/style/BackgroundPane.java | 5 ++++ .../com/fr/design/gui/style/BorderPane.java | 23 +++++++++++++++---- .../ColorBackgroundQuickPane.java | 7 ++++++ 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/style/BackgroundPane.java b/designer_base/src/com/fr/design/gui/style/BackgroundPane.java index ced48d50d3..a1841a9544 100644 --- a/designer_base/src/com/fr/design/gui/style/BackgroundPane.java +++ b/designer_base/src/com/fr/design/gui/style/BackgroundPane.java @@ -33,6 +33,10 @@ public class BackgroundPane extends AbstractBasicStylePane { protected BackgroundQuickPane[] paneList; + //获取当前面板 + protected JPanel currentPane = null; + + public BackgroundPane() { this.initComponents(); } @@ -141,6 +145,7 @@ public class BackgroundPane extends AbstractBasicStylePane { if (pane.accept(background)) { pane.populateBean(background); typeComboBox.setSelectedIndex(i); + currentPane = paneList[i]; return; } } diff --git a/designer_base/src/com/fr/design/gui/style/BorderPane.java b/designer_base/src/com/fr/design/gui/style/BorderPane.java index 861df6aaa0..d5a3bd9146 100644 --- a/designer_base/src/com/fr/design/gui/style/BorderPane.java +++ b/designer_base/src/com/fr/design/gui/style/BorderPane.java @@ -16,6 +16,7 @@ import com.fr.design.gui.icombobox.LineComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.backgroundpane.ColorBackgroundQuickPane; import com.fr.design.style.color.NewColorSelectBox; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; @@ -202,12 +203,24 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse CellBorderStyle cellBorderStyle = this.update(); HashSet borderSet = new HashSet(Arrays.asList(BORDERARRAY)); - if (borderSet.contains(globalNameListener.getGlobalName())) { - style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(), - cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor()); - } else { - style = style.deriveBackground(backgroundPane.update()); + if (backgroundPane.currentPane != backgroundPane.paneList[1]){ + if (borderSet.contains(globalNameListener.getGlobalName())) { + style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(), + cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor()); + style = style.deriveBackground(backgroundPane.update()); + } else { + style = style.deriveBackground(backgroundPane.update()); + } + }else { + if (borderSet.contains(globalNameListener.getGlobalName()) && !((ColorBackgroundQuickPane) backgroundPane.currentPane).isBackGroundColor()){ + style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(), + cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor()); + style = style.deriveBackground(backgroundPane.update()); + } else { + style = style.deriveBackground(backgroundPane.update()); + } } + return style; } diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java index f08b0a89b2..7839d0cdb1 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java @@ -18,6 +18,7 @@ import java.awt.*; public class ColorBackgroundQuickPane extends BackgroundQuickPane { private NewColorSelectPane detailColorSelectPane; + private boolean isBackGroundColor; public ColorBackgroundQuickPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); @@ -28,6 +29,7 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane { public void populateBean(Background background) { ColorBackground colorBackgroud = (ColorBackground) background; + isBackGroundColor = false; this.detailColorSelectPane.setColor(colorBackgroud.getColor()); } @@ -36,6 +38,10 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane { return ColorBackground.getInstance(this.detailColorSelectPane.getNotNoneColor()); } + public boolean isBackGroundColor(){ + return isBackGroundColor; + } + /** * 给组件登记一个观察者监听事件 * @@ -45,6 +51,7 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane { detailColorSelectPane.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { listener.doChange(); + isBackGroundColor = true; } }); } From 1c734862c466ac28bdfaf14a601a9497a3dd6637 Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 14 Sep 2017 11:40:11 +0800 Subject: [PATCH 04/11] =?UTF-8?q?REPORT-4192=20=E5=88=87=E6=8D=A2tab?= =?UTF-8?q?=E5=90=8E=E9=87=8D=E5=91=BD=E5=90=8Dactio=E4=B9=9F=E8=A6=81?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E5=88=9D=E5=A7=8B=E5=8C=96=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/FormHierarchyTreePane.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormHierarchyTreePane.java b/designer_form/src/com/fr/design/mainframe/FormHierarchyTreePane.java index d1ec34f393..3d7a3ec50f 100644 --- a/designer_form/src/com/fr/design/mainframe/FormHierarchyTreePane.java +++ b/designer_form/src/com/fr/design/mainframe/FormHierarchyTreePane.java @@ -92,6 +92,7 @@ public class FormHierarchyTreePane extends FormDockView implements HierarchyTree public void refreshDockingView() { FormDesigner formDesigner = this.getEditingFormDesigner(); removeAll(); + changeVarNameAction = null; if(this.componentTree != null) { this.componentTree.removeAll(); } @@ -156,10 +157,10 @@ public class FormHierarchyTreePane extends FormDockView implements HierarchyTree protected ShortCut4JControlPane[] createShortcuts() { ArrayList shortCutList = new ArrayList<>(); FormDesigner designer = getEditingFormDesigner(); - if (changeVarNameAction == null) { - changeVarNameAction = new ChangeNameAction(designer); - } - shortCutList.add(new WidgetEnableShortCut(changeVarNameAction)); + if (changeVarNameAction == null) { + changeVarNameAction = new ChangeNameAction(designer); + } + shortCutList.add(new WidgetEnableShortCut(changeVarNameAction)); for (Action action : designer.getActions()) { shortCutList.add(new WidgetEnableShortCut((UndoableAction)action)); } From fe6fadb25a3bf123ca679da67bf5e918c00e1dda Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 14 Sep 2017 14:38:20 +0800 Subject: [PATCH 05/11] =?UTF-8?q?REPORT-4580=20=E9=83=A8=E5=88=86=E8=A7=86?= =?UTF-8?q?=E8=A7=89=E9=AA=8C=E6=94=B6bug=3D>14(=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E9=AB=98=E5=BA=A6=E8=B0=83=E6=95=B4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/controlpane/UIControlPane.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 a521fbddfa..9a5bd6071a 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java @@ -37,6 +37,7 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH protected CardLayout cardLayout; protected JPanel cardPane; protected BasePlot plot; + private static final int TOP_TOOLBAR_HEIGHT = 24; public UIControlPane() { this.initComponentPane(); @@ -192,11 +193,10 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH topToolBar.setLayout(new BorderLayout()); ShortCut addItem = addItemShortCut().getShortCut(); addItem.intoJToolBar(topToolBar); - topToolBar.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 0)); double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = { p, f}; - double[] rowSize = {p}; + double[] rowSize = {TOP_TOOLBAR_HEIGHT}; Component[][] components = new Component[][]{ new Component[]{new UILabel(getAddItemText()), topToolBar}, }; From 183f13dc97726c2295825783781e6c76f72c10ea Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 14 Sep 2017 14:46:44 +0800 Subject: [PATCH 06/11] =?UTF-8?q?REPORT-4580=20=E9=83=A8=E5=88=86=E8=A7=86?= =?UTF-8?q?=E8=A7=89=E9=AA=8C=E6=94=B6bug=3D>6=EF=BC=8C=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E5=B0=8F=E7=AE=AD=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/icontainer/UIEastResizableContainer.java | 2 +- .../src/com/fr/design/gui/icontainer/UIResizableContainer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java index add452758b..0a996c6d78 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java @@ -308,7 +308,7 @@ public class UIEastResizableContainer extends JPanel { } } // g.drawImage(button, 2, ARROW_MARGIN_VERTICAL, 5, toolPaneHeight, null); - g.drawImage(button, 18, 9, 5, 5, null); + g.drawImage(button, 18, 7, 5, 10, null); } } 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 afb23ec702..5d35bf02e0 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -502,7 +502,7 @@ public class UIResizableContainer extends JPanel { button = UIConstants.DRAG_LEFT_PRESS; } } - g.drawImage(button, 3, ARROW_MARGIN_VERTICAL, 5, 5, null); + g.drawImage(button, 3, ARROW_MARGIN_VERTICAL, 5, toolPaneHeight, null); } else { g.drawImage(UIConstants.DRAG_BAR, 0, 0, toolPaneHeight, getHeight(), null); if (containerWidth == toolPaneHeight) { From 26b1cc1977b291fbe66543eb6cbacda4f99905bd Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 14 Sep 2017 15:03:55 +0800 Subject: [PATCH 07/11] =?UTF-8?q?REPORT-4580=20=E9=83=A8=E5=88=86=E8=A7=86?= =?UTF-8?q?=E8=A7=89=E9=AA=8C=E6=94=B6bug=3D>18=EF=BC=8C=E5=BC=B9=E5=87=BA?= =?UTF-8?q?=E6=A1=86=E6=82=AC=E5=81=9C=E8=83=8C=E6=99=AF=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/constants/UIConstants.java | 1 + .../src/com/fr/design/mainframe/EastRegionContainerPane.java | 1 + 2 files changed, 2 insertions(+) diff --git a/designer_base/src/com/fr/design/constants/UIConstants.java b/designer_base/src/com/fr/design/constants/UIConstants.java index 39ea2e6fb3..38979e3d29 100644 --- a/designer_base/src/com/fr/design/constants/UIConstants.java +++ b/designer_base/src/com/fr/design/constants/UIConstants.java @@ -110,6 +110,7 @@ public interface UIConstants { public static final Color TAB_BUTTON_HOVER_SELECTED = new Color(239, 238, 243); public static final Color TAB_BUTTON_PRESS = new Color(228, 227, 232); public static final Color TAB_BUTTON_PRESS_SELECTED = new Color(236, 236, 238); + public static final Color POPUP_TITLE_BACKGROUND = new Color(0xd8f2fd); diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index b87b19a5fc..2edfce1d60 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -852,6 +852,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); } else if (isMovable) { setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); + setBackground(UIConstants.POPUP_TITLE_BACKGROUND); } else { setCursor(Cursor.getDefaultCursor()); } From 19e798b709cd635f56b412ec824439065bb984fe Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 14 Sep 2017 15:24:43 +0800 Subject: [PATCH 08/11] =?UTF-8?q?REPORT-4581=20=E6=8A=A5=E8=A1=A8=E5=9D=97?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F-=E6=A0=87=E9=A2=98=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=B8=8D=E8=B5=B7=E4=BD=9C=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/creator/XBorderStyleWidgetCreator.java | 8 ++++++++ .../design/mainframe/widget/ui/FormWidgetCardPane.java | 10 +++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java b/designer_form/src/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java index e2b01a6460..7dd2a0bc04 100644 --- a/designer_form/src/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java +++ b/designer_form/src/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java @@ -148,5 +148,13 @@ public class XBorderStyleWidgetCreator extends XWidgetCreator{ public boolean supportSetVisibleOrEnable(){ return false; } + + /** + * data属性改变触发其他操作 + * + */ + public void firePropertyChange(){ + initStyle(); + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index 60f8cbe054..068c896dc9 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -152,8 +152,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { private void initDefinePane() { currentEditorDefinePane = null; - boolean dedicateLayout = xCreator.acceptType(XWScaleLayout.class) && xCreator.getComponentCount() > 0 && ((XCreator) xCreator.getComponent(0)).shouldScaleCreator() || xCreator.acceptType(XWTitleLayout.class); - XCreator creator = dedicateLayout ? (XCreator) xCreator.getComponent(0) : xCreator; + XCreator creator = getXCreatorDedicated(); FormWidgetDefinePaneFactoryBase.RN rn = FormWidgetDefinePaneFactoryBase.createWidgetDefinePane(creator, creator.toData(), new Operator() { @Override public void did(DataCreatorUI ui, String cardName) { @@ -168,6 +167,10 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { currentEditorDefinePane = definePane; } + private XCreator getXCreatorDedicated(){ + boolean dedicateLayout = xCreator.acceptType(XWScaleLayout.class) && xCreator.getComponentCount() > 0 && ((XCreator) xCreator.getComponent(0)).shouldScaleCreator() || xCreator.acceptType(XWTitleLayout.class); + return dedicateLayout ? (XCreator) xCreator.getComponent(0) : xCreator; + } @Override public String title4PopupWindow() { @@ -217,7 +220,8 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { } public void fireValueChanged() { - xCreator.firePropertyChange(); + XCreator creator = getXCreatorDedicated(); + creator.firePropertyChange(); designer.fireTargetModified(); designer.refreshDesignerUI(); } From e23afa15590bfc5d38fc4431539863c8ac820fe4 Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 14 Sep 2017 15:25:25 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8impor?= =?UTF-8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index 068c896dc9..fb75edbabb 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -8,7 +8,6 @@ import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.FormDesigner; import com.fr.design.widget.DataModify; import com.fr.design.widget.Operator; From 95967fc33b896ae55f82d6420779e12c1e1ebbf1 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Thu, 14 Sep 2017 16:11:52 +0800 Subject: [PATCH 10/11] =?UTF-8?q?REPORT-4553=20windows=E4=B8=8B=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E6=A1=86=E9=80=89=E6=8B=A9=E5=90=8E=E5=BC=B9=E5=87=BA?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E6=A1=86=E4=BD=86=E6=98=AF=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86=E4=B8=8D=E6=94=B6=E8=B5=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/quickeditor/CellQuickEditor.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer/src/com/fr/quickeditor/CellQuickEditor.java b/designer/src/com/fr/quickeditor/CellQuickEditor.java index a3cd546434..2b5ce14c7a 100644 --- a/designer/src/com/fr/quickeditor/CellQuickEditor.java +++ b/designer/src/com/fr/quickeditor/CellQuickEditor.java @@ -235,6 +235,8 @@ public abstract class CellQuickEditor extends QuickEditor { public void actionPerformed(ActionEvent e) { cellInsertActions = ActionFactory.createCellInsertAction(ElementCasePane.class, tc); selectedIndex = comboBox.getSelectedIndex(); + comboBox.setPopupVisible(false); + comboBox.repaint(); cellInsertActions[selectedIndex].actionPerformed(e); comboBox.setSelectedIndex(currentSelectedIndex); } From db4e94986a6c5974ad84beaadc2d5c862ab362f3 Mon Sep 17 00:00:00 2001 From: vito Date: Thu, 14 Sep 2017 17:21:00 +0800 Subject: [PATCH 11/11] REPORT-3262 splash --- .../src/com/fr/start/ReportSplashPane.java | 52 ++++---------- .../src/com/fr/design/gui/UILookAndFeel.java | 3 - .../src/com/fr/start/SplashPane.java | 72 +++++++++---------- .../src/com/fr/start/SplashWindow.java | 6 +- 4 files changed, 52 insertions(+), 81 deletions(-) diff --git a/designer/src/com/fr/start/ReportSplashPane.java b/designer/src/com/fr/start/ReportSplashPane.java index 211fb36e3a..a1e9b578b4 100644 --- a/designer/src/com/fr/start/ReportSplashPane.java +++ b/designer/src/com/fr/start/ReportSplashPane.java @@ -3,6 +3,7 @@ */ package com.fr.start; +import com.bulenkov.iconloader.IconLoader; import com.fr.base.BaseUtils; import com.fr.base.FRContext; import com.fr.base.GraphHelper; @@ -10,8 +11,6 @@ import com.fr.design.mainframe.bbs.BBSConstants; import com.fr.general.GeneralContext; import com.fr.general.Inter; import com.fr.general.ModuleContext; -import com.fr.stable.Constants; -import com.fr.stable.CoreGraphHelper; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; import com.fr.stable.module.ModuleAdapter; @@ -19,9 +18,6 @@ import com.fr.stable.module.ModuleListener; import javax.swing.*; import java.awt.*; -import java.awt.font.FontRenderContext; -import java.awt.font.LineMetrics; -import java.awt.image.BufferedImage; import java.util.Locale; import java.util.Random; import java.util.TimerTask; @@ -36,12 +32,12 @@ public class ReportSplashPane extends SplashPane { private static final String SPLASH_MAC_CN = "splash_chinese_mac.png"; private static final String SPLASH_MAC_EN = "splash_english_mac.png"; - private static final Color MODULE_COLOR = new Color(230, 230, 230); - private static final int MODULE_INFO_X = 25; - private static final int MODULE_INFO_Y = 270; + private static final Color MODULE_COLOR = new Color(255, 255, 255); + private static final int MODULE_INFO_X = 54; + private static final int MODULE_INFO_Y = 340; - private static final Color THANK_COLOR = new Color(72, 216, 249); - private static final int THANK_INFO_X = 460; + private static final Color THANK_COLOR = new Color(255, 255, 255, (int) (0.4 * 255 + 0.5)); + private static final int THANK_INFO_Y = 382; private static final String GUEST = getRandomUser(); @@ -80,52 +76,34 @@ public class ReportSplashPane extends SplashPane { } protected void paintComponent(Graphics g) { - super.paintComponent(g); - Graphics2D g2d = (Graphics2D) g; - Image image = getSplashImage(); - ImageIcon imageIcon = new ImageIcon(image); - GraphHelper.paintImage(g2d, imageIcon.getIconWidth(), imageIcon.getIconHeight(), image, Constants.IMAGE_DEFAULT, Constants.NULL, Constants.CENTER, -1, -1); + Icon icon = IconLoader.getIcon(StableUtils.pathJoin(OEM_PATH, getImageName())); + icon.paintIcon(null, g, 0, 0); + paintShowText((Graphics2D) g); } public void setShowText(String text) { this.showText = text; } - public BufferedImage getSplashImage() { - // p:初始化splashImage,其中画了字符. - Image image = createSplashBackground(); - BufferedImage splashBuffedImage = CoreGraphHelper.toBufferedImage(image); - - Graphics2D splashG2d = splashBuffedImage.createGraphics(); - splashG2d.setPaint(new Color(230, 230, 230)); - splashG2d.setFont(new Font("Dialog", Font.PLAIN, 11)); - - //绘制需要显示的文本 - paintShowText(splashG2d); - - return splashBuffedImage; + public Image getSplashImage() { + Icon icon = IconLoader.getIcon(StableUtils.pathJoin(OEM_PATH, getImageName())); + return ((ImageIcon) IconLoader.getIconSnapshot(icon)).getImage(); } private void paintShowText(Graphics2D splashG2d) { - FontRenderContext fontRenderContext = splashG2d.getFontRenderContext(); - LineMetrics fm = splashG2d.getFont().getLineMetrics("", - fontRenderContext); - double leading = fm.getLeading(); - double ascent = fm.getAscent(); - double height = fm.getHeight(); + GraphHelper.applyRenderingHints(splashG2d); splashG2d.setPaint(MODULE_COLOR); splashG2d.setFont(new Font("Dialog", Font.PLAIN, 12)); //加载模块信息 - double y = MODULE_INFO_Y + height + leading + ascent; - GraphHelper.drawString(splashG2d, showText, MODULE_INFO_X, y); + GraphHelper.drawString(splashG2d, showText, MODULE_INFO_X, MODULE_INFO_Y); //每次随机感谢一位论坛用户 if (shouldShowThanks()) { splashG2d.setPaint(THANK_COLOR); String content = Inter.getLocText("FR-Designer_Thanks-To") + GUEST; - GraphHelper.drawString(splashG2d, content, THANK_INFO_X, y); + GraphHelper.drawString(splashG2d, content, MODULE_INFO_X, THANK_INFO_Y); } } diff --git a/designer_base/src/com/fr/design/gui/UILookAndFeel.java b/designer_base/src/com/fr/design/gui/UILookAndFeel.java index d49cd94605..07f7acd8a0 100644 --- a/designer_base/src/com/fr/design/gui/UILookAndFeel.java +++ b/designer_base/src/com/fr/design/gui/UILookAndFeel.java @@ -1,6 +1,5 @@ package com.fr.design.gui; -import com.fr.base.BaseUtils; import com.fr.design.gui.borders.*; import com.fr.design.gui.frpane.UIBasicOptionPaneUI; import com.fr.design.gui.ibutton.UIBasicButtonUI; @@ -110,8 +109,6 @@ public class UILookAndFeel extends MetalLookAndFeel { table.put("RadioButtonMenuItem.border", border); table.put("ToolTip.border", new BorderUIResource(new UIToolTipBorder(true))); table.put("ToolTip.borderInactive", new BorderUIResource(new UIToolTipBorder(false))); - table.put("Tree.expandedIcon", BaseUtils.readIcon("/com/fr/design/images/tree/open.png")); - table.put("Tree.collapsedIcon", BaseUtils.readIcon("/com/fr/design/images/tree/close.png")); table.put("PopupMenu.border", new UIPopupMenuBorder()); table.put("PopupMenu.foreground", new ColorUIResource(255, 0, 0)); table.put("SplitPane.dividerSize", new Integer(7)); diff --git a/designer_base/src/com/fr/start/SplashPane.java b/designer_base/src/com/fr/start/SplashPane.java index 03e348d305..92b259c5dc 100644 --- a/designer_base/src/com/fr/start/SplashPane.java +++ b/designer_base/src/com/fr/start/SplashPane.java @@ -1,12 +1,11 @@ /** - * + * */ package com.fr.start; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; -import java.awt.image.BufferedImage; import javax.swing.ImageIcon; import javax.swing.JPanel; @@ -19,22 +18,20 @@ import com.fr.stable.CoreGraphHelper; /** * @author neil - * * @date: 2015-3-13-上午10:20:43 */ -public class SplashPane extends JPanel{ +public class SplashPane extends JPanel { + + /** + * 获取已经绘制完毕的启动画面 + * + * @return 绘制完毕的启动画面 + */ + public Image getSplashImage() { + Image image = createSplashBackground(); + return CoreGraphHelper.toBufferedImage(image); + } - /** - * 获取已经绘制完毕的启动画面 - * - * @return 绘制完毕的启动画面 - * - */ - public BufferedImage getSplashImage() { - Image image = createSplashBackground(); - return CoreGraphHelper.toBufferedImage(image); - } - protected void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2d = (Graphics2D) g; @@ -44,35 +41,32 @@ public class SplashPane extends JPanel{ } /** - * 设置在启动过程中, 动态改变的文本, 如 当前启动的模块信息 - * - * @param text 指定的文本 - * - */ - public void setShowText(String text) { - - } + * 设置在启动过程中, 动态改变的文本, 如 当前启动的模块信息 + * + * @param text 指定的文本 + */ + public void setShowText(String text) { + + } - /** - * 创建启动画面的背景图片 - * - * @return 背景图片 - * - */ - public Image createSplashBackground() { + /** + * 创建启动画面的背景图片 + * + * @return 背景图片 + */ + public Image createSplashBackground() { if (GeneralContext.isChineseEnv()) { return BaseUtils.readImage("/com/fr/base/images/oem/splash_chinese.png"); } - + return BaseUtils.readImage("/com/fr/base/images/oem/splash_english.png"); } - + /** - * 窗口关闭后取消定时获取模块信息的timer - * - */ - public void releaseTimer() { - - } - + * 窗口关闭后取消定时获取模块信息的timer + */ + public void releaseTimer() { + + } + } \ No newline at end of file diff --git a/designer_base/src/com/fr/start/SplashWindow.java b/designer_base/src/com/fr/start/SplashWindow.java index 70c16b5aaf..f2df42981c 100644 --- a/designer_base/src/com/fr/start/SplashWindow.java +++ b/designer_base/src/com/fr/start/SplashWindow.java @@ -14,13 +14,14 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.stable.OperatingSystem; +import com.sun.awt.AWTUtilities; public class SplashWindow extends JFrame { private SplashPane splash = null; @SuppressWarnings("LeakingThisInConstructor") - public SplashWindow(SplashPane splashPane) { + public SplashWindow(SplashPane splashPane) { // alex:必须设置这个属性为true,才可以用透明背景 System.setProperty("sun.java2d.noddraw", "true"); @@ -45,7 +46,8 @@ public class SplashWindow extends JFrame { this.setAlwaysOnTop(false); this.setUndecorated(true); - + AWTUtilities.setWindowOpaque(this, false); + //使窗体背景透明 if (OperatingSystem.isWindows()) { this.setBackground(new Color(0,0,0,0));