Package weka.gui

# Class LookAndFeel

java.lang.Object
weka.gui.LookAndFeel

public class LookAndFeel extends Object
A little helper class for setting the Look and Feel of the user interface. Was necessary, since Java 1.5 sometimes crashed the WEKA GUI (e.g. under Linux/Gnome). Running this class from the commandline will print all available Look and Feel themes.

Version:
  $Revision: 15923 $
Author:
  FracPete (fracpete at waikato dot ac dot nz)

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static String`
  `PROPERTY_FILE`
  The name of the properties file

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LookAndFeel()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static List<String>`
  `getAvailableLookAndFeelClasses()`
  Get a list of fully qualified class names of available look and feels
  `static String[]`
  `getInstalledLookAndFeels()`
  returns an array with the classnames of all the installed LnFs
  `static String`
  `getSystemLookAndFeel()`
  returns the system LnF classname
  `static void`
  `main(String[] args)`
  prints all the available LnFs to stdout
  `static boolean`
  `setLookAndFeel()`
  sets the look and feel to the one in the props-file or if not set the default one of the system
  `static boolean`
  `setLookAndFeel(String classname)`
  sets the look and feel to the specified class
  `static void`
  `setLookAndFeel(String appID, String lookAndFeelKey, String defaultLookAndFeel)`
  Set the look and feel from loaded settings

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### PROPERTY_FILE

    public static String PROPERTY_FILE
    The name of the properties file

- ## Constructor Details

  - ### LookAndFeel

    public LookAndFeel()

- ## Method Details

  - ### getAvailableLookAndFeelClasses

    public static List<String> getAvailableLookAndFeelClasses()
    Get a list of fully qualified class names of available look and feels
    Returns:
      a list of look and feel class names that are available on this platform

  - ### setLookAndFeel

    public static boolean setLookAndFeel(String classname)
    sets the look and feel to the specified class
    Parameters:
      `classname` - the look and feel to use
    Returns:
      whether setting was successful

  - ### setLookAndFeel

    public static void setLookAndFeel(String appID, String lookAndFeelKey, String defaultLookAndFeel) throws IOException
    Set the look and feel from loaded settings
    Parameters:
      `appID` - the ID of the application to load settings for
      `lookAndFeelKey` - the key to look up the look and feel in the settings
    Throws:
      `IOException` - if a problem occurs when loading settings

  - ### setLookAndFeel

    public static boolean setLookAndFeel()
    sets the look and feel to the one in the props-file or if not set the default one of the system
    Returns:
      whether setting was successful

  - ### getSystemLookAndFeel

    public static String getSystemLookAndFeel()
    returns the system LnF classname
    Returns:
      the name of the System LnF class

  - ### getInstalledLookAndFeels

    public static String[] getInstalledLookAndFeels()
    returns an array with the classnames of all the installed LnFs
    Returns:
      the installed LnFs

  - ### main

    public static void main(String[] args)
    prints all the available LnFs to stdout
    Parameters:
      `args` - the commandline options