|
Préférences
Moteurs de recherche
|
||||||||||||||||||||||||||||||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.5.0
javax.swing.plaf.synth
|
Constructor Summary | |
---|---|
SynthLookAndFeel()
Creates a SynthLookAndFeel. |
Method Summary | |
---|---|
static ComponentUI |
createUI(JComponent c)
Creates the Synth look and feel ComponentUI for
the passed in JComponent . |
UIDefaults |
getDefaults()
Returns the defaults for this SynthLookAndFeel. |
String |
getDescription()
Returns a textual description of SynthLookAndFeel. |
String |
getID()
Return a string that identifies this look and feel. |
String |
getName()
Return a short string that identifies this look and feel. |
static Region |
getRegion(JComponent c)
Returns the Region for the JComponent c . |
static SynthStyle |
getStyle(JComponent c,
Region region)
Gets a SynthStyle for the specified region of the specified component. |
static SynthStyleFactory |
getStyleFactory()
Returns the current SynthStyleFactory. |
void |
initialize()
Called by UIManager when this look and feel is installed. |
boolean |
isNativeLookAndFeel()
Returns false, SynthLookAndFeel is not a native look and feel. |
boolean |
isSupportedLookAndFeel()
Returns true, SynthLookAndFeel is always supported. |
void |
load(InputStream input,
Class<?> resourceBase)
Loads the set of SynthStyle s that will be used by
this SynthLookAndFeel . |
static void |
setStyleFactory(SynthStyleFactory cache)
Sets the SynthStyleFactory that the UI classes provided by synth will use to obtain a SynthStyle. |
boolean |
shouldUpdateStyleOnAncestorChanged()
Returns whether or not the UIs should update their SynthStyles from the SynthStyleFactory
when the ancestor of the JComponent changes. |
void |
uninitialize()
Called by UIManager when this look and feel is uninstalled. |
static void |
updateStyles(Component c)
Updates the style associated with c , and all its 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, getDisabledIcon, getDisabledSelectedIcon, 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()
For the returned SynthLookAndFeel
to be useful you need to
invoke load
to specify the set of
SynthStyle
s, or invoke setStyleFactory
.
Method Detail |
---|
public static void setStyleFactory(SynthStyleFactory cache)
cache
- SynthStyleFactory the UIs should use.public static SynthStyleFactory getStyleFactory()
public static SynthStyle getStyle(JComponent c, Region region)
c
- JComponent to get the SynthStyle forregion
- Identifies the region of the specified component
public static void updateStyles(Component c)
c
, and all its children.
This is a lighter version of
SwingUtilities.updateComponentTreeUI
.
c
- Component to update style for.public static Region getRegion(JComponent c)
c
.
c
- JComponent to fetch the Region for
c
public static ComponentUI createUI(JComponent c)
ComponentUI
for
the passed in JComponent
.
c
- JComponent to create the ComponentUI
for
c
public void load(InputStream input, Class<?> resourceBase) throws ParseException, IllegalArgumentException
SynthStyle
s that will be used by
this SynthLookAndFeel
. resourceBase
is
used to resolve any path based resources, for example an
Image
would be resolved by
resourceBase.getResource(path)
. Refer to
Synth File Format
for more information.
input
- InputStream to load fromresourceBase
- Used to resolve any images or other resources
ParseException
- If there is an error in parsing
IllegalArgumentException
- if input or resourceBase is nullpublic void initialize()
initialize
in class BasicLookAndFeel
public void uninitialize()
uninitialize
in class BasicLookAndFeel
LookAndFeel.initialize()
public UIDefaults getDefaults()
getDefaults
in class BasicLookAndFeel
LookAndFeel.initialize()
,
LookAndFeel.uninitialize()
,
UIManager.setLookAndFeel(javax.swing.LookAndFeel)
public boolean isSupportedLookAndFeel()
isSupportedLookAndFeel
in class LookAndFeel
UIManager.setLookAndFeel(javax.swing.LookAndFeel)
public boolean isNativeLookAndFeel()
isNativeLookAndFeel
in class LookAndFeel
public String getDescription()
getDescription
in class LookAndFeel
public String getName()
getName
in class LookAndFeel
public String getID()
getID
in class LookAndFeel
public boolean shouldUpdateStyleOnAncestorChanged()
SynthStyles
from the SynthStyleFactory
when the ancestor of the JComponent
changes. A subclass
that provided a SynthStyleFactory
that based the
return value from getStyle
off the containment hierarchy
would override this method to return true.
SynthStyles
from the SynthStyleFactory
when the ancestor changed.