Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jvnet.substance
Class SubstanceLookAndFeel

    java.lang.Object
      javax.swing.LookAndFeel
          javax.swing.plaf.basic.BasicLookAndFeel
              org.jvnet.substance.SubstanceLookAndFeel

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  SubstanceAutumnLookAndFeel, SubstanceBusinessBlackSteelLookAndFeel, SubstanceBusinessBlueSteelLookAndFeel, SubstanceBusinessLookAndFeel, SubstanceChallengerDeepLookAndFeel, SubstanceCremeCoffeeLookAndFeel, SubstanceCremeLookAndFeel, SubstanceEmeraldDuskLookAndFeel, SubstanceLegacyDefaultLookAndFeel, SubstanceMagmaLookAndFeel, SubstanceMistAquaLookAndFeel, SubstanceMistSilverLookAndFeel, SubstanceModerateLookAndFeel, SubstanceNebulaBrickWallLookAndFeel, SubstanceNebulaLookAndFeel, SubstanceOfficeBlue2007LookAndFeel, SubstanceOfficeSilver2007LookAndFeel, SubstanceRavenGraphiteGlassLookAndFeel, SubstanceRavenGraphiteLookAndFeel, SubstanceRavenLookAndFeel, SubstanceSaharaLookAndFeel

    public abstract class SubstanceLookAndFeel

extends javax.swing.plaf.basic.BasicLookAndFeel

Main class for Substance look and feel. All static methods in this class should be called when Substance is the currently set look and feel unless explicitly stated otherwise.

Since version 5.0 this class is abstract. There are three options to use Substance:

- Use one of the core skin-based look-and-feels in the `org.jvnet.substance.skin` package.
- Extend this class and pass a skin instance to the `SubstanceLookAndFeel(SubstanceSkin)` constructor.
- Call `setSkin(String)` or `setSkin(SubstanceSkin)` static methods. These methods do not require Substance to be the current look-and-feel.

Author:
  Kirill Grouchnikov
See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `BUTTON_NO_MIN_SIZE_PROPERTY` Client property name for ignoring default (minimum) dimension for a single button.
`static java.lang.String` | `BUTTON_OPEN_SIDE_PROPERTY` Client property name for specifying an open side for a single button.
`static java.lang.String` | `BUTTON_PAINT_NEVER_PROPERTY` Client property name for specifying that a single button / all application buttons should never paint the background.
`static java.lang.String` | `BUTTON_SHAPER_PROPERTY` Property name for specifying outline shaper.
`static java.lang.String` | `BUTTON_SIDE_PROPERTY` Client property name for specifying a straight side for a single button.
`static java.lang.String` | `COLORIZATION_FACTOR` Client property name for specifying that the colorization amount applied to the background and foreground of the current theme and the specific control.
`static java.lang.String` | `COMBO_BOX_POPUP_FLYOUT_ORIENTATION` Client property name for specifying combo popup flyout orientation.
`static java.lang.String` | `COMBO_POPUP_PROTOTYPE` Property name for specifying the combobox popup prototype display value which is used to compute the width of the popup at runtime.
`protected static org.jvnet.lafplugin.ComponentPluginManager` | `componentPlugins` Plugin manager for component plugins.
`static java.lang.String` | `CORNER_RADIUS` Client property name for specifying the corner radius for buttons.
`protected java.awt.KeyboardFocusManager` | `currentKeyboardFocusManager` The current keyboard focus manager - fix for defect 208.
`static java.lang.String` | `FLAT_PROPERTY` Property name for specifying that the component should be painted flat (no background / border) when it's inactive.
`static java.lang.String` | `FOCUS_KIND` Client property name for specifying the kind of focus indication on buttons, check boxes and radio buttons.
`protected java.beans.PropertyChangeListener` | `focusOwnerChangeListener` Change listener on keyboard focus manager - fix for defect 208.
`static java.lang.String` | `HEAP_STATUS_TRACE_FILE` VM property name for specifying the heap status trace file.
`protected static java.util.Set<LocaleChangeListener>` | `localeChangeListeners` List of all listeners on closing tabs.
`static java.lang.String` | `MENU_GUTTER_FILL_KIND` Property name for specifying menu gutter fill kind.
`protected java.lang.String` | `name` The name of this look-and-feel instance.
`static java.lang.String` | `PASSWORD_ECHO_PER_CHAR` Client property name for specifying the number of echo characters for each password character.
`static java.lang.String` | `PLUGIN_XML` The name of plugin configuration XML resource name.
`static java.lang.String` | `SCROLL_PANE_BUTTONS_POLICY` Client property name for specifying scroll pane button policy.
`static java.lang.String` | `SHOW_EXTRA_WIDGETS` Property name for specifying that extra UI elements (such as menu items in system menu or lock borders) should be shown.
`protected SubstanceSkin` | `skin` The skin of this look-and-feel instance.
`static java.lang.String` | `SKIN_PROPERTY` Property name for specifying skin to be used on the specific root pane.
`protected static java.util.Set<SkinChangeListener>` | `skinChangeListeners` List of all listeners on skin changes.
`protected static org.jvnet.lafplugin.PluginManager` | `skinPlugins` Plugin manager for skin plugins.
`protected static java.lang.String` | `SUBSTANCE_FONT_POLICY_KEY` Internal client property name for storing application-specific font policy.
`static java.lang.String` | `TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION` Client property name for specifying that only the close button of a marked-as-modified tab component should pulsate.
`static java.lang.String` | `TABBED_PANE_CLOSE_BUTTONS_PROPERTY` Client property name for specifying that a single tab / all tabs of a single tabbed pane / all tabs of all tabbed panes should have close buttons.
`static java.lang.String` | `TABBED_PANE_CLOSE_CALLBACK` Client property name for specifying the callback for deciding on the tab close type.
`static java.lang.String` | `TABBED_PANE_CONTENT_BORDER_KIND` Client property name for specifying the content pane border kind.
`protected static boolean` | `toUseConstantThemesOnDialogs` Indicates whether option dialogs (error, question, warning, info) should use constant themes for icon coloring.
`static java.lang.String` | `TRACE_FILE` VM property name for specifying the trace file.
`static org.jvnet.lafwidget.animation.FadeKind` | `TREE_SMART_SCROLL_ANIMATION_KIND` Fade kind for smart tree scroll.
`static java.lang.String` | `USE_THEMED_DEFAULT_ICONS` Client property name for specifying that icons on buttons and toggle buttons should match the color of the current theme when they are in default state.
`static java.lang.String` | `WATERMARK_VISIBLE` Client property name for requesting that watermark should be painted on the component and its descendants.
`static java.lang.String` | `WINDOW_MODIFIED` Client property name for specifying that contents of some frame, dialog, internal frame, desktop icon or tab have been modified and not saved.

Constructor Summary
`protected` | `SubstanceLookAndFeel(SubstanceSkin skin)` Creates a new skin-based Substance look-and-feel.

Method Summary
`static java.util.Map<java.lang.String,SkinInfo>` | `getAllSkins()` Returns all available skins.
`static java.util.Set<BaseTabCloseListener>` | `getAllTabCloseListeners()` Returns the set of all listeners registered on tab-close events on all tabbed panes.
`static java.util.Set<BaseTabCloseListener>` | `getAllTabCloseListeners(javax.swing.JTabbedPane tabbedPane)` Returns all listeners registered on tab closing of the specified tabbed pane.
`static SubstanceSkin` | `getCurrentSkin()` Returns the current global skin.
`static SubstanceSkin` | `getCurrentSkin(java.awt.Component c)` Returns the current skin for the specified component.
`javax.swing.UIDefaults` | `getDefaults()`
`java.lang.String` | `getDescription()`
`static FontPolicy` | `getFontPolicy()` Looks up and retrieves the `FontPolicy` used by the Substance family.
`java.lang.String` | `getID()`
`static java.util.ResourceBundle` | `getLabelBundle()` Retrieves the current label bundle.
`static java.util.ResourceBundle` | `getLabelBundle(java.util.Locale locale)` Retrieves the label bundle for the specified locale.
`static java.util.Set<LocaleChangeListener>` | `getLocaleListeners()` Returns all listeners registered on locale change.
`java.lang.String` | `getName()`
`boolean` | `getSupportsWindowDecorations()`
`static javax.swing.JComponent` | `getTitlePaneComponent(java.awt.Window window)` Returns the title pane of the specified top-level window.
`protected void` | `initClassDefaults(javax.swing.UIDefaults table)`
`protected void` | `initComponentDefaults(javax.swing.UIDefaults table)`
`void` | `initialize()`
`protected static void` | `initPluginsIfNecessary()` Initializes the plugins if necessary.
`static boolean` | `isCurrentLookAndFeel()` Checks whether Substance is the current look-and-feel.
`boolean` | `isNativeLookAndFeel()`
`boolean` | `isSupportedLookAndFeel()`
`static boolean` | `isToUseConstantThemesOnDialogs()` Checks whether the `JOptionPane`s created with predefined message types should use constant themes for the icons.
`static void` | `registerLocaleChangeListener(LocaleChangeListener localeListener)` Registers a new listener on locale change.
`static void` | `registerSkinChangeListener(SkinChangeListener skinChangeListener)` Registers a new listener on skin change.
`static void` | `registerTabCloseChangeListener(BaseTabCloseListener tabCloseListener)` Registers the specified listener on tab-close events on all tabbed panes.
`static void` | `registerTabCloseChangeListener(javax.swing.JTabbedPane tabbedPane, BaseTabCloseListener tabCloseListener)` Registers the specified listener on tab-close events on the specified tabbed pane.
`static void` | `resetLabelBundle()` Resets the current label bundle.
`static void` | `setDecorationType(javax.swing.JComponent comp, DecorationAreaType type)` Sets the decoration type of the specified component and all its children.
`static void` | `setDecorationType(javax.swing.JComponent comp, DecorationAreaType type, boolean isPropagatingToChildren)` Sets the decoration type of the specified component.
`static void` | `setFontPolicy(FontPolicy fontPolicy)` Sets the `FontPolicy` to be used with Substance family.
`static void` | `setLabelBundleClassLoader(java.lang.ClassLoader labelBundleClassLoader)` Sets the class loader for `LABEL_BUNDLE`.
`static boolean` | `setSkin(java.lang.String skinClassName)` Sets the specified skin.
`static boolean` | `setSkin(SubstanceSkin newSkin)` Sets the specified skin.
`static void` | `setToUseConstantThemesOnDialogs(boolean toUseConstantThemesOnDialogs)` Sets the new setting for the icons of the `JOptionPane`s created with predefined message types.
`static void` | `setWidgetVisible(javax.swing.JRootPane rootPane, boolean visible, SubstanceConstants.SubstanceWidgetType... substanceWidgets)` Sets the visibility of the specified widget kind(s).
`void` | `uninitialize()`
`static void` | `unregisterLocaleChangeListener(LocaleChangeListener localeListener)` Unregisters a listener on locale change.
`static void` | `unregisterSkinChangeListener(SkinChangeListener skinChangeListener)` Unregisters a listener on skin change.
`static void` | `unregisterTabCloseChangeListener(BaseTabCloseListener tabCloseListener)` Unregisters the specified listener on tab-close events on all tabbed panes.
`static void` | `unregisterTabCloseChangeListener(javax.swing.JTabbedPane tabbedPane, BaseTabCloseListener tabCloseListener)` Unregisters the specified listener on tab-close events on the specified tabbed pane.

Methods inherited from class javax.swing.plaf.basic.BasicLookAndFeel
`createAudioAction, getAudioActionMap, initSystemColorDefaults, loadSystemColors, playSound`

Methods inherited from class javax.swing.LookAndFeel
`getDesktopPropertyValue, getDisabledIcon, getDisabledSelectedIcon, getLayoutStyle, 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`

Field Detail

### PLUGIN_XML

    public static final java.lang.String PLUGIN_XML

  The name of plugin configuration XML resource name. This is used for the laf-plugin support layer of third-party components.

  See Also:
    Constant Field Values

### componentPlugins

    protected static org.jvnet.lafplugin.ComponentPluginManager componentPlugins

  Plugin manager for component plugins.

### skinPlugins

    protected static org.jvnet.lafplugin.PluginManager skinPlugins

  Plugin manager for skin plugins.

### skinChangeListeners

    protected static java.util.Set<SkinChangeListener> skinChangeListeners

  List of all listeners on skin changes.

### localeChangeListeners

    protected static java.util.Set<LocaleChangeListener> localeChangeListeners

  List of all listeners on closing tabs.

### toUseConstantThemesOnDialogs

    protected static boolean toUseConstantThemesOnDialogs

  Indicates whether option dialogs (error, question, warning, info) should use constant themes for icon coloring. Note that since version 4.0, the default setting is `true` (use constant theme). To use theme-consistent coloring, call `setToUseConstantThemesOnDialogs(boolean)` and pass `false`.

  See Also:
    `isToUseConstantThemesOnDialogs()`, `setToUseConstantThemesOnDialogs(boolean)`

### focusOwnerChangeListener

    protected java.beans.PropertyChangeListener focusOwnerChangeListener

  Change listener on keyboard focus manager - fix for defect 208.

### currentKeyboardFocusManager

    protected java.awt.KeyboardFocusManager currentKeyboardFocusManager

  The current keyboard focus manager - fix for defect 208.

### TREE_SMART_SCROLL_ANIMATION_KIND

    public static final org.jvnet.lafwidget.animation.FadeKind TREE_SMART_SCROLL_ANIMATION_KIND

  Fade kind for smart tree scroll. Disabled by default, use `FadeConfigurationManager.allowFades(FadeKind)` to enable.

  Smart tree scroll is relevant for scroll panes containing a tree. When enabled, it automatically scrolls the tree horizontally when the viewport shows mainly empty area (especially relevant for multi-level trees with narrow viewports).

  Since:
    4.0

### WATERMARK_VISIBLE

    public static final java.lang.String WATERMARK_VISIBLE

  Client property name for requesting that watermark should be painted on the component and its descendants. This property can be set either as client property on some component or as global property on `UIManager`. The value should be either `Boolean.TRUE` or `Boolean.FALSE`.

  In order to compute whether the current watermark should be painted on some component, the component's hierarchy is traversed bottom up. The first component that has this property set, defines the watermark visibility. Finally, if neither component not its ancestors define this property, the global setting on `UIManager` is checked. If there is no global setting, the watermark is not ignored (it is painted).

  There is special default setting for trees, tables, lists and text components. These show watermark only when this property is explicitly set to `Boolean.TRUE` on the component itself, one of its ancestors or the `UIManager`.

  Since:
    version 5.0
  See Also:
    Constant Field Values

### BUTTON_NO_MIN_SIZE_PROPERTY

    public static final java.lang.String BUTTON_NO_MIN_SIZE_PROPERTY

  Client property name for ignoring default (minimum) dimension for a single button. This property can be set either as a client property on a specific button or as a global setting on `UIManager`. The value should be either `Boolean.TRUE` or `Boolean.FALSE`.

  Note that `SubstanceButtonShaper` implementations are not required to respect this property. The current implementations of the default `StandardButtonShaper` and `ClassicButtonShaper` respect this property.

  Example of marking a button to ignore minimum dimension settings:

  `JButton button = new JButton("text");
  button.putClientProperty(SubstanceLookAndFeel.BUTTON_NO_MIN_SIZE_PROPERTY,
  Boolean.TRUE);`

  Example of marking all application buttons to ignore minimum dimension settings:

  `UIManager.put(SubstanceLookAndFeel.BUTTON_NO_MIN_SIZE_PROPERTY,
  Boolean.TRUE);`

  Since:
    version 2.1
  See Also:
    Constant Field Values

### BUTTON_PAINT_NEVER_PROPERTY

    public static final java.lang.String BUTTON_PAINT_NEVER_PROPERTY

  Client property name for specifying that a single button / all application buttons should never paint the background. This property can be set either as a client property on a specific button or as a global setting on `UIManager`. The value should be either `Boolean.TRUE` or `Boolean.FALSE`. Note that unlike the `FLAT_PROPERTY`, a button marked with this property will never show the background (will always be painted flat).

  Example of marking a button to never paint background:

  `JButton button = new JButton("text");
  button.putClientProperty(SubstanceLookAndFeel.BUTTON_PAINT_NEVER_PROPERTY,
  Boolean.TRUE);`

  Example of marking all application buttons to never paint background:

  `UIManager.put(SubstanceLookAndFeel.BUTTON_PAINT_NEVER_PROPERTY,
  Boolean.TRUE);`

  Since:
    version 2.3
  See Also:
    `FLAT_PROPERTY`, Constant Field Values

### BUTTON_SIDE_PROPERTY

    public static final java.lang.String BUTTON_SIDE_PROPERTY

  Client property name for specifying a straight side for a single button. This property must be set as a client property on a specific button. The value can be:

  - A value in `SubstanceConstants.Side` enum.
  - Set of values in `SubstanceConstants.Side` enum.

  Note that not all `SubstanceButtonShaper` implementations are required to respect this property. The default `StandardButtonShaper` and `ClassicButtonShaper` respect this property.

  Example of marking a button to have straight north side:

  `JButton button = new JButton("text");
  button.putClientProperty(SubstanceLookAndFeel.BUTTON_SIDE_PROPERTY,
  SubstanceConstants.Side.RIGHT);`

  Since:
    version 2.1
  See Also:
    `BUTTON_OPEN_SIDE_PROPERTY`, Constant Field Values

### BUTTON_OPEN_SIDE_PROPERTY

    public static final java.lang.String BUTTON_OPEN_SIDE_PROPERTY

  Client property name for specifying an open side for a single button. This property must be set as a client property on a specific button. The value can be:

  - A value in `SubstanceConstants.Side` enum.
  - Set of values in `SubstanceConstants.Side` enum.

  Example of marking a button to have open top and west sides:

  `JButton button = new JButton("text");
  Set openSides = EnumSet.of(Side.TOP, Side.WEST);
  button.putClientProperty(SubstanceLookAndFeel.BUTTON_OPEN_SIDE_PROPERTY,
  openSides);`

  Since:
    version 3.1
  See Also:
    `BUTTON_SIDE_PROPERTY`, Constant Field Values

### CORNER_RADIUS

    public static final java.lang.String CORNER_RADIUS

  Client property name for specifying the corner radius for buttons. Currently, this property is respected only on toolbar buttons. This property can be set either as a client property on a specific toolbar button, a client property on a specific toolbar (will hold for all buttons in the toolbar) or as a global setting on `UIManager`. The value should be a `Float` instance.

  Example of specifying a (toolbar) button to have corner radius of 5 pixels:

  `JButton button = new JButton("text");
  button.putClientProperty(SubstanceLookAndFeel.CORNER_RADIUS,
  Float.valueOf(5.0f));`

  Example of specifying all buttons of a toolbar to have corner radius of 3 pixels:

  `JToolBar toolbar = new JToolBar("toolbar");
  toolbar.putClientProperty(SubstanceLookAndFeel.CORNER_RADIUS,
  Float.valueOf(3.0f));`

  Example of specifying all toolbar buttons to have corner radius of 0 pixels:

  `UIManager.put(SubstanceLookAndFeel.CORNER_RADIUS, Float.valueOf(0.0f));`

  Since:
    version 3.0
  See Also:
    Constant Field Values

### FLAT_PROPERTY

    public static final java.lang.String FLAT_PROPERTY

  Property name for specifying that the component should be painted flat (no background / border) when it's inactive. This property should be specified on a specific component or its parent and must have either `Boolean.TRUE` or `Boolean.FALSE` value. For example, this is how to mark a button to appear flat:

  `JButton button = new JButton("text");
  button.putClientProperty(SubstanceLookAndFeel.FLAT_PROPERTY,
  Boolean.TRUE);`

  Since:
    version 3.0
  See Also:
    `BUTTON_PAINT_NEVER_PROPERTY`, Constant Field Values

### HEAP_STATUS_TRACE_FILE

    public static final java.lang.String HEAP_STATUS_TRACE_FILE

  VM property name for specifying the heap status trace file. The trace file will contain information on the status of heap. The property value is used as a filename for tracing the heap status. Example for specifying the trace file name:

  `-Dsubstancelaf.heapStatusTraceFile=C:/temp/myApp.heap.log`

  Since:
    version 5.0
  See Also:
    Constant Field Values

### WINDOW_MODIFIED

    public static final java.lang.String WINDOW_MODIFIED

  Client property name for specifying that contents of some frame, dialog, internal frame, desktop icon or tab have been modified and not saved. The property can be set on:

  - `JInternalFrame` - the close button of the specific internal frame will be animated (in case that the internal frame has decorated title pane). In addition, once such internal frame is iconified (to a `JInternalFrame.JDesktopIcon`), the close button of the matching desktop icon is animated as well.
  - `JRootPane` - the close button of the title pane of the matching frame / dialog will be animated (in case that the frame / dialog have decorated title pane).
  - `JComponent` in a `JTabbedPane`. Based on the `TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION` property presence, either the entire tab or its close button area is animated. In this case, this property must be set on the tab component itself, not on one of its child components.

  The animation cycles between red, orange and yellow themes. In most cases (all but tabs not marked with `TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION` property), the animation will be visible only when the mouse hovers over the close button of the matching container (frame, dialog, internal frame, desktop icon, tab). The tooltip of the close button is changed as well to reflect that the container contents are marked as modified.

  Here is a sample text editing application that illustrates the use of this property. Once the contents of the text pane are changed, the frame is marked as modified. The Save button marks the frame as not-modified. In the real application, the listener on this button will need to persist the changes as well.

  `public class Changer extends JFrame {
  public Changer() {
  super("Changer");
  this.setLayout(new BorderLayout());
  JTextPane textArea = new JTextPane();
  this.add(textArea, BorderLayout.CENTER);
  textArea.getDocument().addDocumentListener(new DocumentListener() {
  private void handleChange() {
  getRootPane().putClientProperty(
  SubstanceLookAndFeel.WINDOW_MODIFIED, Boolean.TRUE);
  }
  public void changedUpdate(DocumentEvent e) {
  handleChange();
  }
  public void insertUpdate(DocumentEvent e) {
  handleChange();
  }
  public void removeUpdate(DocumentEvent e) {
  handleChange();
  }
  });
  JPanel buttons = new JPanel(new FlowLayout(FlowLayout.RIGHT));
  JButton saveButton = new JButton("Save");
  saveButton.addActionListener(new ActionListener() {
  public void actionPerformed(ActionEvent e) {
  getRootPane().putClientProperty(
  SubstanceLookAndFeel.WINDOW_MODIFIED, Boolean.FALSE);
  }
  });
  buttons.add(saveButton);
  this.add(buttons, BorderLayout.SOUTH);
  this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  }
  public static void main(String ... args) {
  try {
  UIManager.setLookAndFeel(new SubstanceLookAndFeel());
  }
  catch (Exception exc) {}
  JFrame.setDefaultLookAndFeelDecorated(true);
  Changer ch = new Changer();
  ch.setPreferredSize(new Dimension(200, 200));
  ch.setSize(ch.getPreferredSize());
  ch.setLocationRelativeTo(null);
  ch.setVisible(true);
  }
  }`

  Since:
    version 2.1
  See Also:
    Constant Field Values

### TABBED_PANE_CLOSE_BUTTONS_PROPERTY

    public static final java.lang.String TABBED_PANE_CLOSE_BUTTONS_PROPERTY

  Client property name for specifying that a single tab / all tabs of a single tabbed pane / all tabs of all tabbed panes should have close buttons. This property can be specified on a single tab component, on a `JTabbedPane` itself (will hold for all tab components that don't define this property) or on `UIManager`. The value should be either `Boolean.TRUE` or `Boolean.FALSE`. By default, the close buttons are not displayed.

  Example of setting that all tabs in the application will have close buttons:

  `UIManager.put(SubstanceLookAndFeel.TABBED_PANE_CLOSE_BUTTONS_PROPERTY,
  Boolean.TRUE);`

  A more complex example:

  `UIManager.put(SubstanceLookAndFeel.TABBED_PANE_CLOSE_BUTTONS_PROPERTY,
  Boolean.TRUE);
  JTabbedPane jtpMain = new JTabbedPane();
  JTabbedPane jtpSecondary = new JTabbedPane();
  jtpSecondary.putClientProperty(SubstanceLookAndFeel.TABBED_PANE_CLOSE_BUTTONS_PROPERTY,
  Boolean.FALSE);
  JPanel panelSecondary = new JPanel();
  jtpMain.addTab(jtpSecondary);
  jtpMain.addTab(panelSecondary);
  JPanel tab1 = new JPanel();
  JPanel tab2 = new JPanel();
  tab2.putClientProperty(SubstanceLookAndFeel.TABBED_PANE_CLOSE_BUTTONS_PROPERTY,
  Boolean.TRUE);
  jtpSecondary.addTab(tab1);
  jtpSecondary.addTab(tab2);`

  In the example above, the first first-level child (jtpSecondary) doesn't have the close button (since it overrides the global setting). The second first-level child tab (panelSecondary) has close button (from the global UIManager setting). The first second-level tab doesn't have the close button (setting inherited from the parent jtpSecondary tab that overrides the global setting). The second second-level tab has the close button (since its setting overrides the parent setting).

  Since:
    version 2.1
  See Also:
    `TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION`, `TABBED_PANE_CLOSE_CALLBACK`, Constant Field Values

### TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION

    public static final java.lang.String TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION

  Client property name for specifying that only the close button of a marked-as-modified tab component should pulsate. This property can be specified on a single tab component, on a `JTabbedPane` itself (will hold for all tab components that don't define this property) or on `UIManager`. The value should be either `Boolean.TRUE` or `Boolean.FALSE`. By default, the animation on modified tabs is on the entire tab rectangle. Note that this setting is only relevant for tabs marked with `WINDOW_MODIFIED` property.

  Example of setting that all tabs in the application will have modified animation on close button:

  `UIManager.put(SubstanceLookAndFeel.TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION,
  Boolean.TRUE);`

  A more complex example:

  `UIManager.put(SubstanceLookAndFeel.TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION,
  Boolean.TRUE);
  JTabbedPane jtpMain = new JTabbedPane();
  JTabbedPane jtpSecondary = new JTabbedPane();
  jtpSecondary.putClientProperty(SubstanceLookAndFeel.TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION,
  Boolean.FALSE);
  JPanel panelSecondary = new JPanel();
  jtpMain.addTab(jtpSecondary);
  jtpMain.addTab(panelSecondary);
  JPanel tab1 = new JPanel();
  JPanel tab2 = new JPanel();
  tab2.putClientProperty(SubstanceLookAndFeel.TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION,
  Boolean.TRUE);
  jtpSecondary.addTab(tab1);
  jtpSecondary.addTab(tab2);`

  In the example above, the first first-level child (jtpSecondary) has the animation on the entire tab (since it overrides the global setting). The second first-level child tab (panelSecondary) has animation on the close button (from the global UIManager setting). The first second-level tab has the animation on the entire tab (setting inherited from the parent jtpSecondary tab that overrides the global setting). The second second-level tab has animation on the close button (since its setting overrides the parent setting).

  Since:
    version 2.2
  See Also:
    `TABBED_PANE_CLOSE_BUTTONS_PROPERTY`, `TABBED_PANE_CLOSE_CALLBACK`, Constant Field Values

### TABBED_PANE_CLOSE_CALLBACK

    public static final java.lang.String TABBED_PANE_CLOSE_CALLBACK

  Client property name for specifying the callback for deciding on the tab close type. This property can be specified on a single tab component, on a `JTabbedPane` itself (will hold for all tab components that don't define this property) or on `UIManager`. The value should be an instance of `TabCloseCallback`. Note that this setting is only relevant for tabs marked with `TABBED_PANE_CLOSE_BUTTONS_PROPERTY` property.

  Example of custom tab close callback set on a tabbed pane:

  `TabCloseCallback closeCallback = new TabCloseCallback() {
  public TabCloseKind onAreaClick(JTabbedPane tabbedPane,
  int tabIndex, MouseEvent mouseEvent) {
  if (mouseEvent.getButton() != MouseEvent.BUTTON3)
  return TabCloseKind.NONE;
  if (mouseEvent.isShiftDown()) {
  return TabCloseKind.ALL;
  }
  return TabCloseKind.THIS;
  }
  public TabCloseKind onCloseButtonClick(JTabbedPane tabbedPane,
  int tabIndex, MouseEvent mouseEvent) {
  if (mouseEvent.isAltDown()) {
  return TabCloseKind.ALL_BUT_THIS;
  }
  if (mouseEvent.isShiftDown()) {
  return TabCloseKind.ALL;
  }
  return TabCloseKind.THIS;
  }
  public String getAreaTooltip(JTabbedPane tabbedPane, int tabIndex) {
  return null;
  }
  public String getCloseButtonTooltip(JTabbedPane tabbedPane,
  int tabIndex) {
  StringBuffer result = new StringBuffer();
  result.append("<html><body>");
  result.append("Mouse click closes <b>"
  + tabbedPane.getTitleAt(tabIndex) + "</b> tab");
  result.append("<br><b>Alt</b>-Mouse click closes all tabs but <b>"
  + tabbedPane.getTitleAt(tabIndex) + "</b> tab");
  result.append("<br><b>Shift</b>-Mouse click closes all tabs");
  result.append("</body></html>");
  return result.toString();
  }
  };
  JTabbedPane jtp = new JTabbedPane();
  jtp.putClientProperty(
  SubstanceLookAndFeel.TABBED_PANE_CLOSE_CALLBACK,
  closeCallback);`

  Since:
    version 2.3
  See Also:
    Constant Field Values

### TABBED_PANE_CONTENT_BORDER_KIND

    public static final java.lang.String TABBED_PANE_CONTENT_BORDER_KIND

  Client property name for specifying the content pane border kind. This property can be specified either on a single `JTabbedPane` or on `UIManager`. The value should be one of `SubstanceConstants.TabContentPaneBorderKind` enum. By default, the border kind is `SubstanceConstants.TabContentPaneBorderKind#DOUBLE_FULL`.

  Example of setting that all tabbed panes in the application have single full border (default setting prior to version 4.1):

  `UIManager.put(SubstanceLookAndFeel.TABBED_PANE_CONTENT_BORDER_KIND,
  TabContentPaneBorderKind.SINGLE_FULL);`

  Example of specifying that the specific tabbed pane has single full border (default setting prior to version 4.1):

  `JTabbedPane jtpMain = new JTabbedPane();
  jtpMain.putClientProperty(SubstanceLookAndFeel.TABBED_PANE_CONTENT_BORDER_KIND,
  TabContentPaneBorderKind.SINGLE_FULL);`

  Since:
    version 4.1
  See Also:
    Constant Field Values

### COMBO_BOX_POPUP_FLYOUT_ORIENTATION

    public static final java.lang.String COMBO_BOX_POPUP_FLYOUT_ORIENTATION

  Client property name for specifying combo popup flyout orientation. This property can be set on either a specific `JComboBox` or globally on `UIManager`. The value should be one of the `Integer`s below:

  - The default `SwingConstants.SOUTH` - the popup is displayed directly below the combo aligned to the left.
  - `SwingConstants.NORTH` - the popup is displayed directly above the combo aligned to the left.
  - `SwingConstants.EAST` - the popup is displayed to the left of the combo aligned to the top.
  - `SwingConstants.WEST` - the popup is displayed to the right of the combo aligned to the top.
  - `SwingConstants.CENTER` - the popup is displayed centered vertically over the combo aligned to the left.

  Note that the combo arrow changes in accordance with the combo popup flyout orientation. Example of setting a combobox with a custom flyout orientation:

  `JComboBox cb = new JComboBox(
  new Object[] { "Ester", "Jordi", "Jordina", "Jorge", "Sergi" });
  cb.putClientProperty(SubstanceLookAndFeel.COMBO_BOX_POPUP_FLYOUT_ORIENTATION,
  SwingConstants.CENTER);`

  Since:
    version 2.3
  See Also:
    `COMBO_POPUP_PROTOTYPE`, Constant Field Values

### SCROLL_PANE_BUTTONS_POLICY

    public static final java.lang.String SCROLL_PANE_BUTTONS_POLICY

  Client property name for specifying scroll pane button policy. This property can be set on either a specific `JScrollPane` or globally on `UIManager`. The value should be one of the `SubstanceConstants.ScrollPaneButtonPolicyKind` enum. Example of setting a scroll pane with a custom button policy:

  `JScrollPane jsp = new JScrollPane(new JPanel());
  jsp.putClientProperty(SubstanceLookAndFeel.SCROLL_PANE_BUTTONS_POLICY,
  ScrollPaneButtonPolicyKind.MULTIPLE);`

  Since:
    version 3.1
  See Also:
    Constant Field Values

### SHOW_EXTRA_WIDGETS

    public static final java.lang.String SHOW_EXTRA_WIDGETS

  Property name for specifying that extra UI elements (such as menu items in system menu or lock borders) should be shown. This property can be set as a global setting on `UIManager` or as a client property on a specific component. The value should be either `Boolean.TRUE` or `Boolean.FALSE`.

  Example of setting this property on `UIManager`:

  `UIManager.put(SubstanceLookAndFeel.SHOW_EXTRA_WIDGETS, Boolean.TRUE); SwingUtilities.updateComponentTree(myFrame);`

  Since:
    version 5.0
  See Also:
    Constant Field Values

### MENU_GUTTER_FILL_KIND

    public static final java.lang.String MENU_GUTTER_FILL_KIND

  Property name for specifying menu gutter fill kind. Menu gutter is the part of the menu where checkmarks and icons are painted. The value should be one of `SubstanceConstants.MenuGutterFillKind` enum. This property can be set globally on the `UIManager`. The default value is `SubstanceConstants.MenuGutterFillKind.HARD`.

  Example of setting soft fill kind:

  `UIManager.put(SubstanceLookAndFeel.MENU_GUTTER_FILL_KIND, MenuGutterFillKind.SOFT);`

  Since:
    version 3.2
  See Also:
    Constant Field Values

### FOCUS_KIND

    public static final java.lang.String FOCUS_KIND

  Client property name for specifying the kind of focus indication on buttons, check boxes and radio buttons. The value should be one of `SubstanceConstants.FocusKind` enum. This property can be set either as client property on some component or as global property on `UIManager`.

  In order to compute the kind of focus indication for some component, the component's hierarchy is traversed bottom up. The first component that has this property set, defines the focus indication kind. Finally, if neither component not its ancestors define this property, the global setting on `UIManager` is checked. If there is no global setting, the default `SubstanceConstants.FocusKind#ALL_INNER` is used. Here is an example to illustrate the above:

  `JPanel topPanel = new JPanel();
  topPanel.putClientProperty(SubstanceLookAndFeel.FOCUS_KIND, FocusKind.UNDERLINE);
  JPanel panel1 = new JPanel();
  JButton b1 = new JButton("button1");
  b1.putClientProperty(SubstanceLookAndFeel.FOCUS_KIND, FocusKind.TEXT);
  JButton b2 = new JButton("button2");
  JButton b3 = new JButton("button3");
  b3.putClientProperty(SubstanceLookAndFeel.FOCUS_KIND, FocusKind.ALL_INNER);
  panel1.add(b1);
  panel1.add(b2);
  topPanel.add(panel1);
  topPanel.add(b3);
  `

  In the code above:

  - Button b1 will have `SubstanceConstants.FocusKind#NONE` focus kind which is set directly on the button.
  - Button b2 will have `SubstanceConstants.FocusKind#UNDERLINE` focus kind which is inherited from its topPanel parent.
  - Button b3 will have `SubstanceConstants.FocusKind#ALL_INNER` focus kind which is set directly on the button.

  Since:
    2.2
  See Also:
    `SubstanceConstants.FocusKind`, Constant Field Values

### COMBO_POPUP_PROTOTYPE

    public static final java.lang.String COMBO_POPUP_PROTOTYPE

  Property name for specifying the combobox popup prototype display value which is used to compute the width of the popup at runtime. The property value should be one of:

  - `ComboPopupPrototypeCallback` - will provide application-specific logic at runtime.
  - `Object` - will point to the prototype entry itself.

  This property can be set either on a specific `JComboBox` or globally on `UIManager`.

  Here is an example of combo popup prototype set to a model element:

  `JComboBox comboProto1 = new JComboBox(new Object[] { "aa", "aaaaa",
  "aaaaaaaaaa", "this one is the one", "aaaaaaaaaaaaaaaaaaaaa" });
  comboProto1.setPrototypeDisplayValue("aaaaa");
  comboProto1.putClientProperty(SubstanceLookAndFeel.COMBO_POPUP_PROTOTYPE,
  "this one is the one");`

  Here is an example of combo popup prototype set to a dynamic callback. This callback always returns the last model element:

  `JComboBox comboProto3 = new JComboBox(new Object[] { "aa", "aaaaa",
  "this is not", "this one is not it",
  "this one is it that is for the popup" });
  comboProto3.setPrototypeDisplayValue("aaaaa");
  comboProto3.putClientProperty(SubstanceLookAndFeel.COMBO_POPUP_PROTOTYPE,
  new ComboPopupPrototypeCallback() {
  public Object getPopupPrototypeDisplayValue(JComboBox jc) {
  return jc.getModel().getElementAt(
  jc.getModel().getSize() - 1);
  }
  });`

  Since:
    version 3.0
  See Also:
    `COMBO_BOX_POPUP_FLYOUT_ORIENTATION`, Constant Field Values

### TRACE_FILE

    public static final java.lang.String TRACE_FILE

  VM property name for specifying the trace file. The trace file will contain output of the memory analyser which can be used to pinpoint the memory leaks. The property value is used as a filename for tracing the memory allocations. Example for specifying the trace file name:

  `-Dsubstancelaf.traceFile=C:/temp/myApp.substance.log`

  Since:
    version 2.0
  See Also:
    Constant Field Values

### PASSWORD_ECHO_PER_CHAR

    public static final java.lang.String PASSWORD_ECHO_PER_CHAR

  Client property name for specifying the number of echo characters for each password character. The value should be an instance of `Integer`, otherwise will be ignored. This property can be set either on a specific `JPasswordField` or globally on `UIManager`.

  Example of having all password fields echo 3 characters per each typed user character:

  `UIManager.put(SubstanceLookAndFeel.PASSWORD_ECHO_PER_CHAR,
  new Integer(3));`

  Example of having a specific password field echo 2 characters per each typed user character:

  `JPasswordField jpf = new JPasswordField();
  jpf.putClientProperty(SubstanceLookAndFeel.PASSWORD_ECHO_PER_CHAR,
  new Integer(2));`

  Since:
    version 2.2
  See Also:
    Constant Field Values

### USE_THEMED_DEFAULT_ICONS

    public static final java.lang.String USE_THEMED_DEFAULT_ICONS

  Client property name for specifying that icons on buttons and toggle buttons should match the color of the current theme when they are in default state. The button is in default state when it's not pressed, not selected, not armed and not rolled over. The value should be an instance of `Boolean`. By default, all buttons show regular (full-color original) icons. The value can be set on the specific button or globally on `UIManager`.

  Example of marking a button to have theme-matching icon in default state:

  `JButton jb = new JButton("sample", myIcon);
  jb.putClientProperty(SubstanceLookAndFeel.USE_THEMED_DEFAULT_ICONS,
  Boolean.TRUE);`

  Since:
    version 3.3
  See Also:
    Constant Field Values

### COLORIZATION_FACTOR

    public static final java.lang.String COLORIZATION_FACTOR

  Client property name for specifying that the colorization amount applied to the background and foreground of the current theme and the specific control. By default, when the application does not use any custom colors, all the controls are painted with the colors of the current theme / skin. The colors coming from the look-and-feel implement the marker `UIResource` interface which allows the UI delegates to differentiate between application-specific colors which are not changed, and the LAF-provide colors that are changed on LAF switch.

  Up until version 4.2, the support for custom background and foreground colors in Substance was not very consistent. On some controls, such as buttons, the background color was ignored completely (in favour of the current theme), while on others it was used to color the entire bounds of the control (such as check box). This new client property installs the "smart colorization" mode which uses the colors of the current theme and the custom background and foreground colors (where installed by application) to colorize the relevant portions of the control. For example, on checkbox the custom background color will be used to colorize the check box itself, while the custom foreground color will be applied to the check box text and the check mark.

  The value of this property specifies the actual colorization amount. Value of 0.0 results in no colorization at all. Values closer to 1.0 result in controls being colorized in almost full amount of the custom colors. Note that in order to maintain the gradients (fill, border, etc), even value of 1.0 does not result in full custom color being applied to the relevant visuals of the control.

  This property can be specified globally on `UIManager`, applying on all controls, or on the specific component / container. In the later case, the value will be applied to the component / container itself and all its children that do not specify a custom value for this property.

  Starting from version 5.0, the default value for this property (when it is not set at all) is 0.5. This means that applications that install custom background / foreground colors on their UI controls will see them colorized with 50% "strength", even without setting this property.

  The value should be an instance of `Double` in 0.0-1.0 range.

  Example of marking a button to have custom background color and colorizing it with 40%:

  `JButton jb = new JButton("sample", myIcon);
  jb.setBackground(Color.red);
  jb.putClientProperty(SubstanceLookAndFeel.COLORIZATION_FACTOR,
  new Double(0.4));`

  Since:
    version 4.2
  See Also:
    `Component.setBackground(Color)`, `Component.setForeground(Color)`, Constant Field Values

### SUBSTANCE_FONT_POLICY_KEY

    protected static final java.lang.String SUBSTANCE_FONT_POLICY_KEY

  Internal client property name for storing application-specific font policy.

  Since:
    version 3.3
  See Also:
    `setFontPolicy(FontPolicy)`, `getFontPolicy()`, Constant Field Values

### BUTTON_SHAPER_PROPERTY

    public static final java.lang.String BUTTON_SHAPER_PROPERTY

  Property name for specifying outline shaper. This property is used a client property that can be set on a specific control.

  The value must be a `SubstanceButtonShaper` object.

  Example of using a `SubstanceButtonShaper` object as client property value:

  `JButton b = new JButton("text");
  b.putClientProperty(SubstanceLookAndFeel.BUTTON_SHAPER_PROPERTY,
  new ClassicButtonShaper());`

  Since:
    version 2.1
  See Also:
    Constant Field Values

### SKIN_PROPERTY

    public static final java.lang.String SKIN_PROPERTY

  Property name for specifying skin to be used on the specific root pane. This property can only be installed on a `JRootPane` and will affect all the controls in that root pane. The value must be an instance of `SubstanceSkin`. After setting this property, call `SwingUtilities.updateComponentTreeUI(Component)` on the matching window.

  Since:
    version 5.0
  See Also:
    `getCurrentSkin(Component)`, Constant Field Values

### skin

    protected SubstanceSkin skin

  The skin of this look-and-feel instance.

### name

    protected java.lang.String name

  The name of this look-and-feel instance.

Constructor Detail

### SubstanceLookAndFeel

    protected SubstanceLookAndFeel(SubstanceSkin skin)

  Creates a new skin-based Substance look-and-feel. This is the only way to create an instance of `SubstanceLookAndFeel` class.

  Parameters:
    `skin` - Skin.

Method Detail

### initPluginsIfNecessary

    protected static void initPluginsIfNecessary()

  Initializes the plugins if necessary.

### getLabelBundle

    public static java.util.ResourceBundle getLabelBundle()

  Retrieves the current label bundle.

  Returns:
    The current label bundle.
  See Also:
    `resetLabelBundle()`

### getLabelBundle

    public static java.util.ResourceBundle getLabelBundle(java.util.Locale locale)

  Retrieves the label bundle for the specified locale.

  Parameters:
    `locale` - Locale.
  Returns:
    The label bundle for the specified locale.

### resetLabelBundle

    public static void resetLabelBundle()

  Resets the current label bundle. Useful when the application changes Locale at runtime.

  See Also:
    `getLabelBundle()`

### getCurrentSkin

    public static SubstanceSkin getCurrentSkin()

  Returns the current global skin. If the current look-and-feel is not Substance, this method returns `null`. This method is for internal use only. Applications should use the `getCurrentSkin(Component)`.

  Returns:
    Current global skin.
  See Also:
    `getCurrentSkin(Component)`

### getCurrentSkin

    public static SubstanceSkin getCurrentSkin(java.awt.Component c)

  Returns the current skin for the specified component. If the current look-and-feel is not Substance, this method returns `null`.

  Parameters:
    `c` - Component. May be `null` - in this case the global current Substance skin will be returned.
  Returns:
    Current skin for the specified component.
  See Also:
    `SKIN_PROPERTY`, `getCurrentSkin()`

### getDescription

    public java.lang.String getDescription()

  Specified by:
    `getDescription` in class `javax.swing.LookAndFeel`

### getID

    public java.lang.String getID()

  Specified by:
    `getID` in class `javax.swing.LookAndFeel`

### getName

    public java.lang.String getName()

  Specified by:
    `getName` in class `javax.swing.LookAndFeel`

### isNativeLookAndFeel

    public boolean isNativeLookAndFeel()

  Specified by:
    `isNativeLookAndFeel` in class `javax.swing.LookAndFeel`

### isSupportedLookAndFeel

    public boolean isSupportedLookAndFeel()

  Specified by:
    `isSupportedLookAndFeel` in class `javax.swing.LookAndFeel`

### initClassDefaults

    protected void initClassDefaults(javax.swing.UIDefaults table)

  Overrides:
    `initClassDefaults` in class `javax.swing.plaf.basic.BasicLookAndFeel`

### initComponentDefaults

    protected void initComponentDefaults(javax.swing.UIDefaults table)

  Overrides:
    `initComponentDefaults` in class `javax.swing.plaf.basic.BasicLookAndFeel`

### setFontPolicy

    public static void setFontPolicy(FontPolicy fontPolicy)

  Sets the `FontPolicy` to be used with Substance family. If the specified policy is `null`, the default will be reset. Note that after calling this method you need to call `UIManager.setLookAndFeel(LookAndFeel)` with Substance and `SwingUtilities.updateComponentTreeUI(Component)` to have the new font policy applied to your windows.

  Parameters:
    `fontPolicy` - The `FontPolicy` to be used with Substance family, or `null` to reset to the default
  See Also:
    `getFontPolicy()`, `SUBSTANCE_FONT_POLICY_KEY`

### getFontPolicy

    public static FontPolicy getFontPolicy()

  Looks up and retrieves the `FontPolicy` used by the Substance family. If a `FontPolicy` has been set, it'll be returned. Otherwise, this method checks if a `FontPolicy` or `FontSet` is defined in the system properties or UIDefaults. If so, it is returned. If no `FontPolicy` has been set for this look, in the system properties or `UIDefaults`, the default Substance font policy will be returned.

  Returns:
    the `FontPolicy` set for this Look&feel - if any, the `FontPolicy` specified in the system properties or `UIDefaults` - if any, or the default Substance font policy.
  See Also:
    `setFontPolicy(org.jvnet.substance.fonts.FontPolicy)`, `FontPolicies`, `FontPolicies.customSettingsPolicy(FontPolicy)`

### getDefaults

    public javax.swing.UIDefaults getDefaults()

  Overrides:
    `getDefaults` in class `javax.swing.plaf.basic.BasicLookAndFeel`

### initialize

    public void initialize()

  Overrides:
    `initialize` in class `javax.swing.plaf.basic.BasicLookAndFeel`

### uninitialize

    public void uninitialize()

  Overrides:
    `uninitialize` in class `javax.swing.plaf.basic.BasicLookAndFeel`

### registerSkinChangeListener

    public static void registerSkinChangeListener(SkinChangeListener skinChangeListener)

  Registers a new listener on skin change.

  Parameters:
    `skinChangeListener` - New listener on skin change.
  See Also:
    `setSkin(String)`, `setSkin(SubstanceSkin)`, `unregisterSkinChangeListener(SkinChangeListener)`

### unregisterSkinChangeListener

    public static void unregisterSkinChangeListener(SkinChangeListener skinChangeListener)

  Unregisters a listener on skin change.

  Parameters:
    `skinChangeListener` - The listener to unregister.
  See Also:
    `setSkin(String)`, `setSkin(SubstanceSkin)`, `registerSkinChangeListener(SkinChangeListener)`

### registerTabCloseChangeListener

    public static void registerTabCloseChangeListener(BaseTabCloseListener tabCloseListener)

  Registers the specified listener on tab-close events on all tabbed panes.

  Parameters:
    `tabCloseListener` - Listener to register.
  See Also:
    `registerTabCloseChangeListener(JTabbedPane, BaseTabCloseListener)`, `unregisterTabCloseChangeListener(BaseTabCloseListener)`, `unregisterTabCloseChangeListener(JTabbedPane, BaseTabCloseListener)`

### registerTabCloseChangeListener

    public static void registerTabCloseChangeListener(javax.swing.JTabbedPane tabbedPane,
                                                      BaseTabCloseListener tabCloseListener)

  Registers the specified listener on tab-close events on the specified tabbed pane.

  Parameters:
    `tabbedPane` - Tabbed pane. If `null`, the tab close listener is registered globally (for all tabbed panes).
    `tabCloseListener` - Listener to register.
  See Also:
    `registerTabCloseChangeListener(BaseTabCloseListener)`, `unregisterTabCloseChangeListener(BaseTabCloseListener)`, `unregisterTabCloseChangeListener(JTabbedPane, BaseTabCloseListener)`

### unregisterTabCloseChangeListener

    public static void unregisterTabCloseChangeListener(BaseTabCloseListener tabCloseListener)

  Unregisters the specified listener on tab-close events on all tabbed panes.

  Parameters:
    `tabCloseListener` - Listener to unregister.
  See Also:
    `registerTabCloseChangeListener(BaseTabCloseListener)`, `registerTabCloseChangeListener(JTabbedPane, BaseTabCloseListener)`, `unregisterTabCloseChangeListener(JTabbedPane, BaseTabCloseListener)`

### unregisterTabCloseChangeListener

    public static void unregisterTabCloseChangeListener(javax.swing.JTabbedPane tabbedPane,
                                                        BaseTabCloseListener tabCloseListener)

  Unregisters the specified listener on tab-close events on the specified tabbed pane.

  Parameters:
    `tabbedPane` - Tabbed pane. If `null`, the tab close listener is unregistered globally (for all tabbed panes).
    `tabCloseListener` - Listener to unregister.
  See Also:
    `registerTabCloseChangeListener(BaseTabCloseListener)`, `registerTabCloseChangeListener(JTabbedPane, BaseTabCloseListener)`, `unregisterTabCloseChangeListener(BaseTabCloseListener)`

### getAllTabCloseListeners

    public static java.util.Set<BaseTabCloseListener> getAllTabCloseListeners()

  Returns the set of all listeners registered on tab-close events on all tabbed panes.

  Returns:
    Set of all listeners registered on tab-close events on all tabbed panes.

### getAllTabCloseListeners

    public static java.util.Set<BaseTabCloseListener> getAllTabCloseListeners(javax.swing.JTabbedPane tabbedPane)

  Returns all listeners registered on tab closing of the specified tabbed pane.

  Parameters:
    `tabbedPane` - A tabbed pane. If `null`, all globally registered tab close listeners are returned.
  Returns:
    All listeners registered on tab closing of the specified tabbed pane.

### registerLocaleChangeListener

    public static void registerLocaleChangeListener(LocaleChangeListener localeListener)

  Registers a new listener on locale change.

  Parameters:
    `localeListener` - New listener on locale change.

### unregisterLocaleChangeListener

    public static void unregisterLocaleChangeListener(LocaleChangeListener localeListener)

  Unregisters a listener on locale change.

  Parameters:
    `localeListener` - The listener to unregister.

### getLocaleListeners

    public static java.util.Set<LocaleChangeListener> getLocaleListeners()

  Returns all listeners registered on locale change.

  Returns:
    All listeners registered on locale change.

### setWidgetVisible

    public static void setWidgetVisible(javax.swing.JRootPane rootPane,
                                        boolean visible,
                                        SubstanceConstants.SubstanceWidgetType... substanceWidgets)

  Sets the visibility of the specified widget kind(s). If the first `rootPane` parameter is `null`, this call applies to all root panes.

  Parameters:
    `rootPane` - Root pane. May be `null`.
    `visible` - Visibility indication.
    `substanceWidgets` - Widget types.
  Since:
    version 5.0

### isToUseConstantThemesOnDialogs

    public static boolean isToUseConstantThemesOnDialogs()

  Checks whether the `JOptionPane`s created with predefined message types should use constant themes for the icons.

  Returns:
    `true` if the `JOptionPane`s created with predefined message types should use constant themes for the icons, `false` otherwise.
  See Also:
    `setToUseConstantThemesOnDialogs(boolean)`

### setToUseConstantThemesOnDialogs

    public static void setToUseConstantThemesOnDialogs(boolean toUseConstantThemesOnDialogs)

  Sets the new setting for the icons of the `JOptionPane`s created with predefined message types.

  Parameters:
    `toUseConstantThemesOnDialogs` - if `true`, the `JOptionPane`s created with predefined message types should use constant themes for the icons.
  See Also:
    `isToUseConstantThemesOnDialogs()`

### setSkin

    public static boolean setSkin(SubstanceSkin newSkin)

  Sets the specified skin. If the current look-and-feel is not Substance, this method will create a new Substance look-and-feel based on the specified skin and set it on `UIManager`. This method does not require Substance to be the current look-and-feel.

  Parameters:
    `newSkin` - Skin to set.
  Returns:
    `true` if the specified skin has been set successfully, `false` otherwise.
  Since:
    version 3.1
  See Also:
    `setSkin(SubstanceSkin)`, `registerSkinChangeListener(SkinChangeListener)`, `unregisterSkinChangeListener(SkinChangeListener)`, `SubstanceSkin.isValid()`

### setSkin

    public static boolean setSkin(java.lang.String skinClassName)

  Sets the specified skin. If the current look-and-feel is not Substance, this method will create a new Substance look-and-feel based on the specified skin and set it on `UIManager`. This method does not require Substance to be the current look-and-feel.

  Parameters:
    `skinClassName` - Skin to set.
  Returns:
    `true` if the specified skin has been set successfully, `false` otherwise.
  Since:
    version 3.1
  See Also:
    `setSkin(SubstanceSkin)`, `registerSkinChangeListener(SkinChangeListener)`, `unregisterSkinChangeListener(SkinChangeListener)`, `SubstanceSkin.isValid()`

### getAllSkins

    public static java.util.Map<java.lang.String,SkinInfo> getAllSkins()

  Returns all available skins.

  Returns:
    All available skins. Key - skin display name, value - skin information.

### getSupportsWindowDecorations

    public boolean getSupportsWindowDecorations()

  Overrides:
    `getSupportsWindowDecorations` in class `javax.swing.LookAndFeel`

### setLabelBundleClassLoader

    public static void setLabelBundleClassLoader(java.lang.ClassLoader labelBundleClassLoader)

  Sets the class loader for `LABEL_BUNDLE`.

  Parameters:
    `labelBundleClassLoader` - Class loader for `LABEL_BUNDLE`.
  Since:
    version 3.1

### getTitlePaneComponent

    public static javax.swing.JComponent getTitlePaneComponent(java.awt.Window window)

  Returns the title pane of the specified top-level window.

  Parameters:
    `window` - Top-level window.
  Returns:
    If the parameter is either `JFrame` or `JDialog` and has custom decorations, the result is the title pane, `null` otherwise.
  Since:
    version 3.1

### setDecorationType

    public static void setDecorationType(javax.swing.JComponent comp,
                                         DecorationAreaType type)

  Sets the decoration type of the specified component and all its children.

  Parameters:
    `comp` - Component.
    `type` - Decoration type of the component and all its children.

### setDecorationType

    public static void setDecorationType(javax.swing.JComponent comp,
                                         DecorationAreaType type,
                                         boolean isPropagatingToChildren)

  Sets the decoration type of the specified component.

  Parameters:
    `comp` - Component.
    `type` - Decoration type of the component and its children if `isPropagatingToChildren` is `true`.
    `isPropagatingToChildren` - If `true`, the decoration type will be applied to the component children.

### isCurrentLookAndFeel

    public static boolean isCurrentLookAndFeel()

  Checks whether Substance is the current look-and-feel. This method is for internal use only.

  Returns:
    `true` if Substance is the current look-and-feel, `false` otherwise.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD