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/19] 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 bda412b85..43a3377cc 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 f5f57da3254b946f5aba28ffdcf6aeb4f6f4acfb Mon Sep 17 00:00:00 2001 From: momeak Date: Thu, 14 Sep 2017 11:04:37 +0800 Subject: [PATCH 02/19] =?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 ced48d50d..a1841a954 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 861df6aaa..d5a3bd914 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 f08b0a89b..7839d0cdb 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 ef85a7de88c1ac3dc5d212b5a976a02fc5b05d53 Mon Sep 17 00:00:00 2001 From: hzzz Date: Thu, 14 Sep 2017 11:08:43 +0800 Subject: [PATCH 03/19] =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E8=83=8C=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/controlpane/UIListControlPane.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java index 81165a2b9..617619bc2 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java @@ -6,6 +6,7 @@ import com.fr.base.chart.BasePlot; import com.fr.design.actions.UpdateAction; import com.fr.design.actions.core.ActionFactory; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.constants.UIConstants; import com.fr.design.data.tabledata.tabledatapane.GlobalMultiTDTableDataPane; import com.fr.design.data.tabledata.tabledatapane.GlobalTreeTableDataPane; import com.fr.design.data.tabledata.tabledatapane.MultiTDTableDataPane; @@ -87,6 +88,7 @@ public abstract class UIListControlPane extends UIControlPane { protected void initLeftPane(JPanel leftPane) { nameableList = createJNameList(); nameableList.setName(LIST_NAME); + nameableList.setSelectionBackground(UIConstants.ATTRIBUTE_PRESS); leftPane.add(new UIScrollPane(nameableList), BorderLayout.CENTER); From 1c734862c466ac28bdfaf14a601a9497a3dd6637 Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 14 Sep 2017 11:40:11 +0800 Subject: [PATCH 04/19] =?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 d1ec34f39..3d7a3ec50 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 a29ef9af71dbfc5f6a139d0d612659ab1485e5d4 Mon Sep 17 00:00:00 2001 From: hzzz Date: Thu, 14 Sep 2017 11:43:13 +0800 Subject: [PATCH 05/19] =?UTF-8?q?ToolbarUI=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/gui/itoolbar/UIToolBarUI.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/gui/itoolbar/UIToolBarUI.java b/designer_base/src/com/fr/design/gui/itoolbar/UIToolBarUI.java index d9d5bf7ed..8d3a66d45 100644 --- a/designer_base/src/com/fr/design/gui/itoolbar/UIToolBarUI.java +++ b/designer_base/src/com/fr/design/gui/itoolbar/UIToolBarUI.java @@ -25,6 +25,8 @@ import com.fr.design.constants.UIConstants; import com.fr.design.gui.ibutton.UIToolButtonBorder; import com.fr.design.gui.icheckbox.UICheckBox; +import static com.fr.design.utils.ThemeUtils.BACK_COLOR; + public class UIToolBarUI extends MetalToolBarUI { public static final String IS_TOOL_BAR_BUTTON_KEY = "JToolBar.isToolbarButton"; public static final int FLOATABLE_GRIP_SIZE = 8; @@ -89,7 +91,7 @@ public class UIToolBarUI extends MetalToolBarUI { */ public void paint(Graphics g, JComponent c) { Graphics2D g2 = (Graphics2D) g; - g2.setColor(UIConstants.TOOLBARUI_BACKGROUND); + g2.setColor(BACK_COLOR); g2.fillRect(0, 0, c.getWidth(), c.getHeight()); } From fca6bc07e68290a79afa5d882f3a6e1d7842def5 Mon Sep 17 00:00:00 2001 From: hzzz Date: Thu, 14 Sep 2017 12:25:04 +0800 Subject: [PATCH 06/19] =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A1=86=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E7=9A=84=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/constants/UIConstants.java | 3 + .../com/fr/design/gui/ibutton/UIButtonUI.java | 6 +- .../fr/design/utils/gui/GUIPaintUtils.java | 84 ++++++++++--------- 3 files changed, 52 insertions(+), 41 deletions(-) diff --git a/designer_base/src/com/fr/design/constants/UIConstants.java b/designer_base/src/com/fr/design/constants/UIConstants.java index 39ea2e6fb..b675b40d8 100644 --- a/designer_base/src/com/fr/design/constants/UIConstants.java +++ b/designer_base/src/com/fr/design/constants/UIConstants.java @@ -64,6 +64,9 @@ public interface UIConstants { Constants.LINE_MEDIUM_DASH_DOT_DOT, //medium dash-dot-dot border Constants.LINE_SLANTED_DASH_DOT, //slanted dash-dot border }; + public static final Color COMBOBOX_BTN_NORMAL = new Color(0xD9DADD); + public static final Color COMBOBOX_BTN_ROLLOVER = new Color(0xC8C9CD); + public static final Color COMBOBOX_BTN_PRESS = new Color(0xD8F2FD); public static final Color LINE_COLOR = new Color(153, 153, 153); public static final Color FONT_COLOR = new Color(51, 51, 51); public static final Color LIGHT_BLUE = new Color(182, 217, 253); diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java b/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java index ee98d0928..cd76c30cb 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java @@ -51,11 +51,11 @@ public class UIButtonUI extends BasicButtonUI { protected void doExtraPainting(UIButton b, Graphics2D g2d, int w, int h, String selectedRoles) { if (isPressed(b) && b.isPressedPainted()) { - GUIPaintUtils.fillPressed(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles)); + GUIPaintUtils.fillPressed(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), UIConstants.COMBOBOX_BTN_PRESS); } else if (isRollOver(b)) { - GUIPaintUtils.fillRollOver(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted()); + GUIPaintUtils.fillRollOver(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted(), UIConstants.COMBOBOX_BTN_ROLLOVER); } else if (b.isNormalPainted()) { - GUIPaintUtils.fillNormal(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted()); + GUIPaintUtils.fillNormal(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted(), UIConstants.COMBOBOX_BTN_NORMAL); } } diff --git a/designer_base/src/com/fr/design/utils/gui/GUIPaintUtils.java b/designer_base/src/com/fr/design/utils/gui/GUIPaintUtils.java index fb21725d6..286e44cd6 100644 --- a/designer_base/src/com/fr/design/utils/gui/GUIPaintUtils.java +++ b/designer_base/src/com/fr/design/utils/gui/GUIPaintUtils.java @@ -49,23 +49,28 @@ public class GUIPaintUtils { /** * 正常状态填充 - * @param g2d 图形对象 - * @param x x坐标 - * @param y y坐标 - * @param width 宽度 - * @param height 高度 - * @param isRound 是否圆角 - * @param rectDirection 矩形方向 + * + * @param g2d 图形对象 + * @param x x坐标 + * @param y y坐标 + * @param width 宽度 + * @param height 高度 + * @param isRound 是否圆角 + * @param rectDirection 矩形方向 * @param isAuthorityEdited 是否权限编辑 - * @param isPressedPainted 是否按压画 + * @param isPressedPainted 是否按压画 */ public static final void fillNormal(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited, boolean isPressedPainted) { + fillNormal(g2d, x, y, width, height, isRound, rectDirection, isAuthorityEdited, isPressedPainted, UIConstants.ATTRIBUTE_NORMAL); + } + + public static final void fillNormal(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited, boolean isPressedPainted, Color color) { GradientPaint gp; if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { gp = new GradientPaint(1, 1, UIConstants.AUTHORITY_BLUE, 1, height - 1, UIConstants.AUTHORITY_DARK_BLUE); } else if (isPressedPainted) { - gp = new GradientPaint(1, 1, UIConstants.ATTRIBUTE_NORMAL, 1, height - 1, UIConstants.ATTRIBUTE_NORMAL); - }else{ + gp = new GradientPaint(1, 1, color, 1, height - 1, color); + } else { gp = new GradientPaint(1, 1, UIConstants.SHADOW_GREY, 1, height - 1, UIConstants.SHADOW_GREY); } @@ -74,15 +79,16 @@ public class GUIPaintUtils { /** * 鼠标悬停状态填充 - * @param g2d 图形对象 - * @param x x坐标 - * @param y y坐标 - * @param width 宽度 - * @param height 高度 - * @param isRound 是否圆角 - * @param rectDirection 矩形方向 + * + * @param g2d 图形对象 + * @param x x坐标 + * @param y y坐标 + * @param width 宽度 + * @param height 高度 + * @param isRound 是否圆角 + * @param rectDirection 矩形方向 * @param isAuthorityEdited 是否权限编辑 - * @param isPressedPainted 是否按压画 + * @param isPressedPainted 是否按压画 */ public static final void fillRollOver(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited, boolean isPressedPainted) { fillRollOver(g2d, x, y, width, height, isRound, rectDirection, isAuthorityEdited, isPressedPainted, null); @@ -104,15 +110,15 @@ public class GUIPaintUtils { /** * 按压状态填充 - * @param g2d 图形对象 - * @param x x坐标 - * @param y y坐标 - * @param width 宽度 - * @param height 高度 - * @param isRound 是否圆角 - * @param rectDirection 矩形方向 - * @param isAuthorityEdited 是否权限编辑 * + * @param g2d 图形对象 + * @param x x坐标 + * @param y y坐标 + * @param width 宽度 + * @param height 高度 + * @param isRound 是否圆角 + * @param rectDirection 矩形方向 + * @param isAuthorityEdited 是否权限编辑 */ public static final void fillPressed(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited) { fillPressed(g2d, x, y, width, height, isRound, rectDirection, isAuthorityEdited, null); @@ -147,17 +153,19 @@ public class GUIPaintUtils { g2d.setColor(oldColor); } + /** * 自定义画笔填充 - * @param g2d 图形对象 - * @param x x坐标 - * @param y y坐标 - * @param width 宽度 - * @param height 高度 - * @param isRound 是否圆角 - * @param rectDirection 矩形方向 - * @param paint 画笔 - * @param arc 圆角尺寸 + * + * @param g2d 图形对象 + * @param x x坐标 + * @param y y坐标 + * @param width 宽度 + * @param height 高度 + * @param isRound 是否圆角 + * @param rectDirection 矩形方向 + * @param paint 画笔 + * @param arc 圆角尺寸 */ public static final void fillPaint(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, Paint paint, int arc) { Paint oldPaint = g2d.getPaint(); @@ -188,9 +196,9 @@ public class GUIPaintUtils { public static final void paintBorderShadow(Graphics2D g2, int shadowWidth, Shape shape, Color outColor, Color inColor) { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); - g2.setColor(outColor); - g2.setStroke(new BasicStroke(shadowWidth)); - g2.draw(shape); + g2.setColor(outColor); + g2.setStroke(new BasicStroke(shadowWidth)); + g2.draw(shape); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); } From 9f5f83c8783ee0431d50b3678417050f7f1842b2 Mon Sep 17 00:00:00 2001 From: hzzz Date: Thu, 14 Sep 2017 14:38:40 +0800 Subject: [PATCH 07/19] =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A1=86=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E9=9D=9E=E7=82=B9=E5=87=BB=E7=8A=B6=E6=80=81=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=20&=20=E4=B8=8B=E6=8B=89=E6=A1=86=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/ibutton/UIButtonUI.java | 29 ++++++------------- .../gui/icombobox/UIComboBoxRenderer.java | 2 +- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java b/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java index cd76c30cb..a38011208 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java @@ -1,27 +1,16 @@ package com.fr.design.gui.ibutton; -import java.awt.FontMetrics; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.Insets; -import java.awt.Rectangle; -import java.awt.RenderingHints; - -import javax.swing.AbstractButton; -import javax.swing.ButtonModel; -import javax.swing.Icon; -import javax.swing.JComponent; -import javax.swing.SwingUtilities; -import javax.swing.plaf.basic.BasicButtonUI; -import javax.swing.plaf.basic.BasicHTML; -import javax.swing.text.View; - import com.fr.design.constants.UIConstants; import com.fr.design.roleAuthority.ReportAndFSManagePane; +import com.fr.design.utils.gui.GUIPaintUtils; +import com.fr.stable.StringUtils; import sun.swing.SwingUtilities2; -import com.fr.stable.StringUtils; -import com.fr.design.utils.gui.GUIPaintUtils; +import javax.swing.*; +import javax.swing.plaf.basic.BasicButtonUI; +import javax.swing.plaf.basic.BasicHTML; +import javax.swing.text.View; +import java.awt.*; public class UIButtonUI extends BasicButtonUI { @@ -66,7 +55,7 @@ public class UIButtonUI extends BasicButtonUI { protected boolean isPressed(AbstractButton b) { ButtonModel model = b.getModel(); - return (model.isArmed() && model.isPressed()) || b.isSelected(); + return model.isArmed() && model.isPressed(); } private void paintContent(Graphics g, AbstractButton b, String text) { @@ -127,7 +116,7 @@ public class UIButtonUI extends BasicButtonUI { return; } Icon selectedIcon = null; - /* the fallback icon should be based on the selected state */ + /* the fallback icon should be based on the selected state */ if (model.isSelected()) { selectedIcon = (Icon) b.getSelectedIcon(); if (selectedIcon != null) { diff --git a/designer_base/src/com/fr/design/gui/icombobox/UIComboBoxRenderer.java b/designer_base/src/com/fr/design/gui/icombobox/UIComboBoxRenderer.java index 7674b574f..4be4fdcf0 100644 --- a/designer_base/src/com/fr/design/gui/icombobox/UIComboBoxRenderer.java +++ b/designer_base/src/com/fr/design/gui/icombobox/UIComboBoxRenderer.java @@ -27,7 +27,7 @@ public class UIComboBoxRenderer extends DefaultListCellRenderer { cellHasFocus = cellHasFocus && !this.isEnabled(); JLabel renderer =(JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); renderer.setForeground(Color.black); - list.setSelectionBackground(UIConstants.FLESH_BLUE); + list.setSelectionBackground(UIConstants.COMBOBOX_BTN_PRESS); list.setSelectionForeground(Color.black); renderer.setText(" " + renderer.getText()); return renderer; From fe6fadb25a3bf123ca679da67bf5e918c00e1dda Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 14 Sep 2017 14:38:20 +0800 Subject: [PATCH 08/19] =?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 a521fbddf..9a5bd6071 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 09/19] =?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 add452758..0a996c6d7 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 afb23ec70..5d35bf02e 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 10/19] =?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 39ea2e6fb..38979e3d2 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 b87b19a5f..2edfce1d6 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 11/19] =?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 e2b01a646..7dd2a0bc0 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 60f8cbe05..068c896dc 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 12/19] =?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 068c896dc..fb75edbab 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 e35913ef167a692e34891737a7dd524449aaf480 Mon Sep 17 00:00:00 2001 From: momeak Date: Thu, 14 Sep 2017 15:44:05 +0800 Subject: [PATCH 13/19] =?UTF-8?q?REPORT-4450=20=E8=81=9A=E5=90=88=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E5=9C=A8=E7=BC=A9=E6=94=BE=E5=90=8E=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=9D=97=EF=BC=8C=E4=BC=9A=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E9=94=99=E4=B9=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/poly/PolyDesigner.java | 3 +-- designer/src/com/fr/poly/PolyUtils.java | 9 +++++---- .../com/fr/poly/hanlder/BottomCornerMouseHanlder.java | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/designer/src/com/fr/poly/PolyDesigner.java b/designer/src/com/fr/poly/PolyDesigner.java index 09d0f8f65..c8cc3362f 100644 --- a/designer/src/com/fr/poly/PolyDesigner.java +++ b/designer/src/com/fr/poly/PolyDesigner.java @@ -272,7 +272,6 @@ public class PolyDesigner extends ReportComponent= 0; count--) { BlockCreator creator = addedData.getAddedAt(count); - int cx = creator.getX(); - int cy = creator.getY(); - int cw = creator.getWidth(); - int ch = creator.getHeight(); + float times = (float) designer.getResolution()/ScreenResolution.getScreenResolution(); + int cx = (int) (creator.getX() * times); + int cy = (int) (creator.getY() * times); + int cw = (int) (creator.getWidth() * times); + int ch = (int) (creator.getHeight() * times); if (x >= cx && x <= (cx + cw)) { if(y >= cy && y <= (cy + ch)) { return creator; diff --git a/designer/src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java b/designer/src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java index 3f063e21d..84a626406 100644 --- a/designer/src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java +++ b/designer/src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java @@ -15,6 +15,7 @@ import com.fr.design.beans.location.Absorptionline; import com.fr.design.beans.location.MoveUtils; import com.fr.design.beans.location.MoveUtils.RectangleDesigner; import com.fr.design.beans.location.MoveUtils.RectangleIterator; +import com.fr.design.file.HistoryTemplateListPane; import com.fr.general.ComparatorUtils; import com.fr.poly.PolyDesigner; import com.fr.poly.PolyDesigner.SelectionType; @@ -101,6 +102,7 @@ public class BottomCornerMouseHanlder extends MouseInputAdapter { dragStart.y -= pressed.y; TemplateBlock block = editor.getValue(); + resolution = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getJTemplateResolution(); Rectangle bounds = block.getBounds().toRectangle(resolution); Point resultPoint = MoveUtils.sorption(bounds.x + dragStart.x < 0 ? 0 : bounds.x + dragStart.x, bounds.y + dragStart.y < 0 ? 0 : bounds.y + dragStart.y, bounds.width, bounds.height, rectDesigner, false); From 95967fc33b896ae55f82d6420779e12c1e1ebbf1 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Thu, 14 Sep 2017 16:11:52 +0800 Subject: [PATCH 14/19] =?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 a3cd54643..2b5ce14c7 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 15/19] 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 211fb36e3..a1e9b578b 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 d49cd9460..07f7acd8a 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 03e348d30..92b259c5d 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 70c16b5aa..f2df42981 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)); From 28eeb0192539fe41238450a804753293f574410a Mon Sep 17 00:00:00 2001 From: momeak Date: Thu, 14 Sep 2017 17:29:38 +0800 Subject: [PATCH 16/19] =?UTF-8?q?REPORT-4450=20=E8=81=9A=E5=90=88=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E5=9C=A8=E7=BC=A9=E6=94=BE=E5=90=8E=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=9D=97=EF=BC=8C=E4=BC=9A=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E9=94=99=E4=B9=B1=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9xy=E5=9D=90=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/poly/PolyDesignUI.java | 2 +- designer/src/com/fr/poly/creator/ECBlockCreator.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/designer/src/com/fr/poly/PolyDesignUI.java b/designer/src/com/fr/poly/PolyDesignUI.java index 9fdc8788e..8cc3583d8 100644 --- a/designer/src/com/fr/poly/PolyDesignUI.java +++ b/designer/src/com/fr/poly/PolyDesignUI.java @@ -106,7 +106,7 @@ public class PolyDesignUI extends ComponentUI { BlockCreator creator = addedData.getAddedAt(i); // richer:如果当前这个组件正在编辑,那么他是完全被他的编辑器所遮挡的,不需要画出来 if (creator == designer.getSelection()) { - paintPositionLine(g, Math.round(creator.getX() * time), Math.round(creator.getY() * time), + paintPositionLine(g, Math.round(creator.getX(time)), Math.round(creator.getY(time)), Math.round(designer.getHorizontalValue()*time), Math.round(designer.getVerticalValue()*time)); if (creator.getEditor().isDragging()) { creator.getEditor().paintAbsorptionline(g); diff --git a/designer/src/com/fr/poly/creator/ECBlockCreator.java b/designer/src/com/fr/poly/creator/ECBlockCreator.java index 92313115e..3921bea39 100644 --- a/designer/src/com/fr/poly/creator/ECBlockCreator.java +++ b/designer/src/com/fr/poly/creator/ECBlockCreator.java @@ -23,8 +23,8 @@ import com.fr.stable.unit.UnitRectangle; */ public class ECBlockCreator extends BlockCreator { private ECBlockEditor editor; - private static final int CREATOR_WIDTH = 30; - private static final int CREATOR_HEIGHT = 19; + private static final int CREATOR_WIDTH = 20; + private static final int CREATOR_HEIGHT = 9; public ECBlockCreator() { @@ -69,12 +69,12 @@ public class ECBlockCreator extends BlockCreator { @Override public int getX(float time) { - return (int) ((this.getX() - CREATOR_WIDTH) * time) + CREATOR_WIDTH; + return Math.round ((this.getX() - CREATOR_WIDTH) * time) + CREATOR_WIDTH; } @Override public int getY(float time) { - return (int) ((this.getY() - CREATOR_HEIGHT) * time) + CREATOR_HEIGHT; + return Math.round ((this.getY() - CREATOR_HEIGHT) * time) + CREATOR_HEIGHT; } /** From 372ae835da4a36b5a99e124eb8f619baafaa4f46 Mon Sep 17 00:00:00 2001 From: momeak Date: Thu, 14 Sep 2017 20:02:58 +0800 Subject: [PATCH 17/19] =?UTF-8?q?REPORT-4186=20[=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=B4=A8=E9=87=8F]=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=88=86=E7=B1=BB=E6=A0=87=E9=A2=98=EF=BC=8C=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=AE=9E=E7=8E=B0=E6=9C=80=E5=A5=BD=E7=94=A8=E5=9F=BA?= =?UTF-8?q?=E6=9C=AC=E6=8E=A7=E4=BB=B6=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/foldablepane/HeaderPane.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/designer_base/src/com/fr/design/foldablepane/HeaderPane.java b/designer_base/src/com/fr/design/foldablepane/HeaderPane.java index f0d19ee39..8e99896bc 100644 --- a/designer_base/src/com/fr/design/foldablepane/HeaderPane.java +++ b/designer_base/src/com/fr/design/foldablepane/HeaderPane.java @@ -1,5 +1,6 @@ package com.fr.design.foldablepane; +import com.fr.base.GraphHelper; import com.fr.design.constants.UIConstants; import com.fr.design.gui.syntax.ui.rsyntaxtextarea.RSyntaxUtilities; @@ -53,6 +54,7 @@ public class HeaderPane extends JPanel { RenderingHints.VALUE_ANTIALIAS_ON); BufferedImage panelImage = createPanelImage(); g2d.drawImage(panelImage, null, 0, 0); + GraphHelper.drawString(g2d, this.title, TITLE_X, headHeight - fontSize / 2 - 1); } private BufferedImage createPanelImage() { @@ -67,7 +69,6 @@ public class HeaderPane extends JPanel { if (desktopHints != null) { g2d.setRenderingHints(desktopHints); } - g2d.drawString(this.title, TITLE_X, headHeight - fontSize / 2 - 1); int leftWdith = headWidth - LEFT_X; if (this.isShow) { image = UIConstants.DRAG_DOWN_SELECTED_SMALL; @@ -103,13 +104,13 @@ public class HeaderPane extends JPanel { } public static void main(String[] args) { -// JFrame mainFrame = new JFrame("UI Demo - Gloomyfish"); -// mainFrame.getContentPane().setLayout(new BorderLayout()); -// mainFrame.getContentPane().add(new HeaderPane(Color.black, "基本", 24), BorderLayout.CENTER); -// mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); -// mainFrame.pack(); -// mainFrame.setSize(300, 400); -// mainFrame.setVisible(true); + JFrame mainFrame = new JFrame("UI Demo - Gloomyfish"); + mainFrame.getContentPane().setLayout(new BorderLayout()); + mainFrame.getContentPane().add(new HeaderPane(Color.black, "基本", 24), BorderLayout.CENTER); + mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + mainFrame.pack(); + mainFrame.setSize(300, 400); + mainFrame.setVisible(true); } } From 7be14d3d2d6c1447d0e384d00f38a8e22f3488a0 Mon Sep 17 00:00:00 2001 From: vito Date: Fri, 15 Sep 2017 00:51:06 +0800 Subject: [PATCH 18/19] =?UTF-8?q?bugfix:=E9=9D=9Eretina=E7=BC=A9=E6=94=BE?= =?UTF-8?q?=E6=97=B6=E6=96=87=E5=AD=97=E4=BD=8D=E7=BD=AE=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/start/ReportSplashPane.java | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/designer/src/com/fr/start/ReportSplashPane.java b/designer/src/com/fr/start/ReportSplashPane.java index a1e9b578b..84a7e10ce 100644 --- a/designer/src/com/fr/start/ReportSplashPane.java +++ b/designer/src/com/fr/start/ReportSplashPane.java @@ -1,9 +1,7 @@ -/** - * - */ package com.fr.start; import com.bulenkov.iconloader.IconLoader; +import com.bulenkov.iconloader.util.JBUI; import com.fr.base.BaseUtils; import com.fr.base.FRContext; import com.fr.base.GraphHelper; @@ -32,12 +30,14 @@ 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 float JBUI_INIT_SCALE = JBUI.scale(1f); + 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 int MODULE_INFO_X = uiScale(54); + private static final int MODULE_INFO_Y = uiScale(340); 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 int THANK_INFO_Y = uiScale(382); private static final String GUEST = getRandomUser(); @@ -48,6 +48,14 @@ public class ReportSplashPane extends SplashPane { private String[] loading = new String[]{"..", "....", "......"}; private java.util.Timer timer = new java.util.Timer(); + private static float uiScale(float f) { + return f * JBUI_INIT_SCALE; + } + + private static int uiScale(int i) { + return (int) (i * JBUI_INIT_SCALE); + } + public ReportSplashPane() { init(); } From 2bd995d7ff3ad5f77f8d278217a24ad103ed650f Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 15 Sep 2017 09:08:13 +0800 Subject: [PATCH 19/19] =?UTF-8?q?REPORT-4372=20=E6=97=A5=E6=9C=9F=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E8=87=AA=E5=AE=9A=E4=B9=89=E6=97=A5=E6=9C=9F=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widget/ui/DateEditorDefinePane.java | 5 +- .../widget/component/UIComboBoxNoArrow.java | 116 ++++++++++++++++++ .../ui/designer/DateEditorDefinePane.java | 5 +- 3 files changed, 122 insertions(+), 4 deletions(-) create mode 100644 designer_base/src/com/fr/design/widget/component/UIComboBoxNoArrow.java diff --git a/designer/src/com/fr/design/widget/ui/DateEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/DateEditorDefinePane.java index 26cc0f439..101bce139 100644 --- a/designer/src/com/fr/design/widget/ui/DateEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/DateEditorDefinePane.java @@ -10,6 +10,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.widget.component.DateValuePane; +import com.fr.design.widget.component.UIComboBoxNoArrow; import com.fr.form.ui.DateEditor; import com.fr.general.DateUtils; import com.fr.general.Inter; @@ -92,8 +93,8 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane