Class CommandButtonFollowColorSchemeIcon

  • All Implemented Interfaces:
    javax.swing.Icon, org.pushingpixels.radiance.common.api.icon.RadianceIcon

    public class CommandButtonFollowColorSchemeIcon
    extends java.lang.Object
    implements org.pushingpixels.radiance.common.api.icon.RadianceIcon
    Implementation of RadianceIcon for command buttons that wish to have their icon be dynamically rendered at runtime based on the color scheme that matches the current transition-aware state.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  CommandButtonFollowColorSchemeIcon.Delegate
      The delegate needs to implement the method in this interface based on the provided color scheme.
      • Nested classes/interfaces inherited from interface org.pushingpixels.radiance.common.api.icon.RadianceIcon

        org.pushingpixels.radiance.common.api.icon.RadianceIcon.ColorFilter, org.pushingpixels.radiance.common.api.icon.RadianceIcon.Factory
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getIconHeight()  
      int getIconWidth()  
      void paintIcon​(java.awt.Component c, java.awt.Graphics g, int x, int y)  
      void setColorFilter​(org.pushingpixels.radiance.common.api.icon.RadianceIcon.ColorFilter colorFilter)  
      void setDimension​(java.awt.Dimension newDimension)  
      boolean supportsColorFilter()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.pushingpixels.radiance.common.api.icon.RadianceIcon

        toImage
    • Constructor Detail

      • CommandButtonFollowColorSchemeIcon

        public CommandButtonFollowColorSchemeIcon​(org.pushingpixels.radiance.theming.api.RadianceThemingSlices.ColorSchemeAssociationKind colorSchemeAssociationKind,
                                                  CommandButtonFollowColorSchemeIcon.Delegate delegate,
                                                  java.awt.Dimension initialDim)
        Creates a new icon.
        Parameters:
        colorSchemeAssociationKind - Color scheme association kind to use for determining the color scheme for this icon.
        delegate - Delegate to compute the actual icons.
        initialDim - Initial icon dimension.
    • Method Detail

      • paintIcon

        public void paintIcon​(java.awt.Component c,
                              java.awt.Graphics g,
                              int x,
                              int y)
        Specified by:
        paintIcon in interface javax.swing.Icon
      • setDimension

        public void setDimension​(java.awt.Dimension newDimension)
        Specified by:
        setDimension in interface org.pushingpixels.radiance.common.api.icon.RadianceIcon
      • supportsColorFilter

        public boolean supportsColorFilter()
        Specified by:
        supportsColorFilter in interface org.pushingpixels.radiance.common.api.icon.RadianceIcon
      • setColorFilter

        public void setColorFilter​(org.pushingpixels.radiance.common.api.icon.RadianceIcon.ColorFilter colorFilter)
        Specified by:
        setColorFilter in interface org.pushingpixels.radiance.common.api.icon.RadianceIcon
      • getIconHeight

        public int getIconHeight()
        Specified by:
        getIconHeight in interface javax.swing.Icon
      • getIconWidth

        public int getIconWidth()
        Specified by:
        getIconWidth in interface javax.swing.Icon