From 0f123963ee6d10535abf7b672405721654e6a139 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Fri, 15 Sep 2017 18:27:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E8=89=B2=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E5=9C=A8window=E7=B3=BB=E7=BB=9F=E4=B8=8Abug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/chart/gui/style/ChartAccColorPane.java | 9 +++------ .../mainframe/chart/gui/style/ChartFillStylePane.java | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartAccColorPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartAccColorPane.java index 50bfadc930..6fd4bcbae0 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartAccColorPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartAccColorPane.java @@ -16,7 +16,6 @@ import javax.swing.event.ChangeListener; import java.awt.*; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; -import java.awt.geom.Rectangle2D; /** * 图表颜色填充--32种精确颜色选择界面. @@ -65,11 +64,9 @@ public class ChartAccColorPane extends BasicPane implements MouseListener, UIObs public void paintComponent(Graphics g) { Graphics2D g2d = (Graphics2D) g; super.repaint(); - - Rectangle2D bounds = this.getBounds(); - if(bounds == null) { - return; - } + + this.setLayout(null); + this.setBounds(0,0,WIDTH*ROWCOUNT, WIDTH*4); Paint oldPaint = g2d.getPaint(); g2d.setPaint(new Color(212, 212, 216)); g2d.fillRect(0, 0, WIDTH*ROWCOUNT, WIDTH*4); diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java index 3eff5f6974..8f4dcf881d 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java @@ -94,7 +94,7 @@ public class ChartFillStylePane extends BasicBeanPane{ } protected void initLayout() { - customPane.setPreferredSize(new Dimension(200, 130)); + customPane.setPreferredSize(new Dimension(200, 100)); colorGradient.setPreferredSize(new Dimension(120, 30));