提交 396c6fc8 编写于 作者: D dsamersoff

8067991: [Findbugs] SA com.sun.java.swing.ui.CommonUI some methods need final protect

Summary: Fixed java programmint style nit
Reviewed-by: jbachorik, sspitsyn
上级 98662158
...@@ -46,7 +46,7 @@ public abstract class CommonToolBar extends JToolBar ...@@ -46,7 +46,7 @@ public abstract class CommonToolBar extends JToolBar
{ {
this.manager = manager; this.manager = manager;
statusBar = status; statusBar = status;
buttonSize = new Dimension(CommonUI.buttconPrefSize); buttonSize = new Dimension(CommonUI.getButtconPrefSize());
buttonInsets = new Insets(0, 0, 0, 0); buttonInsets = new Insets(0, 0, 0, 0);
addComponents(); addComponents();
} }
......
...@@ -373,20 +373,25 @@ public class CommonUI ...@@ -373,20 +373,25 @@ public class CommonUI
comp.setCursor(Cursor.getPredefinedCursor(0)); comp.setCursor(Cursor.getPredefinedCursor(0));
} }
public static final int BUTTON_WIDTH = 100; public static Dimension getButtconPrefSize()
public static final int BUTTON_HEIGHT = 26; {
public static final int BUTTCON_WIDTH = 28; return buttconPrefSize;
public static final int BUTTCON_HEIGHT = 28; }
public static final int SM_BUTTON_WIDTH = 72;
public static final int SM_BUTTON_HEIGHT = 26; private static final int BUTTON_WIDTH = 100;
public static final int LABEL_WIDTH = 100; private static final int BUTTON_HEIGHT = 26;
public static final int LABEL_HEIGHT = 20; private static final int BUTTCON_WIDTH = 28;
public static final int TEXT_WIDTH = 150; private static final int BUTTCON_HEIGHT = 28;
public static final int TEXT_HEIGHT = 20; private static final int SM_BUTTON_WIDTH = 72;
public static Dimension buttonPrefSize = new Dimension(100, 26); private static final int SM_BUTTON_HEIGHT = 26;
public static Dimension buttconPrefSize = new Dimension(28, 28); private static final int LABEL_WIDTH = 100;
public static Dimension smbuttonPrefSize = new Dimension(72, 26); private static final int LABEL_HEIGHT = 20;
public static Dimension labelPrefSize = new Dimension(100, 20); private static final int TEXT_WIDTH = 150;
public static Dimension textPrefSize = new Dimension(150, 20); private static final int TEXT_HEIGHT = 20;
private static final Dimension buttonPrefSize = new Dimension(100, 26);
private static final Dimension buttconPrefSize = new Dimension(28, 28);
private static final Dimension smbuttonPrefSize = new Dimension(72, 26);
private static final Dimension labelPrefSize = new Dimension(100, 20);
private static final Dimension textPrefSize = new Dimension(150, 20);
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册