Code polish

This commit is contained in:
nathan 2017-07-08 23:57:06 +02:00
parent 1dca0e63dc
commit 69b88053e4
2 changed files with 9 additions and 3 deletions

View File

@ -34,6 +34,7 @@ import java.util.Enumeration;
/**
* Java Font utilities
*/
@SuppressWarnings("unused")
public
class FontUtil {
/** Default location where all the fonts are stored */

View File

@ -45,6 +45,7 @@ import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
@SuppressWarnings("unused")
public
class SwingUtil {
static {
@ -67,7 +68,11 @@ class SwingUtil {
*/
public static
void setLookAndFeel(final Class<?> lookAndFeel) {
setLookAndFeel(lookAndFeel.getName());
if (lookAndFeel == null) {
setLookAndFeelByName(null);
} else {
setLookAndFeelByName(lookAndFeel.getName());
}
}
@ -81,7 +86,7 @@ class SwingUtil {
* @param lookAndFeel the simple name or null for the system default
*/
public static
void setLookAndFeel(final String lookAndFeel) {
void setLookAndFeelByName(final String lookAndFeel) {
if (lookAndFeel == null) {
try {
// NOTE: On Linux + swing if the SystemLookAndFeel is the GtkLookAndFeel, this will cause GTK2 to get loaded first, which
@ -238,7 +243,7 @@ class SwingUtil {
int height = (int) button.getPreferredSize()
.getHeight();
// System.out.println(imageIcon.getIconHeight() + "x" + imageIcon.getIconHeight() + " icon \t>>>>>>>>> " + height + "px tall item");
// System.err.println(imageIcon.getIconHeight() + "x" + imageIcon.getIconHeight() + " icon \t>>>>>>>>> " + height + "px tall item")
if (minHeight == 0) {
minHeight = height;