java.lang.Object javax.swing.LookAndFeel javax.swing.plaf.basic.BasicLookAndFeel javax.swing.plaf.synth.SynthLookAndFeel
public class SynthLookAndFeel
SynthLookAndFeel provides the basis for creating a customized look and feel. SynthLookAndFeel does not directly provide a look, all painting is delegated. You need to either provide a configuration file, by way of the load(java.io.InputStream, java.lang.Class> ) method, or provide your own SynthStyleFactory to setStyleFactory(javax.swing.plaf.synth.SynthStyleFactory) . Refer to the package summary for an example of loading a file, and SynthStyleFactory for an example of providing your own SynthStyleFactory to setStyleFactory.
Warning: This class implements Serializable as a side effect of it extending BasicLookAndFeel . It is not intended to be serialized. An attempt to serialize it will result in NotSerializableException .
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 SynthStyles that will be used by this SynthLookAndFeel. |
void |
load
(
URL
url) Loads the set of SynthStyles 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 , getLayoutStyle , 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 SynthStyles, or invoke setStyleFactory.
Method Detail |
---|
public static void setStyleFactory(SynthStyleFactory cache)
public static SynthStyleFactory getStyleFactory()
public static SynthStyle getStyle(JComponent c, Region region)
public static void updateStyles(Component c)
public static Region getRegion(JComponent c)
public static ComponentUI createUI(JComponent c)
public void load(InputStream input, Class<?> resourceBase) throws ParseException
public void load(URL url) throws ParseException, IOException
public void initialize()
public void uninitialize()
public UIDefaults getDefaults()
public boolean isSupportedLookAndFeel()
public boolean isNativeLookAndFeel()
public String getDescription()
public String getName()
public String getID()
public boolean shouldUpdateStyleOnAncestorChanged()