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

Fixed java programmint style nit

Reviewed-by: jbachorik, sspitsyn
This commit is contained in:
Dmitry Samersoff 2015-04-07 03:04:29 -07:00
parent d4c484b0ba
commit f84a0d02b9
2 changed files with 21 additions and 16 deletions

View File

@ -46,7 +46,7 @@ public abstract class CommonToolBar extends JToolBar
{
this.manager = manager;
statusBar = status;
buttonSize = new Dimension(CommonUI.buttconPrefSize);
buttonSize = new Dimension(CommonUI.getButtconPrefSize());
buttonInsets = new Insets(0, 0, 0, 0);
addComponents();
}

View File

@ -373,20 +373,25 @@ public class CommonUI
comp.setCursor(Cursor.getPredefinedCursor(0));
}
public static final int BUTTON_WIDTH = 100;
public static final int BUTTON_HEIGHT = 26;
public static final int BUTTCON_WIDTH = 28;
public static final int BUTTCON_HEIGHT = 28;
public static final int SM_BUTTON_WIDTH = 72;
public static final int SM_BUTTON_HEIGHT = 26;
public static final int LABEL_WIDTH = 100;
public static final int LABEL_HEIGHT = 20;
public static final int TEXT_WIDTH = 150;
public static final int TEXT_HEIGHT = 20;
public static Dimension buttonPrefSize = new Dimension(100, 26);
public static Dimension buttconPrefSize = new Dimension(28, 28);
public static Dimension smbuttonPrefSize = new Dimension(72, 26);
public static Dimension labelPrefSize = new Dimension(100, 20);
public static Dimension textPrefSize = new Dimension(150, 20);
public static Dimension getButtconPrefSize()
{
return buttconPrefSize;
}
private static final int BUTTON_WIDTH = 100;
private static final int BUTTON_HEIGHT = 26;
private static final int BUTTCON_WIDTH = 28;
private static final int BUTTCON_HEIGHT = 28;
private static final int SM_BUTTON_WIDTH = 72;
private static final int SM_BUTTON_HEIGHT = 26;
private static final int LABEL_WIDTH = 100;
private static final int LABEL_HEIGHT = 20;
private static final int TEXT_WIDTH = 150;
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);
}