Code polish
This commit is contained in:
parent
1dca0e63dc
commit
69b88053e4
|
@ -34,6 +34,7 @@ import java.util.Enumeration;
|
||||||
/**
|
/**
|
||||||
* Java Font utilities
|
* Java Font utilities
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public
|
public
|
||||||
class FontUtil {
|
class FontUtil {
|
||||||
/** Default location where all the fonts are stored */
|
/** Default location where all the fonts are stored */
|
||||||
|
|
|
@ -45,6 +45,7 @@ import javax.swing.JOptionPane;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
import javax.swing.UIManager;
|
import javax.swing.UIManager;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public
|
public
|
||||||
class SwingUtil {
|
class SwingUtil {
|
||||||
static {
|
static {
|
||||||
|
@ -67,7 +68,11 @@ class SwingUtil {
|
||||||
*/
|
*/
|
||||||
public static
|
public static
|
||||||
void setLookAndFeel(final Class<?> lookAndFeel) {
|
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
|
* @param lookAndFeel the simple name or null for the system default
|
||||||
*/
|
*/
|
||||||
public static
|
public static
|
||||||
void setLookAndFeel(final String lookAndFeel) {
|
void setLookAndFeelByName(final String lookAndFeel) {
|
||||||
if (lookAndFeel == null) {
|
if (lookAndFeel == null) {
|
||||||
try {
|
try {
|
||||||
// NOTE: On Linux + swing if the SystemLookAndFeel is the GtkLookAndFeel, this will cause GTK2 to get loaded first, which
|
// 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()
|
int height = (int) button.getPreferredSize()
|
||||||
.getHeight();
|
.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) {
|
if (minHeight == 0) {
|
||||||
minHeight = height;
|
minHeight = height;
|
||||||
|
|
Loading…
Reference in New Issue