Browse Source

sonar问题修复,无jira任务

research/11.0
pengda 5 years ago
parent
commit
b549b39027
  1. 2
      designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogHandlerBarUI.java
  2. 2
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionDialog.java
  3. 6
      designer-base/src/main/java/com/fr/design/style/background/impl/PatternBackgroundPane.java
  4. 8
      designer-base/src/main/java/com/fr/design/style/background/impl/TextureBackgroundPane.java

2
designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogHandlerBarUI.java

@ -69,7 +69,7 @@ public class LogHandlerBarUI extends ComponentUI implements MouseListener, Focus
int w = button.getWidth(); int w = button.getWidth();
int h = button.getHeight(); int h = button.getHeight();
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;
GradientPaint gp = new GradientPaint(1, 1, darkColor, 1, h - 1, darkColor); GradientPaint gp = new GradientPaint(1, 1, darkColor, 1, h - 1f, darkColor);
g2d.setPaint(gp); g2d.setPaint(gp);
g2d.fillRect(0, 0, w, h); g2d.fillRect(0, 0, w, h);
} }

2
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionDialog.java

@ -31,7 +31,7 @@ import java.util.List;
public class FileVersionDialog extends UIDialog { public class FileVersionDialog extends UIDialog {
public static final long DELAY = 24 * 60 * 60 * 1000; public static final long DELAY = 24 * 60 * 60 * 1000L;
private UIButton okBtn; private UIButton okBtn;
private UIButton cancelBtn; private UIButton cancelBtn;
private DateEditor dateEditor; private DateEditor dateEditor;

6
designer-base/src/main/java/com/fr/design/style/background/impl/PatternBackgroundPane.java

@ -159,15 +159,15 @@ public class PatternBackgroundPane extends BPane {
Dimension d = getSize(); Dimension d = getSize();
this.patternBackground.paint(g2d, new Rectangle2D.Double(0, 0, this.patternBackground.paint(g2d, new Rectangle2D.Double(0, 0,
d.width - 1, d.height - 1)); d.width - 1d, d.height - 1d));
if (this.pIndex == patternIndex) {// it's selected. if (this.pIndex == patternIndex) {// it's selected.
g2d.setPaint(new Color(255, 51, 0)); g2d.setPaint(new Color(255, 51, 0));
} else { } else {
g2d.setPaint(Color.gray); g2d.setPaint(Color.gray);
} }
GraphHelper.draw(g2d, new Rectangle2D.Double(0, 0, d.width - 1, GraphHelper.draw(g2d, new Rectangle2D.Double(0, 0, d.width - 1d,
d.height - 1)); d.height - 1d));
} }
public Dimension getPreferredSize() { public Dimension getPreferredSize() {

8
designer-base/src/main/java/com/fr/design/style/background/impl/TextureBackgroundPane.java

@ -152,8 +152,8 @@ public class TextureBackgroundPane extends BPane {
Dimension d = getSize(); Dimension d = getSize();
g2d.setPaint(this.buttonTexturePaint); g2d.setPaint(this.buttonTexturePaint);
GraphHelper.fill(g2d, new Rectangle2D.Double(0, 0, d.width - 1, GraphHelper.fill(g2d, new Rectangle2D.Double(0, 0, d.width - 1d,
d.height - 1)); d.height - 1d));
if (ComparatorUtils.equals(texturePaint, this.buttonTexturePaint)) {// it's if (ComparatorUtils.equals(texturePaint, this.buttonTexturePaint)) {// it's
// selected. // selected.
@ -161,8 +161,8 @@ public class TextureBackgroundPane extends BPane {
} else { } else {
g2d.setPaint(Color.gray); g2d.setPaint(Color.gray);
} }
GraphHelper.draw(g2d, new Rectangle2D.Double(0, 0, d.width - 1, GraphHelper.draw(g2d, new Rectangle2D.Double(0, 0, d.width - 1d,
d.height - 1)); d.height - 1d));
} }
public Dimension getPreferredSize() { public Dimension getPreferredSize() {

Loading…
Cancel
Save