Class SubstanceSkin

    • Constructor Detail

      • SubstanceSkin

        protected SubstanceSkin​()
        Constructs the basic data structures for a skin.
    • Method Detail

      • getBorderPainter

        public final SubstanceBorderPainter getBorderPainter​()
        Returns the border painter of this skin.
        Returns:
        The border painter of this skin. A valid skin cannot have a null value returned from this method. Call isValid() to verify that the skin is valid.
        See Also:
        isValid()
      • getHighlightBorderPainter

        public final SubstanceBorderPainter getHighlightBorderPainter​()
        Returns the highlight border painter of this skin.
        Returns:
        The highlight border painter of this skin. The return value of this method may be null. In this case, call getBorderPainter().
      • getButtonShaper

        public final SubstanceButtonShaper getButtonShaper​()
        Returns the button shaper of this skin.
        Returns:
        The button shaper of this skin. A valid skin cannot have a null value returned from this method. Call isValid() to verify that the skin is valid.
        See Also:
        isValid()
      • getFillPainter

        public final SubstanceFillPainter getFillPainter​()
        Returns the fill painter of this skin.
        Returns:
        The fill painter of this skin. A valid skin cannot have a null value returned from this method. Call isValid() to verify that the skin is valid.
        See Also:
        isValid()
      • getHighlightPainter

        public final SubstanceHighlightPainter getHighlightPainter​()
        Returns the highlight painter of this skin.
        Returns:
        The highlight painter of this skin. A valid skin cannot have a null value returned from this method. Call isValid() to verify that the skin is valid.
        See Also:
        isValid()
      • getDecorationPainter

        public final SubstanceDecorationPainter getDecorationPainter​()
        Returns the decoration painter of this skin.
        Returns:
        The decoration painter of this skin. A valid skin cannot have a null value returned from this method. Call isValid() to verify that the skin is valid.
        See Also:
        isValid()
      • getColorScheme

        public final SubstanceColorScheme getColorScheme​(java.awt.Component comp,
                                                         ComponentState componentState)
        Returns the color scheme of the specified component in the specified component state.
        Parameters:
        comp - Component.
        componentState - Component state.
        Returns:
        The color scheme of the component in the specified component state.
      • getHighlightAlpha

        public final float getHighlightAlpha​(java.awt.Component comp,
                                             ComponentState componentState)
        Returns the alpha channel of the highlight color scheme of the component.
        Parameters:
        comp - Component.
        componentState - Component state.
        Returns:
        Highlight color scheme alpha channel.
      • getAlpha

        public final float getAlpha​(java.awt.Component comp,
                                    ComponentState componentState)
        Returns the alpha channel of the color scheme of the component.
        Parameters:
        comp - Component.
        componentState - Component state.
        Returns:
        Color scheme alpha channel.
      • registerDecorationAreaSchemeBundle

        public void registerDecorationAreaSchemeBundle​(SubstanceColorSchemeBundle bundle,
                                                       SubstanceColorScheme backgroundColorScheme,
                                                       SubstanceSlices.DecorationAreaType... areaTypes)
        Registers the specified color scheme bundle and background color scheme to be used on controls in decoration areas.
        Parameters:
        bundle - The color scheme bundle to use on controls in decoration areas.
        backgroundColorScheme - The color scheme to use for background of controls in decoration areas.
        areaTypes - Enumerates the area types that are affected by the parameters.
      • registerDecorationAreaSchemeBundle

        public void registerDecorationAreaSchemeBundle​(SubstanceColorSchemeBundle bundle,
                                                       SubstanceSlices.DecorationAreaType... areaTypes)
        Registers the specified color scheme bundle to be used on controls in decoration areas.
        Parameters:
        bundle - The color scheme bundle to use on controls in decoration areas.
        areaTypes - Enumerates the area types that are affected by the parameters.
      • getTabFadeStart

        public final double getTabFadeStart​()
        Returns the start of fade effect on tabs in JTabbedPanes. This value can be used to create XP-like "headers" on the selected tabs.
        Returns:
        The start of fade effect on the selected tabs in JTabbedPanes.
        See Also:
        getTabFadeEnd(), DEFAULT_TAB_FADE_START
      • getTabFadeEnd

        public final double getTabFadeEnd​()
        Returns the end of fade effect on tabs in JTabbedPanes. This value can be used to create XP-like "headers" on the selected tabs.
        Returns:
        The end of fade effect on the selected tabs in JTabbedPanes.
        See Also:
        getTabFadeStart(), DEFAULT_TAB_FADE_END
      • setTabFadeEnd

        public void setTabFadeEnd​(double tabFadeEnd)
        Sets the end of fade effect on tabs in JTabbedPanes. The value should be in 0.0-1.0 range.
        Parameters:
        tabFadeEnd - The end of fade effect on tabs in JTabbedPanes. Should be in 0.0-1.0 range.
        See Also:
        DEFAULT_TAB_FADE_END
      • setTabFadeStart

        public void setTabFadeStart​(double tabFadeStart)
        Sets the start of fade effect on selected tabs in JTabbedPanes. The value should be in 0.0-1.0 range.
        Parameters:
        tabFadeStart - The start of fade effect on tabs in JTabbedPane s. Should be in 0.0-1.0 range.
        See Also:
        DEFAULT_TAB_FADE_START
      • addOverlayPainter

        public void addOverlayPainter​(SubstanceOverlayPainter overlayPainter,
                                      SubstanceSlices.DecorationAreaType... areaTypes)
        Adds the specified overlay painter to the end of the list of overlay painters associated with the specified decoration area types.
        Parameters:
        overlayPainter - Overlay painter to add to the end of the list of overlay painters associated with the specified decoration area types.
        areaTypes - Decoration area types.
      • removeOverlayPainter

        public void removeOverlayPainter​(SubstanceOverlayPainter overlayPainter,
                                         SubstanceSlices.DecorationAreaType... areaTypes)
        Removes the specified overlay painter from the list of overlay painters associated with the specified decoration area types.
        Parameters:
        overlayPainter - Overlay painter to remove from the list of overlay painters associated with the specified decoration area types.
        areaTypes - Decoration area types.
      • clearOverlayPainters

        public void clearOverlayPainters​(SubstanceSlices.DecorationAreaType... areaTypes)
        Removes all overlay painters associated with the specified decoration area types.
        Parameters:
        areaTypes - Decoration area types.
      • getOverlayPainters

        public java.util.List<SubstanceOverlayPainter> getOverlayPainters​(SubstanceSlices.DecorationAreaType decorationAreaType)
        Returns a non-null, non-modifiable list of overlay painters associated with the specified decoration area type.
        Parameters:
        decorationAreaType - Decoration area type.
        Returns:
        A non-null, non-modifiable list of overlay painters associated with the specified decoration area type.
      • getColorScheme

        public final SubstanceColorScheme getColorScheme​(SubstanceSlices.DecorationAreaType decorationAreaType,
                                                         SubstanceSlices.ColorSchemeAssociationKind associationKind,
                                                         ComponentState componentState)
        Returns the color scheme to be used for painting the specified visual area of components in the specified decoration area.
        Parameters:
        decorationAreaType - Decoration area type.
        associationKind - Color scheme association kind.
        componentState - Component state.
        Returns:
        Color scheme to be used for painting the specified visual area of components in the specified decoration area.
      • getColorScheme

        public final SubstanceColorScheme getColorScheme​(java.awt.Component comp,
                                                         SubstanceSlices.ColorSchemeAssociationKind associationKind,
                                                         ComponentState componentState)
        Returns the color scheme to be used for painting the specified visual area of the component under the specified component state.
        Parameters:
        comp - Component.
        associationKind - Color scheme association kind.
        componentState - Component state.
        Returns:
        Color scheme to be used for painting the specified visual area of the component under the specified component state.
      • getDirectColorScheme

        public final SubstanceColorScheme getDirectColorScheme​(java.awt.Component comp,
                                                               SubstanceSlices.ColorSchemeAssociationKind associationKind,
                                                               ComponentState componentState)
        Returns the color scheme to be used for painting the specified visual area of the component under the specified component state.
        Parameters:
        comp - Component.
        associationKind - Color scheme association kind.
        componentState - Component state.
        Returns:
        Color scheme to be used for painting the specified visual area of the component under the specified component state.
      • transform

        public SubstanceSkin transform​(ColorSchemeTransform transform,
                                       java.lang.String name)
        Creates a new skin that has the same settings as this skin with the addition of applying the specified color scheme transformation on all the relevant color schemes.
        Parameters:
        transform - Color scheme transformation.
        name - The name of the new skin.
        Returns:
        The new skin.
      • setOptionPaneIconColorScheme

        public void setOptionPaneIconColorScheme​(SubstanceColorScheme colorScheme,
                                                 int... optionPaneMessageTypes)
      • getOptionPaneIconColorScheme

        public SubstanceColorScheme getOptionPaneIconColorScheme​(int optionPaneMessageType)
      • getColorSchemes

        public static SubstanceSkin.ColorSchemes getColorSchemes​(java.io.InputStream inputStream)
        Returns the collection of color schemes in the specified input stream.
        Parameters:
        inputStream - Input stream for the resource containing the description of Substance color schemes.
        Returns:
        The collection of color schemes in the specified input stream.