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.
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.
(*create-ui c)
Creates the Synth look and feel ComponentUI for the passed in JComponent.
c - JComponent to create the ComponentUI for - javax.swing.JComponent
returns: ComponentUI to use for c - javax.swing.plaf.ComponentUI
Creates the Synth look and feel ComponentUI for the passed in JComponent. c - JComponent to create the ComponentUI for - `javax.swing.JComponent` returns: ComponentUI to use for c - `javax.swing.plaf.ComponentUI`
(*get-region c)
Returns the Region for the JComponent c.
c - JComponent to fetch the Region for - javax.swing.JComponent
returns: Region corresponding to c - javax.swing.plaf.synth.Region
Returns the Region for the JComponent c. c - JComponent to fetch the Region for - `javax.swing.JComponent` returns: Region corresponding to c - `javax.swing.plaf.synth.Region`
(*get-style c region)
Gets a SynthStyle for the specified region of the specified component. This is not for general consumption, only custom UIs should call this method.
c - JComponent to get the SynthStyle for - javax.swing.JComponent
region - Identifies the region of the specified component - javax.swing.plaf.synth.Region
returns: SynthStyle to use. - javax.swing.plaf.synth.SynthStyle
Gets a SynthStyle for the specified region of the specified component. This is not for general consumption, only custom UIs should call this method. c - JComponent to get the SynthStyle for - `javax.swing.JComponent` region - Identifies the region of the specified component - `javax.swing.plaf.synth.Region` returns: SynthStyle to use. - `javax.swing.plaf.synth.SynthStyle`
(*get-style-factory)
Returns the current SynthStyleFactory.
returns: SynthStyleFactory - javax.swing.plaf.synth.SynthStyleFactory
Returns the current SynthStyleFactory. returns: SynthStyleFactory - `javax.swing.plaf.synth.SynthStyleFactory`
(*set-style-factory cache)
Sets the SynthStyleFactory that the UI classes provided by synth will use to obtain a SynthStyle.
cache - SynthStyleFactory the UIs should use. - javax.swing.plaf.synth.SynthStyleFactory
Sets the SynthStyleFactory that the UI classes provided by synth will use to obtain a SynthStyle. cache - SynthStyleFactory the UIs should use. - `javax.swing.plaf.synth.SynthStyleFactory`
(*update-styles c)
Updates the style associated with c, and all its children. This is a lighter version of SwingUtilities.updateComponentTreeUI.
c - Component to update style for. - java.awt.Component
Updates the style associated with c, and all its children. This is a lighter version of SwingUtilities.updateComponentTreeUI. c - Component to update style for. - `java.awt.Component`
(->synth-look-and-feel)
Constructor.
Creates a SynthLookAndFeel.
For the returned SynthLookAndFeel to be useful you need to invoke load to specify the set of SynthStyles, or invoke setStyleFactory.
Constructor. Creates a SynthLookAndFeel. For the returned SynthLookAndFeel to be useful you need to invoke load to specify the set of SynthStyles, or invoke setStyleFactory.
(get-defaults this)
Returns the defaults for this SynthLookAndFeel.
returns: Defaults table. - javax.swing.UIDefaults
Returns the defaults for this SynthLookAndFeel. returns: Defaults table. - `javax.swing.UIDefaults`
(get-description this)
Returns a textual description of SynthLookAndFeel.
returns: textual description of synth. - java.lang.String
Returns a textual description of SynthLookAndFeel. returns: textual description of synth. - `java.lang.String`
(get-id this)
Return a string that identifies this look and feel.
returns: a short string identifying this look and feel. - java.lang.String
Return a string that identifies this look and feel. returns: a short string identifying this look and feel. - `java.lang.String`
(get-name this)
Return a short string that identifies this look and feel.
returns: a short string identifying this look and feel. - java.lang.String
Return a short string that identifies this look and feel. returns: a short string identifying this look and feel. - `java.lang.String`
(initialize this)
Called by UIManager when this look and feel is installed.
Called by UIManager when this look and feel is installed.
(load this url)
(load this input resource-base)
Loads the set of SynthStyles 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 from - java.io.InputStream
resource-base - used to resolve any images or other resources - java.lang.Class
throws: java.text.ParseException - if there is an error in parsing
Loads the set of SynthStyles 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 from - `java.io.InputStream` resource-base - used to resolve any images or other resources - `java.lang.Class` throws: java.text.ParseException - if there is an error in parsing
(native-look-and-feel? this)
Returns false, SynthLookAndFeel is not a native look and feel.
returns: false - boolean
Returns false, SynthLookAndFeel is not a native look and feel. returns: false - `boolean`
(should-update-style-on-ancestor-changed? this)
Returns whether or not the UIs should update their 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.
returns: whether or not the UIs should update their
SynthStyles from the SynthStyleFactory
when the ancestor changed. - boolean
Returns whether or not the UIs should update their 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. returns: whether or not the UIs should update their SynthStyles from the SynthStyleFactory when the ancestor changed. - `boolean`
(supported-look-and-feel? this)
Returns true, SynthLookAndFeel is always supported.
returns: true. - boolean
Returns true, SynthLookAndFeel is always supported. returns: true. - `boolean`
(uninitialize this)
Called by UIManager when this look and feel is uninstalled.
Called by UIManager when this look and feel is uninstalled.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close