|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.LookAndFeel
javax.swing.plaf.basic.BasicLookAndFeel
javax.swing.plaf.synth.SynthLookAndFeel
public class SynthLookAndFeel
A look and feel that can be customized either by providing a file to
load(java.io.InputStream, java.lang.Class>)
or by setting a SynthStyleFactory
using
setStyleFactory(javax.swing.plaf.synth.SynthStyleFactory)
.
Constructor Summary | |
---|---|
SynthLookAndFeel()
Creates a new instance of SynthLookAndFeel . |
Method Summary | |
---|---|
static ComponentUI |
createUI(JComponent c)
Creates the Synth look and feel component UI instance for the given component. |
UIDefaults |
getDefaults()
Returns the UI defaults of this look and feel. |
String |
getDescription()
Returns a textual description of the Synth look and feel. |
String |
getID()
Returns the ID of the Synth look and feel. |
String |
getName()
Returns the name of the Synth look and feel. |
static Region |
getRegion(JComponent c)
Returns the region for a given Swing component. |
static SynthStyle |
getStyle(JComponent c,
Region r)
Returns the style for the specified component and region. |
static SynthStyleFactory |
getStyleFactory()
Returns the current style factory that the UI classes of Synth will use to load their sets of styles. |
void |
initialize()
Initializes this look and feel. |
boolean |
isNativeLookAndFeel()
Returns false since the Synth look and feel is not a native
look and feel. |
boolean |
isSupportedLookAndFeel()
Returns true since the Synth look and feel is always a
supported look and feel. |
void |
load(InputStream in,
Class<?> resourceBase)
Loads a set of SynthStyle s that are used for the look and feel of
the components. |
static void |
setStyleFactory(SynthStyleFactory sf)
Sets the style factory that the UI classes of Synth will use to load their sets of styles. |
boolean |
shouldUpdateStyleOnAncestorChanged()
FIXME: DOCUMENT ME! |
void |
uninitialize()
Uninitializes the look and feel. |
static void |
updateStyles(Component c)
Updates all style information of the component and it's children. |
Methods inherited from class javax.swing.plaf.basic.BasicLookAndFeel |
---|
createAudioAction, getAudioActionMap, initClassDefaults, initComponentDefaults, initSystemColorDefaults, loadSystemColors, playSound |
Methods inherited from class javax.swing.LookAndFeel |
---|
getDesktopPropertyValue, getSupportsWindowDecorations, installBorder, installColors, installColorsAndFont, installProperty, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, provideErrorFeedback, toString, uninstallBorder |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SynthLookAndFeel()
SynthLookAndFeel
. In order to use
the Synth look and feel you either need to call load(java.io.InputStream, java.lang.Class>)
to load a
set of styles from an XML file, or you need to call
setStyleFactory(javax.swing.plaf.synth.SynthStyleFactory)
to provide your own style factory.
Method Detail |
---|
public static void setStyleFactory(SynthStyleFactory sf)
sf
- the style factory to setpublic static SynthStyleFactory getStyleFactory()
public static SynthStyle getStyle(JComponent c, Region r)
c
- the component for which to return the styler
- the region of the component for which to return the style
public static void updateStyles(Component c) throws NotImplementedException
c
- the componenent for which to update the style
NotImplementedException
public static Region getRegion(JComponent c) throws NotImplementedException
c
- the Swing component for which to fetch the region
NotImplementedException
public static ComponentUI createUI(JComponent c) throws NotImplementedException
c
- the component for which to create a UI instance
NotImplementedException
public void initialize() throws NotImplementedException
initialize
in class BasicLookAndFeel
NotImplementedException
public void uninitialize() throws NotImplementedException
uninitialize
in class BasicLookAndFeel
NotImplementedException
public UIDefaults getDefaults() throws NotImplementedException
getDefaults
in class BasicLookAndFeel
NotImplementedException
public boolean shouldUpdateStyleOnAncestorChanged() throws NotImplementedException
NotImplementedException
public void load(InputStream in, Class<?> resourceBase) throws ParseException, IllegalArgumentException, NotImplementedException
SynthStyle
s that are used for the look and feel of
the components. The resourceBase
parameter is used to resolve
references against, like icons and other files.
in
- the input stream from where to load the stylesresourceBase
- the base against which references are resolved.
ParseException
- if the input stream cannot be parsed
IllegalArgumentException
- if one of the parameters is
null
NotImplementedException
public String getDescription()
getDescription
in class LookAndFeel
public String getID()
getID
in class LookAndFeel
public String getName()
getName
in class LookAndFeel
public boolean isNativeLookAndFeel()
false
since the Synth look and feel is not a native
look and feel.
isNativeLookAndFeel
in class LookAndFeel
false
public boolean isSupportedLookAndFeel()
true
since the Synth look and feel is always a
supported look and feel.
isSupportedLookAndFeel
in class LookAndFeel
true
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |