From 146d4d97357244a303e8a2fe9e2be5fb3a486c44 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Wed, 20 Sep 2017 16:25:38 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=20REPORT-4709=20[9.0=E4=BA=8C=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E5=8D=95=E5=85=83=E6=A0=BC=E5=B1=9E?= =?UTF-8?q?=E6=80=A7-=E6=8F=92=E5=85=A5=E8=A1=8C=E7=AD=96=E7=95=A5-?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=80=BC=E7=B1=BB=E5=9E=8B=E4=B8=BA=E5=85=AC?= =?UTF-8?q?=E5=BC=8F=E4=B8=BA=E7=A9=BA=E6=97=B6=EF=BC=8C=E4=B8=8D=E4=BC=9A?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E4=BF=9D=E5=AD=98=20=20REPORT-4710=20[9.0?= =?UTF-8?q?=E4=BA=8C=E8=BD=AE=E5=9B=9E=E5=BD=92]=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E6=A0=B7=E5=BC=8F=E8=BE=B9=E6=A1=86=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=90=8E=E6=B7=BB=E5=8A=A0=E9=A2=9C=E8=89=B2=E8=83=8C=E6=99=AF?= =?UTF-8?q?=EF=BC=8C=E5=B0=B1=E6=97=A0=E6=B3=95=E6=9B=B4=E6=94=B9=E8=BE=B9?= =?UTF-8?q?=E6=A1=86=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/editor/DoubleDeckValueEditorPane.java | 6 +++--- .../src/com/fr/design/editor/ValueEditorPane.java | 12 +++++------- .../com/fr/design/editor/editor/FormulaEditor.java | 4 ++++ .../src/com/fr/design/gui/style/BorderPane.java | 7 +------ .../backgroundpane/ColorBackgroundQuickPane.java | 5 +++-- 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/designer_base/src/com/fr/design/editor/DoubleDeckValueEditorPane.java b/designer_base/src/com/fr/design/editor/DoubleDeckValueEditorPane.java index 77f50aa6d5..be285dd947 100644 --- a/designer_base/src/com/fr/design/editor/DoubleDeckValueEditorPane.java +++ b/designer_base/src/com/fr/design/editor/DoubleDeckValueEditorPane.java @@ -217,9 +217,9 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver, String name = currentEditor.getName(); Object columnIndex = currentEditor.getValue(); //bug86542,这边为啥要new一个公式出来,只保留content,其他属性全不要了? -// if (ComparatorUtils.equals(name, Inter.getLocText("Formula"))) { -// columnIndex = new Formula(columnIndex == null ? "" : columnIndex.toString()); -// } + if (columnIndex == null && ComparatorUtils.equals(name, Inter.getLocText("Formula"))) { + columnIndex = ((FormulaEditor) currentEditor).getFormula(); + } return columnIndex; } diff --git a/designer_base/src/com/fr/design/editor/ValueEditorPane.java b/designer_base/src/com/fr/design/editor/ValueEditorPane.java index 0a7600e2f4..6b2a7fd30d 100644 --- a/designer_base/src/com/fr/design/editor/ValueEditorPane.java +++ b/designer_base/src/com/fr/design/editor/ValueEditorPane.java @@ -2,6 +2,7 @@ package com.fr.design.editor; import com.fr.base.Formula; import com.fr.design.DesignerEnvManager; +import com.fr.design.editor.editor.*; import com.fr.design.event.GlobalNameListener; import com.fr.design.event.GlobalNameObserver; import com.fr.design.event.UIObserver; @@ -11,10 +12,6 @@ import com.fr.design.gui.imenu.UIMenuItem; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.design.dialog.BasicPane; -import com.fr.design.editor.editor.ColumnNameEditor; -import com.fr.design.editor.editor.Editor; -import com.fr.design.editor.editor.TextEditor; -import com.fr.design.editor.editor.XMLANameEditor; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.stable.StringUtils; @@ -207,9 +204,10 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName String name = currentEditor.getName(); Object columnIndex = currentEditor.getValue(); //bug86542,这边为啥要new一个公式出来,只保留content,其他属性全不要了? -// if (ComparatorUtils.equals(name, Inter.getLocText("Formula"))) { -// columnIndex = new Formula(columnIndex == null ? "" : columnIndex.toString()); -// } + //MoMeak:我也想注释了,但是有bug啊。。。 + if (columnIndex == null && ComparatorUtils.equals(name, Inter.getLocText("Formula"))) { + columnIndex = ((FormulaEditor) currentEditor).getFormula(); + } return columnIndex; } diff --git a/designer_base/src/com/fr/design/editor/editor/FormulaEditor.java b/designer_base/src/com/fr/design/editor/editor/FormulaEditor.java index 44d8c9f8cd..943fb3a66d 100644 --- a/designer_base/src/com/fr/design/editor/editor/FormulaEditor.java +++ b/designer_base/src/com/fr/design/editor/editor/FormulaEditor.java @@ -96,6 +96,10 @@ public class FormulaEditor extends Editor { }).setVisible(true); } + public Formula getFormula(){ + return formula; + } + /** * Return the value of the CellEditor. */ 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 d5a3bd9146..a78c4fd7e2 100644 --- a/designer_base/src/com/fr/design/gui/style/BorderPane.java +++ b/designer_base/src/com/fr/design/gui/style/BorderPane.java @@ -203,21 +203,16 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse CellBorderStyle cellBorderStyle = this.update(); HashSet borderSet = new HashSet(Arrays.asList(BORDERARRAY)); + 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()); } } 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 7839d0cdb1..ef106b17b0 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java @@ -29,8 +29,8 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane { public void populateBean(Background background) { ColorBackground colorBackgroud = (ColorBackground) background; - isBackGroundColor = false; this.detailColorSelectPane.setColor(colorBackgroud.getColor()); + isBackGroundColor = false; } public Background updateBean() { @@ -50,8 +50,9 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane { public void registerChangeListener(final UIObserverListener listener) { detailColorSelectPane.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { - listener.doChange(); isBackGroundColor = true; + listener.doChange(); + isBackGroundColor = false; } }); } From 436a6bd227ca9a77c6b1d50064681225ebf63f69 Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 20 Sep 2017 16:32:30 +0800 Subject: [PATCH 2/9] toolbar border --- .../src/com/fr/design/constants/UIConstants.java | 2 +- .../com/fr/design/data/datapane/TableDataTreePane.java | 3 +++ .../fr/design/mainframe/DesignerFrameFileDealerPane.java | 9 ++++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/constants/UIConstants.java b/designer_base/src/com/fr/design/constants/UIConstants.java index fd809bb81a..ae9f97d06f 100644 --- a/designer_base/src/com/fr/design/constants/UIConstants.java +++ b/designer_base/src/com/fr/design/constants/UIConstants.java @@ -64,6 +64,7 @@ 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 TOOLBAR_BORDER_COLOR = new Color(0xD9DADD); 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); @@ -116,7 +117,6 @@ public interface UIConstants { public static final Color POPUP_TITLE_BACKGROUND = new Color(0xd8f2fd); - public static final BufferedImage DRAG_BAR = BaseUtils.readImage("com/fr/design/images/control/bar.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"); 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 c507995f41..7a4cf52042 100644 --- a/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java +++ b/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java @@ -6,6 +6,7 @@ import com.fr.data.TableDataSource; import com.fr.design.DesignModelAdapter; import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.UpdateAction; +import com.fr.design.constants.UIConstants; import com.fr.design.data.BasicTableDataTreePane; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.tabledata.StoreProcedureWorkerListener; @@ -111,6 +112,8 @@ public class TableDataTreePane extends BasicTableDataTreePane { ToolBarDef toolbarDef = new ToolBarDef(); toolbarDef.addShortCut(addMenuDef, SeparatorDef.DEFAULT, editAction, removeAction, SeparatorDef.DEFAULT, previewTableDataAction, connectionTableAction); UIToolbar toolBar = ToolBarDef.createJToolBar(); + toolBar.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.TOOLBAR_BORDER_COLOR)); + toolBar.setBorderPainted(true); toolbarDef.updateToolBar(toolBar); JPanel toolbarPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); diff --git a/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java b/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java index f89a0766f8..0c780fe941 100644 --- a/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java +++ b/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java @@ -79,10 +79,13 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt private DesignerFrameFileDealerPane() { setLayout(new BorderLayout()); toolBar = ToolBarDef.createJToolBar(); - toolBar.setBorder(BorderFactory.createEmptyBorder(3, 0, 4, 0)); + toolBar.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.TOOLBAR_BORDER_COLOR)); + toolBar.setBorderPainted(true); JPanel tooBarPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - - tooBarPane.add(toolBar, BorderLayout.CENTER); + JPanel parent = new JPanel(new BorderLayout()); + parent.add(toolBar, BorderLayout.CENTER); + parent.setBorder(BorderFactory.createEmptyBorder(3, 0, 4, 0)); + tooBarPane.add(parent, BorderLayout.CENTER); tooBarPane.add(new UIMenuHighLight(), BorderLayout.SOUTH); add(tooBarPane, BorderLayout.NORTH); From f756f4d1d9377f05d3d2dbda308f57c1b317149c Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 20 Sep 2017 17:09:09 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=8C=89=E9=92=AE=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/file/NewTemplatePane.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/designer_base/src/com/fr/design/file/NewTemplatePane.java b/designer_base/src/com/fr/design/file/NewTemplatePane.java index 58cae2ab98..1900cda0d4 100644 --- a/designer_base/src/com/fr/design/file/NewTemplatePane.java +++ b/designer_base/src/com/fr/design/file/NewTemplatePane.java @@ -10,6 +10,7 @@ import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.geom.Line2D; +import java.awt.geom.Rectangle2D; /** * Author : daisy @@ -45,6 +46,8 @@ public abstract class NewTemplatePane extends JComponent implements MouseListene public void paintComponent(Graphics g) { super.paintComponent(g); g2d = (Graphics2D) g; + g2d.setColor(UIConstants.COMBOBOX_BTN_NORMAL); + g2d.fill(new Rectangle2D.Double(0, 0, getWidth(),getHeight())); int sheetIconY = (getHeight() - newWorkBookIconMode.getIconHeight()) / 2; newWorkBookIconMode.paintIcon(this, g2d, newIconStartX, sheetIconY); // paintUnderLine(g2d); From 533bc6316adcd0475afa9d3dfc1d03b387ff9c34 Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 20 Sep 2017 17:14:34 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E5=B0=8F=E6=B4=9E=E6=B4=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/file/MutilTempalteTabPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/file/MutilTempalteTabPane.java b/designer_base/src/com/fr/design/file/MutilTempalteTabPane.java index 4fc8b0640a..44307b018e 100644 --- a/designer_base/src/com/fr/design/file/MutilTempalteTabPane.java +++ b/designer_base/src/com/fr/design/file/MutilTempalteTabPane.java @@ -373,7 +373,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M private void paintDefaultBackground(Graphics2D g2d) { //画默认背景 g2d.setPaint(new GradientPaint(1, 1, new Color(217, 218, 221), 1, getHeight() - 1, new Color(217, 218, 221))); - g2d.fillRect(getX(), getY(), getWidth(), getHeight()); + g2d.fillRect(0, 0, getWidth(), getHeight()); } From b565a87b3ec34065303e1f2874551aa7da1e5e8f Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 20 Sep 2017 17:20:14 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=A0=8F=E6=A0=87?= =?UTF-8?q?=E5=B0=BA=E9=A2=9C=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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/constants/UIConstants.java b/designer_base/src/com/fr/design/constants/UIConstants.java index ae9f97d06f..cbd831735d 100644 --- a/designer_base/src/com/fr/design/constants/UIConstants.java +++ b/designer_base/src/com/fr/design/constants/UIConstants.java @@ -103,7 +103,7 @@ public interface UIConstants { public static final Color SELECTED_BACKGROUND = new Color(0xdeedfe); public static final Color SELECTED_BORDER_LINE_COLOR = new Color(0x3384f0); public static final Color DEFAULT_BG_RULER = new Color(0xffffff); - public static final Color RULER_LINE_COLOR = new Color(0xababab); + public static final Color RULER_LINE_COLOR = new Color(0xD9DADD); public static final Color RULER_SCALE_COLOR = new Color(0x4e504f); public static final Color PROPERTY_PANE_BACKGROUND = new Color(0xdadadd); public static final Color SPLIT_LINE = new Color(201, 198, 184); @@ -117,6 +117,7 @@ public interface UIConstants { public static final Color POPUP_TITLE_BACKGROUND = new Color(0xd8f2fd); + public static final BufferedImage DRAG_BAR = BaseUtils.readImage("com/fr/design/images/control/bar.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"); From c515500b2da8603d04b31fb5358667ba49b8fe2d Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 20 Sep 2017 17:36:51 +0800 Subject: [PATCH 6/9] =?UTF-8?q?REPORT-4714=20=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E9=80=89=E6=8B=A9=E5=9B=BE=E7=89=87=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/style/BackgroundPane.java | 7 +++++++ .../backgroundpane/BackgroundQuickPane.java | 2 ++ .../backgroundpane/ColorBackgroundQuickPane.java | 5 +++++ .../GradientBackgroundQuickPane.java | 15 +++++++++++++++ .../backgroundpane/ImageBackgroundQuickPane.java | 6 ++++++ .../backgroundpane/NullBackgroundQuickPane.java | 5 +++++ .../PatternBackgroundQuickPane.java | 7 +++++++ .../TextureBackgroundQuickPane.java | 6 ++++++ 8 files changed, 53 insertions(+) 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 a1841a9544..6e7ffd28da 100644 --- a/designer_base/src/com/fr/design/gui/style/BackgroundPane.java +++ b/designer_base/src/com/fr/design/gui/style/BackgroundPane.java @@ -140,6 +140,7 @@ public class BackgroundPane extends AbstractBasicStylePane { * Populate background. */ public void populateBean(Background background) { + resetPaneList(); for (int i = 0; i < paneList.length; i++) { BackgroundQuickPane pane = paneList[i]; if (pane.accept(background)) { @@ -151,6 +152,12 @@ public class BackgroundPane extends AbstractBasicStylePane { } } + private void resetPaneList() { + for (BackgroundQuickPane pane : paneList) { + pane.reset(); + } + } + /** * Update background. */ diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/BackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/BackgroundQuickPane.java index 1b796c438b..850132d863 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/BackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/BackgroundQuickPane.java @@ -21,6 +21,8 @@ public abstract class BackgroundQuickPane extends BasicBeanPane impl @Override public abstract String title4PopupWindow(); + public abstract void reset(); + /** * 组件是否需要响应添加的观察者事件 * 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 7839d0cdb1..818ac8c3bb 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java @@ -76,4 +76,9 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane { public String title4PopupWindow() { return Inter.getLocText("Color"); } + + @Override + public void reset() { + this.detailColorSelectPane.setColor(null); + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/GradientBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/GradientBackgroundQuickPane.java index 97ba9cbe7c..dc7fd94167 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/GradientBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/GradientBackgroundQuickPane.java @@ -119,4 +119,19 @@ public class GradientBackgroundQuickPane extends BackgroundQuickPane { return Inter.getLocText("Gradient-Color"); } + @Override + public void reset() { + this.gradientBar.getSelectColorPointBtnP1().setColorInner(Color.WHITE); + this.gradientBar.getSelectColorPointBtnP2().setColorInner(Color.BLACK); + directionPane.setSelectedItem(0); + int startValue = 4; + int endValue = this.gradientBarWidth; + gradientBar.setStartValue(startValue); + gradientBar.setEndValue(endValue); + if(this.gradientBar.getSelectColorPointBtnP1() != null && this.gradientBar.getSelectColorPointBtnP2() != null){ + this.gradientBar.getSelectColorPointBtnP1().setX(startValue); + this.gradientBar.getSelectColorPointBtnP2().setX(endValue); + } + } + } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java index 4dafe476a4..22fa2c1e28 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java @@ -179,4 +179,10 @@ public class ImageBackgroundQuickPane extends BackgroundQuickPane { public String title4PopupWindow() { return Inter.getLocText("FR-Background_Image"); } + + @Override + public void reset() { + imageLayoutPane.setSelectedIndex(0); + previewPane.setImage(null); + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/NullBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/NullBackgroundQuickPane.java index 60d39ed2d6..ff4b0b590f 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/NullBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/NullBackgroundQuickPane.java @@ -51,4 +51,9 @@ public class NullBackgroundQuickPane extends BackgroundQuickPane { return Inter.getLocText("Background-Null"); } + @Override + public void reset() { + // do nothing + } + } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java index 86a96a2cbf..4b51108bde 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java @@ -215,4 +215,11 @@ public class PatternBackgroundQuickPane extends BackgroundQuickPane { public String title4PopupWindow() { return Inter.getLocText("FR-Designer_Background-Pattern"); } + + @Override + public void reset() { + patternButtonArray[0].setSelected(true); + foregroundColorPane.setSelectObject(null); + backgroundColorPane.setSelectObject(null); + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/TextureBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/TextureBackgroundQuickPane.java index 33e09057b6..fc0ae8f8a2 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/TextureBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/TextureBackgroundQuickPane.java @@ -169,4 +169,10 @@ public class TextureBackgroundQuickPane extends BackgroundQuickPane { public String title4PopupWindow() { return Inter.getLocText("Background-Texture"); } + + @Override + public void reset() { + this.texturePaint = null; + textureButtonArray[0].setSelected(true); + } } \ No newline at end of file From 67cfaaa9d10ff128f1a5e699e68952a98c2ffa45 Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 20 Sep 2017 17:49:36 +0800 Subject: [PATCH 7/9] =?UTF-8?q?Grid=E7=BA=BF=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/ElementCasePane.java | 1 - designer/src/com/fr/grid/Grid.java | 325 ++++++++---------- designer/src/com/fr/grid/GridHeader.java | 4 +- 3 files changed, 137 insertions(+), 193 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePane.java b/designer/src/com/fr/design/mainframe/ElementCasePane.java index 94fdcead8f..1a6cf0ddae 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePane.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePane.java @@ -390,7 +390,6 @@ public abstract class ElementCasePane extends Tar grid.setDefaultFloatEditor(Image.class, new ImageFloatEditor()); DesignerEnvManager designerEnvManager = DesignerEnvManager.getEnvManager(); - grid.setGridLineColor(designerEnvManager.getGridLineColor()); grid.setPaginationLineColor(designerEnvManager.getPaginationLineColor()); } diff --git a/designer/src/com/fr/grid/Grid.java b/designer/src/com/fr/grid/Grid.java index f90b000d4e..94c6f4a43a 100644 --- a/designer/src/com/fr/grid/Grid.java +++ b/designer/src/com/fr/grid/Grid.java @@ -10,7 +10,6 @@ import com.fr.design.constants.UIConstants; import com.fr.design.fun.GridUIProcessor; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.mainframe.ElementCasePane; -import com.fr.design.mainframe.templateinfo.TemplateInfoCollector; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; import com.fr.grid.event.CellEditorEvent; @@ -36,7 +35,6 @@ import javax.swing.plaf.ComponentUI; import java.awt.*; import java.awt.event.MouseEvent; import java.awt.geom.Point2D; -import java.util.Date; import java.util.Hashtable; import java.util.Iterator; @@ -57,7 +55,7 @@ public class Grid extends BaseGridComponent { transient private TemplateCellElement editingCellElement; private boolean showGridLine = true; - private Color gridLineColor = new Color(0xf0f0f3); // line color. + private Color gridLineColor = UIConstants.RULER_LINE_COLOR; // line color. private boolean isShowPaginateLine = true; private Color paginationLineColor = Color.RED; // line color of paper @@ -146,12 +144,10 @@ public class Grid extends BaseGridComponent { } /** - * 应用界面设置 - * - * - * @date 2014-12-21-下午6:32:43 - * - */ + * 应用界面设置 + * + * @date 2014-12-21-下午6:32:43 + */ public void updateUI() { GridUIProcessor localGridUIProcessor = ExtraDesignClassManager.getInstance().getSingle(GridUIProcessor.MARK_STRING, new DefaultGridUIProcessor()); ComponentUI localComponentUI = localGridUIProcessor.appearanceForGrid(this.resolution); @@ -160,14 +156,11 @@ public class Grid extends BaseGridComponent { /** - * 是否显示格子线 - * - * @return 是否显示格子线 - * - * - * @date 2014-12-21-下午6:32:13 - * - */ + * 是否显示格子线 + * + * @return 是否显示格子线 + * @date 2014-12-21-下午6:32:13 + */ public boolean isShowGridLine() { return showGridLine; } @@ -183,7 +176,7 @@ public class Grid extends BaseGridComponent { this.getElementCasePane().repaint(); } - public GridMouseAdapter getGridMouseAdapter(){ + public GridMouseAdapter getGridMouseAdapter() { return this.gridMouseAdapter; } @@ -210,14 +203,11 @@ public class Grid extends BaseGridComponent { } /** - * 是否显示分页线 - * - * @return 是否显示分页线 - * - * - * @date 2014-12-21-下午6:31:45 - * - */ + * 是否显示分页线 + * + * @return 是否显示分页线 + * @date 2014-12-21-下午6:31:45 + */ public boolean isShowPaginateLine() { return isShowPaginateLine; } @@ -253,14 +243,11 @@ public class Grid extends BaseGridComponent { /** - * 是否显示垂直冻结线 - * - * @return 是否显示垂直冻结线 - * - * - * @date 2014-12-21-下午6:29:35 - * - */ + * 是否显示垂直冻结线 + * + * @return 是否显示垂直冻结线 + * @date 2014-12-21-下午6:29:35 + */ public boolean isShowVerticalFrozenLine() { return isShowVerticalFrozenLine; } @@ -295,14 +282,11 @@ public class Grid extends BaseGridComponent { } /** - * 是否显示水平冻结线 - * - * @return 是否显示水平冻结线 - * - * - * @date 2014-12-21-下午6:29:35 - * - */ + * 是否显示水平冻结线 + * + * @return 是否显示水平冻结线 + * @date 2014-12-21-下午6:29:35 + */ public boolean isShowHorizontalFrozenLine() { return isShowHorizontalFrozenLine; } @@ -377,14 +361,11 @@ public class Grid extends BaseGridComponent { } /** - * 组件是否可以被编辑 - * - * @return 组件是否可以被编辑 - * - * - * @date 2014-12-21-下午6:29:09 - * - */ + * 组件是否可以被编辑 + * + * @return 组件是否可以被编辑 + * @date 2014-12-21-下午6:29:09 + */ public boolean isEditable() { return editable; } @@ -501,27 +482,21 @@ public class Grid extends BaseGridComponent { // /////////////editor begin /** - * 是否处于编辑状态 - * - * @return 是否处于编辑状态 - * - * - * @date 2014-12-21-下午6:28:45 - * - */ + * 是否处于编辑状态 + * + * @return 是否处于编辑状态 + * @date 2014-12-21-下午6:28:45 + */ public boolean isEditing() { return this.editorComponent != null; } /** - * 当前编辑对象是否为单元格 - * - * @return 当前编辑对象是否为单元格 - * - * - * @date 2014-12-21-下午6:28:18 - * - */ + * 当前编辑对象是否为单元格 + * + * @return 当前编辑对象是否为单元格 + * @date 2014-12-21-下午6:28:18 + */ public boolean isCellEditing() { return this.isEditing() && cellEditor != null && notShowingTableSelectPane; } @@ -534,27 +509,21 @@ public class Grid extends BaseGridComponent { } /** - * 是否处于智能选择单元格阶段 - * - * @return 是否处于智能选择单元格阶段 - * - * - * @date 2014-12-21-下午6:27:36 - * - */ + * 是否处于智能选择单元格阶段 + * + * @return 是否处于智能选择单元格阶段 + * @date 2014-12-21-下午6:27:36 + */ public boolean IsNotShowingTableSelectPane() { return this.notShowingTableSelectPane; } /** - * 当前是否在编辑悬浮元素 - * - * @return 是否在编辑悬浮元素 - * - * - * @date 2014-12-21-下午6:26:46 - * - */ + * 当前是否在编辑悬浮元素 + * + * @return 是否在编辑悬浮元素 + * @date 2014-12-21-下午6:26:46 + */ public boolean isFloatEditing() { return this.isEditing() && floatEditor != null; } @@ -566,7 +535,7 @@ public class Grid extends BaseGridComponent { * @param column the column of the cell to edit, where 0 is the first column; * @param row the row of the cell to edit, where 0 is the first row * @return the editor for this cell; if null return the default - * editor for this type of cell + * editor for this type of cell * @see com.fr.design.cell.editor.CellEditor */ public CellEditor getCellEditor(int column, int row) { @@ -598,7 +567,7 @@ public class Grid extends BaseGridComponent { * edited. If nothing is being edited, returns -1. * * @return the index of the column that contains the cell currently being - * edited; returns -1 if nothing being edited + * edited; returns -1 if nothing being edited */ public int getEditingColumn() { return editingColumn; @@ -618,7 +587,7 @@ public class Grid extends BaseGridComponent { * If nothing is being edited, returns -1. * * @return the index of the row that contains the cell currently being - * edited; returns -1 if nothing being edited + * edited; returns -1 if nothing being edited */ public int getEditingRow() { return editingRow; @@ -800,25 +769,20 @@ public class Grid extends BaseGridComponent { } /** - * 开始单元格编辑 - * - * - * @date 2014-12-21-下午6:25:17 - * - */ + * 开始单元格编辑 + * + * @date 2014-12-21-下午6:25:17 + */ public void startEditing() { this.startEditing(false); } /** - * 开始单元格编辑 - * - * @param byKeyEvent 是否为键盘触发 - * - * - * @date 2014-12-21-下午6:25:17 - * - */ + * 开始单元格编辑 + * + * @param byKeyEvent 是否为键盘触发 + * @date 2014-12-21-下午6:25:17 + */ protected void startEditing(boolean byKeyEvent) { ElementCasePane reportPane = this.getElementCasePane(); ElementCase report = reportPane.getEditingElementCase(); @@ -867,19 +831,15 @@ public class Grid extends BaseGridComponent { } /** - * 开始单元格编辑 - * - * @param column 列 - * @param row 行 - * @param cellTypeClass 单元格类型 - * @param byKeyEvent 是否为键盘触发 - * - * @return 编辑是否成功 - * - * - * @date 2014-12-21-下午6:25:17 - * - */ + * 开始单元格编辑 + * + * @param column 列 + * @param row 行 + * @param cellTypeClass 单元格类型 + * @param byKeyEvent 是否为键盘触发 + * @return 编辑是否成功 + * @date 2014-12-21-下午6:25:17 + */ public boolean startCellEditingAt_DEC(int column, int row, Class cellTypeClass, boolean byKeyEvent) { if (this.isEditing()) { this.stopEditing();// 需要先停止正在进行的编辑. @@ -954,12 +914,10 @@ public class Grid extends BaseGridComponent { } /** - * 停止编辑状态 - * - * - * @date 2014-12-21-下午6:24:54 - * - */ + * 停止编辑状态 + * + * @date 2014-12-21-下午6:24:54 + */ public void stopEditing() { // 首先判断是哪种类型的编辑. if (this.isCellEditing()) { @@ -1117,11 +1075,11 @@ public class Grid extends BaseGridComponent { if (styleChange || imageChange) { return true; } - } else { - if(newValue instanceof RichText){ - setShowAsHtml(this.editingCellElement); - } - + } else { + if (newValue instanceof RichText) { + setShowAsHtml(this.editingCellElement); + } + Object oldValue = this.editingCellElement.getValue(); if (!ComparatorUtils.equals_exactly(oldValue, newValue)) { editingCellElement.setValue(newValue); @@ -1130,16 +1088,16 @@ public class Grid extends BaseGridComponent { } return false; } - - private void setShowAsHtml(CellElement cellElement){ - CellGUIAttr guiAttr = cellElement.getCellGUIAttr(); - if(guiAttr == null){ - guiAttr = new CellGUIAttr(); - cellElement.setCellGUIAttr(guiAttr); - } - - guiAttr.setShowAsHTML(true); - } + + private void setShowAsHtml(CellElement cellElement) { + CellGUIAttr guiAttr = cellElement.getCellGUIAttr(); + if (guiAttr == null) { + guiAttr = new CellGUIAttr(); + cellElement.setCellGUIAttr(guiAttr); + } + + guiAttr.setShowAsHTML(true); + } /** * 当单元格里的内容过长时,自动调整单元格 @@ -1148,34 +1106,32 @@ public class Grid extends BaseGridComponent { */ private void shrinkToFit(TemplateElementCase tplEC) { if (editingCellElement == null) { - return; + return; } - + Object editElementValue = editingCellElement.getValue(); if (valueNeedFit(editElementValue)) { - int mode = this.getElementCasePane().getReportSettings().getShrinkToFitMode(); + int mode = this.getElementCasePane().getReportSettings().getShrinkToFitMode(); GridUtils.shrinkToFit(mode, tplEC, editingCellElement); } } - + //是否需要根据内容自动调整, 目前只有字符串, 数字, 富文本需要 - private boolean valueNeedFit(Object value){ - if(value == null){ - return false; - } - - return value instanceof String || - value instanceof Number || - value instanceof RichText; - } - - /** - * 取消编辑状态 - * - * - * @date 2014-12-21-下午6:24:34 - * - */ + private boolean valueNeedFit(Object value) { + if (value == null) { + return false; + } + + return value instanceof String || + value instanceof Number || + value instanceof RichText; + } + + /** + * 取消编辑状态 + * + * @date 2014-12-21-下午6:24:34 + */ public void cancelEditing() { if (this.isEditing()) { removeEditor(); @@ -1184,12 +1140,10 @@ public class Grid extends BaseGridComponent { } /** - * 移除选中组件 - * - * - * @date 2014-12-21-下午6:24:16 - * - */ + * 移除选中组件 + * + * @date 2014-12-21-下午6:24:16 + */ public void removeEditor() { if (this.isCellEditing()) { this.removeCellEditor(); @@ -1199,12 +1153,10 @@ public class Grid extends BaseGridComponent { } /** - * 移除单元格组件 - * - * - * @date 2014-12-21-下午6:24:00 - * - */ + * 移除单元格组件 + * + * @date 2014-12-21-下午6:24:00 + */ public void removeCellEditor() { CellEditor cellEditor = getCellEditor(); if (cellEditor == null) { @@ -1233,12 +1185,10 @@ public class Grid extends BaseGridComponent { } /** - * 移除悬浮元素组件 - * - * - * @date 2014-12-21-下午6:23:38 - * - */ + * 移除悬浮元素组件 + * + * @date 2014-12-21-下午6:23:38 + */ public void removeFloatEditor() { FloatEditor floatEditor = getFloatEditor(); if (floatEditor != null) { @@ -1290,31 +1240,24 @@ public class Grid extends BaseGridComponent { // /////////////editor end /** - * 鼠标点击事件 - * - * @param evtX x坐标 - * @param evtY y坐标 - * - * - * @date 2014-12-21-下午6:22:56 - * - */ + * 鼠标点击事件 + * + * @param evtX x坐标 + * @param evtY y坐标 + * @date 2014-12-21-下午6:22:56 + */ public void doMousePress(double evtX, double evtY) { dispatchEvent(new MouseEvent(this, MouseEvent.MOUSE_PRESSED, System.currentTimeMillis(), 0, (int) evtX, (int) evtY, 1, false)); } /** * 计算oldRectangle,因为CellElement的合并会变成多大的区域. - * - * @param report 当前格子报表 - * @param oldRectangle 之前的选中区域 - * - * @return 插入的区域 - * - * - * @date 2014-12-21-下午6:22:21 - * - */ + * + * @param report 当前格子报表 + * @param oldRectangle 之前的选中区域 + * @return 插入的区域 + * @date 2014-12-21-下午6:22:21 + */ public Rectangle caculateIntersectsUnion(ElementCase report, Rectangle oldRectangle) { Rectangle newRectangle = new Rectangle(oldRectangle); diff --git a/designer/src/com/fr/grid/GridHeader.java b/designer/src/com/fr/grid/GridHeader.java index e5f7be0030..e27bf97359 100644 --- a/designer/src/com/fr/grid/GridHeader.java +++ b/designer/src/com/fr/grid/GridHeader.java @@ -1,5 +1,7 @@ package com.fr.grid; +import com.fr.design.constants.UIConstants; + import java.awt.*; @@ -7,7 +9,7 @@ public abstract class GridHeader extends BaseGridComponent { public final static int SIZE_ADJUST = 4; //属性 - private Color separatorLineColor = new Color(172, 168, 153); //separator lines + private Color separatorLineColor = UIConstants.RULER_LINE_COLOR; //separator lines private Color selectedForeground = Color.black; private Color selectedBackground = new Color(208, 240, 252); From ee554425edcc1358d52bf976ae36d47f6d617f5d Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 20 Sep 2017 18:24:15 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E6=95=B0=E5=80=BC=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E6=8C=89=E9=92=AE=E9=A2=9C=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 | 3 +- .../com/fr/design/gui/ispinner/UISpinner.java | 42 ++++++++++++++++++- 2 files changed, 43 insertions(+), 2 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 74168e7d2c..f55a732896 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java @@ -60,6 +60,7 @@ public class UIButtonUI extends BasicButtonUI { private void paintContent(Graphics g, AbstractButton b, String text) { if (b.getIcon() != null) { + g.setColor(Color.red); paintIcon(g, b); } if (!StringUtils.isEmpty(text)) { @@ -160,7 +161,7 @@ public class UIButtonUI extends BasicButtonUI { paintModelIcon(model, icon, g, c); } - private void paintModelIcon(ButtonModel model, Icon icon, Graphics g, JComponent c) { + protected void paintModelIcon(ButtonModel model, Icon icon, Graphics g, JComponent c) { if (model.isPressed() && model.isArmed()) { icon.paintIcon(c, g, iconRec.x + getTextShiftOffset(), iconRec.y + getTextShiftOffset()); diff --git a/designer_base/src/com/fr/design/gui/ispinner/UISpinner.java b/designer_base/src/com/fr/design/gui/ispinner/UISpinner.java index 124a1acf34..2ffd53e19f 100644 --- a/designer_base/src/com/fr/design/gui/ispinner/UISpinner.java +++ b/designer_base/src/com/fr/design/gui/ispinner/UISpinner.java @@ -6,8 +6,9 @@ import com.fr.design.event.GlobalNameObserver; import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserverListener; import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ibutton.UIButtonUI; import com.fr.design.gui.itextfield.UINumberField; -import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.design.utils.gui.GUIPaintUtils; import com.fr.stable.Constants; import com.fr.stable.StringUtils; @@ -16,6 +17,7 @@ import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; +import javax.swing.plaf.ButtonUI; import java.awt.*; import java.awt.event.*; @@ -164,6 +166,34 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver } } + private class ButtionUI extends UIButtonUI { + private boolean isNormalPaint = true; + + @Override + protected void doExtraPainting(UIButton b, Graphics2D g2d, int w, int h, String selectedRoles) { + if (isPressed(b) && b.isPressedPainted()) { + isNormalPaint = false; + Color pressColor = UIConstants.COMBOBOX_BTN_PRESS; + GUIPaintUtils.fillPressed(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), pressColor); + } else if (isRollOver(b)) { + isNormalPaint = false; + Color hoverColor = UIConstants.COMBOBOX_BTN_ROLLOVER; + GUIPaintUtils.fillRollOver(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted(), hoverColor); + } else if (b.isNormalPainted()) { + isNormalPaint = true; + GUIPaintUtils.fillNormal(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted()); + } + } + + @Override + protected void paintModelIcon(ButtonModel model, Icon icon, Graphics g, JComponent c) { + if (isNormalPaint) { + g.setColor(UIConstants.COMBOBOX_BTN_NORMAL); + g.fillRect(0, 0, c.getWidth(), c.getHeight()); + } + super.paintModelIcon(model, icon, g, c); + } + } private void initComponents() { textField = initNumberField(); @@ -174,12 +204,22 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver public boolean shouldResponseChangeListener() { return false; } + + @Override + public ButtonUI getUI() { + return new ButtionUI(); + } }; preButton.setRoundBorder(true, Constants.LEFT); nextButton = new UIButton(UIConstants.ARROW_DOWN_ICON) { public boolean shouldResponseChangeListener() { return false; } + + @Override + public ButtonUI getUI() { + return new ButtionUI(); + } }; nextButton.setRoundBorder(true, Constants.LEFT); setLayout(new BorderLayout()); From 963d3e46da65e4f633221502707157ceaf2890df Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 20 Sep 2017 18:25:34 +0800 Subject: [PATCH 9/9] tmp --- designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java | 1 - 1 file changed, 1 deletion(-) 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 f55a732896..a93841ff32 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java @@ -60,7 +60,6 @@ public class UIButtonUI extends BasicButtonUI { private void paintContent(Graphics g, AbstractButton b, String text) { if (b.getIcon() != null) { - g.setColor(Color.red); paintIcon(g, b); } if (!StringUtils.isEmpty(text)) {