The NimbusLookAndFeel class.
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private static class | NimbusLookAndFeel.
Simple Symbolic Link style UIDefaults Property |
| private class | NimbusLookAndFeel.
Nimbus Property that looks up Nimbus keys for standard key names. |
| Modifier and Type | Field and Description |
|---|---|
| private Map | |
| private static final String[] | COMPONENT_KEYS
Set of standard region names for UIDefaults Keys |
| private boolean | |
| private NimbusDefaults | defaults
A reference to the auto-generated file NimbusDefaults. |
| private NimbusLookAndFeel. | |
| private UIDefaults | uiDefaults
Reference to populated LAD uidefaults |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| pack-priv static int | Returns: the ARGB value for a new color based on this derivationThe first color color1, Color The second color color2, float The offset between color 1 and color 2, a value of 0.0 is
color 1 and 1.0 is color 2; midPoint)Derives the ARGB value for a color based on an offset between two other colors. |
| public UIDefaults | getDefaults()
Overrides javax. Returns the defaults for this SynthLookAndFeel. |
| pack-priv Map | |
| public Color | Returns: The stored derived colorThe parent UIDefault key uiDefaultParentName, float The hue offset hOffset, float The saturation offset sOffset, float The brightness offset bOffset, int The alpha offset aOffset, boolean True if the derived color should be a
UIResource, false if it should not be uiResource)Get a derived color, derived colors are shared instances and is color value will change when its parent UIDefault color changes. |
| protected final Color | Returns: The derived colorThe first color color1, Color The second color color2, float The offset between color 1 and color 2, a value of 0.0 is
color 1 and 1.0 is color 2; midPoint, boolean True if the derived color should be a UIResource uiResource)Decodes and returns a color, which is derived from an offset between two other colors. |
| protected final Color | Returns: The derived color, which will be a UIResourceThe first color color1, Color The second color color2, float The offset between color 1 and color 2, a value of 0.0 is
color 1 and 1.0 is color 2; midPoint)Decodes and returns a color, which is derived from a offset between two other colors. |
| public String | Returns: textual description of this look and feel.Overrides javax. Returns a textual description of this look and feel. |
| public Icon | getDisabledIcon(JComponent component, Icon icon)
Overrides javax. Returns an |
| public String | Returns: a short string identifying this look and feel.Overrides javax. Return a string that identifies this look and feel. |
| public String | Returns: a short string identifying this look and feel.Overrides javax. Return a short string that identifies this look and feel. |
| public static NimbusStyle | Returns: a non-null reference to a NimbusStyle.a non-null reference to a JComponent c, Region a non-null reference to the region of the component c r)Hides javax. Gets the style associated with the given component and region. |
| public void | initialize()
Overrides javax. Called by UIManager when this look and feel is installed. |
| pack-priv static String | |
| public void | register(Region
The Synth Region that is being registered. Such as Button, or
ScrollBarThumb, or NimbusFooUI.FOO_REGION. region, String The UIDefault prefix. For example, could be ComboBox, or if
a named components, "MyComboBox", or even something like
ToolBar."MyComboBox"."ComboBox.arrowButton" prefix)Registers a third party component with the NimbusLookAndFeel. |
| pack-priv static Object | resolveToolbarConstraint(JToolBar toolbar)
Package private method which returns either BorderLayout.NORTH, BorderLayout.SOUTH, BorderLayout.EAST, or BorderLayout.WEST depending on the location of the toolbar in its parent. |
| public boolean | Returns: trueOverrides javax. Returns whether or not the UIs should update their
|
| protected boolean | shouldUpdateStyleOnEvent(PropertyChangeEvent ev)
Overrides javax. Returns whether or not the UIs should update their styles when a particular event occurs. |
| public void | uninitialize()
Overrides javax. Called by UIManager when this look and feel is uninstalled. |
| compiledDefaults | back to summary |
|---|---|
| private Map<String, Map<String, Object>> compiledDefaults | |
| COMPONENT_KEYS | back to summary |
|---|---|
| private static final String[] COMPONENT_KEYS Set of standard region names for UIDefaults Keys | |
| defaultListenerAdded | back to summary |
|---|---|
| private boolean defaultListenerAdded | |
| defaults | back to summary |
|---|---|
| private NimbusDefaults defaults A reference to the auto-generated file NimbusDefaults. This file contains the default mappings and values for the look and feel as specified in the visual designer. | |
| defaultsListener | back to summary |
|---|---|
| private NimbusLookAndFeel. | |
| uiDefaults | back to summary |
|---|---|
| private UIDefaults uiDefaults Reference to populated LAD uidefaults | |
| NimbusLookAndFeel | back to summary |
|---|---|
| public NimbusLookAndFeel() Create a new NimbusLookAndFeel. | |
| addDefault | back to summary |
|---|---|
| private void addDefault(String key, Object value) | |
| deriveARGB | back to summary |
|---|---|
| pack-priv static int deriveARGB(Color color1, Color color2, float midPoint) Derives the ARGB value for a color based on an offset between two other colors. | |
| getDefaults | back to summary |
|---|---|
| public UIDefaults getDefaults() Overrides javax. Doc from javax. Returns the defaults for this SynthLookAndFeel.
| |
| getDefaultsForPrefix | back to summary |
|---|---|
| pack-priv Map | |
| getDerivedColor | back to summary |
|---|---|
| public Color getDerivedColor(String uiDefaultParentName, float hOffset, float sOffset, float bOffset, int aOffset, boolean uiResource) Get a derived color, derived colors are shared instances and is color value will change when its parent UIDefault color changes.
| |
| getDerivedColor | back to summary |
|---|---|
| protected final Color getDerivedColor(Color color1, Color color2, float midPoint, boolean uiResource) Decodes and returns a color, which is derived from an offset between two other colors. | |
| getDerivedColor | back to summary |
|---|---|
| protected final Color getDerivedColor(Color color1, Color color2, float midPoint) Decodes and returns a color, which is derived from a offset between two other colors. | |
| getDescription | back to summary |
|---|---|
| public String getDescription() Overrides javax. Returns a textual description of this look and feel. | |
| getDisabledIcon | back to summary |
|---|---|
| public Icon getDisabledIcon(JComponent component, Icon icon) Overrides javax. Doc from javax. Returns an
Some look and feels might not render the disabled
| |
| getID | back to summary |
|---|---|
| public String getID() Overrides javax. Return a string that identifies this look and feel. This String will be the unquoted String "Nimbus". | |
| getName | back to summary |
|---|---|
| public String getName() Overrides javax. Return a short string that identifies this look and feel. This String will be the unquoted String "Nimbus". | |
| getStyle | back to summary |
|---|---|
| public static NimbusStyle getStyle(JComponent c, Region r) Hides javax. Gets the style associated with the given component and region. This will never return null. If an appropriate component and region cannot be determined, then a default style is returned.
| |
| initialize | back to summary |
|---|---|
| public void initialize() Overrides javax. Called by UIManager when this look and feel is installed.
| |
| parsePrefix | back to summary |
|---|---|
| pack-priv static String parsePrefix(String key) | |
| register | back to summary |
|---|---|
| public void register(Region region, String prefix) Registers a third party component with the NimbusLookAndFeel. Regions represent Components and areas within Components that act as
independent painting areas. Once registered with the NimbusLookAndFeel,
NimbusStyles for these Regions can be retrieved via the
The NimbusLookAndFeel uses a standard naming scheme for entries in the
UIDefaults table. The key for each property, state, painter, and other
default registered in UIDefaults for a specific Region will begin with
the specified For example, suppose I had a component named JFoo. Suppose I then registered this component with the NimbusLookAndFeel in this manner:
In this case, I could then register properties for this component with UIDefaults in the following manner:
It is also possible to register a named component with Nimbus. For example, suppose you wanted to style the background of a JPanel named "MyPanel" differently from other JPanels. You could accomplish this by doing the following:
| |
| resolveToolbarConstraint | back to summary |
|---|---|
| pack-priv static Object resolveToolbarConstraint(JToolBar toolbar) Package private method which returns either BorderLayout.NORTH, BorderLayout.SOUTH, BorderLayout.EAST, or BorderLayout.WEST depending on the location of the toolbar in its parent. The toolbar might be in PAGE_START, PAGE_END, CENTER, or some other position, but will be resolved to either NORTH,SOUTH,EAST, or WEST based on where the toolbar actually IS, with CENTER being NORTH. This code is used to determine where the border line should be drawn by the custom toolbar states, and also used by NimbusIcon to determine whether the handle icon needs to be shifted to look correct. Toollbars are unfortunately odd in the way these things are handled, and so this code exists to unify the logic related to toolbars so it can be shared among the static files such as NimbusIcon and generated files such as the ToolBar state classes. | |
| shouldUpdateStyleOnAncestorChanged | back to summary |
|---|---|
| public boolean shouldUpdateStyleOnAncestorChanged() Overrides javax. Doc from javax. Returns whether or not the UIs should update their
| |
| shouldUpdateStyleOnEvent | back to summary |
|---|---|
| protected boolean shouldUpdateStyleOnEvent(PropertyChangeEvent ev) Overrides javax. Doc from javax. Returns whether or not the UIs should update their styles when a particular event occurs. Overridden to return
| |
| uninitialize | back to summary |
|---|---|
| public void uninitialize() Overrides javax. Called by UIManager when this look and feel is uninstalled.
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | propertyChange(PropertyChangeEvent ev)
Implements java. This method gets called when a bound property is changed. |
| DefaultsListener | back to summary |
|---|---|
| private DefaultsListener() | |
| propertyChange | back to summary |
|---|---|
| public void propertyChange(PropertyChangeEvent ev) Implements java. Doc from java. This method gets called when a bound property is changed.
| |
| Modifier and Type | Field and Description |
|---|---|
| private String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Object | createValue(UIDefaults table)
Implements javax. Creates the value retrieved from the |
| dstPropName | back to summary |
|---|---|
| private String dstPropName | |
| LinkProperty | back to summary |
|---|---|
| private LinkProperty(String dstPropName) | |
| createValue | back to summary |
|---|---|
| public Object createValue(UIDefaults table) Implements javax. Doc from javax. Creates the value retrieved from the
| |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private String | |
| private String | |
| private String |
| Access | Constructor and Description |
|---|---|
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Object | Returns: the createdObjecta table)UIDefaults tableImplements javax. Creates the value retrieved from the |
| isFont | back to summary |
|---|---|
| private boolean isFont | |
| prefix | back to summary |
|---|---|
| private String prefix | |
| state | back to summary |
|---|---|
| private String state | |
| suffix | back to summary |
|---|---|
| private String suffix | |
| NimbusProperty | back to summary |
|---|---|
| private NimbusProperty(String prefix, String suffix) | |
| NimbusProperty | back to summary |
|---|---|
| private NimbusProperty(String prefix, String state, String suffix) | |
| createValue | back to summary |
|---|---|
| public Object createValue(UIDefaults table) Implements javax. Creates the value retrieved from the
| |