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 String
FILENAME
static String
KEY_LOOKANDFEEL
protected static AbstractLookAndFeel
m_Current
the 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 void
doInstall()
Installs the look and feel.static AbstractLookAndFeel
getCurrent()
Returns the currently installed look and feel.static Class[]
getLookAndFeels()
Returns the available look and feel classes.abstract String
getName()
Returns the name for this look and feel.protected static String
getPropertiesFilename()
Returns the properties filename.boolean
install()
Installs the look and feel.static void
installLookAndFeel()
Installs the preferred look and feel or, if not defined, the default one.static void
installLookAndFeel(AbstractLookAndFeel laf)
Installs the specified look and feel.abstract boolean
isAvailable()
Checks whether the look and feel is available.-
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
-
isAvailable
public abstract boolean isAvailable()
Checks whether the look and feel is available.- Returns:
- true if available
-
doInstall
public abstract void doInstall() throws Exception
Installs 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
-
getCurrent
public static AbstractLookAndFeel getCurrent()
Returns the currently installed look and feel.- Returns:
- the look and feel
-
-