Package adams.gui.laf
Class AbstractLookAndFeel
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.laf.AbstractLookAndFeel
-
- All Implemented Interfaces:
LoggingSupporter,SizeOfHandler,Serializable
- Direct Known Subclasses:
AbstractFlatLaf,AbstractSimpleLookAndFeel
public abstract class AbstractLookAndFeel extends LoggingObject
Ancestor for look and feels.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringFILENAMEstatic StringKEY_LOOKANDFEELprotected static AbstractLookAndFeelm_Currentthe current look and feel.-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractLookAndFeel()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voiddoInstall()Installs the look and feel.static AbstractLookAndFeelgetCurrent()Returns the currently installed look and feel.static Class[]getLookAndFeels()Returns the available look and feel classes.abstract StringgetName()Returns the name for this look and feel.protected static StringgetPropertiesFilename()Returns the properties filename.static booleanhasCurrent()Whether a look and feel has been installed.booleaninstall()Installs the look and feel.static voidinstallLookAndFeel()Installs the preferred look and feel or, if not defined, the default one.static voidinstallLookAndFeel(AbstractLookAndFeel laf)Installs the specified look and feel.abstract booleanisAvailable()Checks whether the look and feel is available.booleanisFlat()Returns whether the Look'n'Feel has a flat or 3D visual appearance.-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
FILENAME
public static final String FILENAME
- See Also:
- Constant Field Values
-
KEY_LOOKANDFEEL
public static final String KEY_LOOKANDFEEL
- See Also:
- Constant Field Values
-
m_Current
protected static AbstractLookAndFeel m_Current
the current look and feel.
-
-
Method Detail
-
getName
public abstract String getName()
Returns the name for this look and feel.- Returns:
- the name
-
isFlat
public boolean isFlat()
Returns whether the Look'n'Feel has a flat or 3D visual appearance.- Returns:
- true if flat
-
isAvailable
public abstract boolean isAvailable()
Checks whether the look and feel is available.- Returns:
- true if available
-
doInstall
public abstract void doInstall() throws ExceptionInstalls the look and feel.- Throws:
Exception- if installation fails
-
install
public boolean install()
Installs the look and feel.- Returns:
- true if successful
-
getPropertiesFilename
protected static String getPropertiesFilename()
Returns the properties filename.- Returns:
- the filename to use
-
installLookAndFeel
public static void installLookAndFeel(AbstractLookAndFeel laf)
Installs the specified look and feel. If successful, uses this one as default from now on.- Parameters:
laf- the look and feel to use from now on
-
installLookAndFeel
public static void installLookAndFeel()
Installs the preferred look and feel or, if not defined, the default one.
-
getLookAndFeels
public static Class[] getLookAndFeels()
Returns the available look and feel classes.- Returns:
- the look and feels
-
hasCurrent
public static boolean hasCurrent()
Whether a look and feel has been installed.- Returns:
- true if look and feel available
-
getCurrent
public static AbstractLookAndFeel getCurrent()
Returns the currently installed look and feel.- Returns:
- the look and feel
-
-