added commons-lang
This commit is contained in:
parent
268d505297
commit
5a4d6fbd7a
BIN
lib/commons-lang3-3.4.jar
Normal file
BIN
lib/commons-lang3-3.4.jar
Normal file
Binary file not shown.
@ -27,6 +27,8 @@ import java.awt.EventQueue;
|
|||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
@ -44,6 +46,32 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
public class SibaGUI
|
public class SibaGUI
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public static class GUIToolBox
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static List<String> availableLookAndFeels()
|
||||||
|
{
|
||||||
|
List<String> result;
|
||||||
|
|
||||||
|
//
|
||||||
|
result = new ArrayList<String>();
|
||||||
|
|
||||||
|
//
|
||||||
|
for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels())
|
||||||
|
{
|
||||||
|
//
|
||||||
|
result.add(info.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void main(final String[] args)
|
public static void main(final String[] args)
|
||||||
{
|
{
|
||||||
EventQueue.invokeLater(new Runnable()
|
EventQueue.invokeLater(new Runnable()
|
||||||
@ -101,11 +129,11 @@ public class SibaGUI
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Remove BOLD on default font.
|
// Remove BOLD on default font.
|
||||||
UIManager.put("swing.boldMetal", Boolean.TRUE);
|
UIManager.put("swing.boldMetal", Boolean.FALSE);
|
||||||
|
|
||||||
// Set LookAndFeel.
|
// Set LookAndFeel.
|
||||||
System.out.println("System lookAndFeel property:" + System.getProperty("swing.defaultlaf"));
|
System.out.println("System lookAndFeel property:" + System.getProperty("swing.defaultlaf"));
|
||||||
System.out.println("Available lookAndFeel: " + UIManager.getInstalledLookAndFeels().toString());
|
System.out.println("Available lookAndFeel: " + GUIToolBox.availableLookAndFeels().toString());
|
||||||
System.out.println("System lookAndFeel: " + UIManager.getSystemLookAndFeelClassName());
|
System.out.println("System lookAndFeel: " + UIManager.getSystemLookAndFeelClassName());
|
||||||
System.out.println("Current lookAndFeel: " + UIManager.getLookAndFeel().getName());
|
System.out.println("Current lookAndFeel: " + UIManager.getLookAndFeel().getName());
|
||||||
|
|
||||||
@ -121,7 +149,7 @@ public class SibaGUI
|
|||||||
System.out.println("Failed to set the system LookAndFeel.");
|
System.out.println("Failed to set the system LookAndFeel.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (UIManager.getInstalledLookAndFeels().toString().contains("GTK+"))
|
else if (GUIToolBox.availableLookAndFeels().toString().contains("GTK+"))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user