Class LinearGradientColorPalette

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.SizeOfHandler, Serializable

    public class LinearGradientColorPalette
    extends AbstractColorPalette
    Generates a linear gradient between the two colors or three colors if the second steps is >0.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected adams.core.base.BaseColor m_First
      the first color.
      protected int m_FirstSteps
      the number of steps to use between first/second color.
      protected adams.core.base.BaseColor m_Second
      the second color.
      protected int m_SecondSteps
      the number of steps to use between second/third color.
      protected adams.core.base.BaseColor m_Third
      the third color.
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void defineOptions()
      Adds options to the internal list of options.
      String firstStepsTipText()
      Returns the tip text for this property.
      String firstTipText()
      Returns the tip text for this property.
      com.kennycason.kumo.palette.ColorPalette generate​(adams.core.MessageCollection errors)
      Generates the color palette.
      adams.core.base.BaseColor getFirst()
      Returns the first color.
      int getFirstSteps()
      Returns the number of steps between first/second color.
      adams.core.base.BaseColor getSecond()
      Returns the second color.
      int getSecondSteps()
      Returns the number of steps between second/third color.
      adams.core.base.BaseColor getThird()
      Returns the third color.
      String globalInfo()
      Returns a string describing the object.
      String secondStepsTipText()
      Returns the tip text for this property.
      String secondTipText()
      Returns the tip text for this property.
      void setFirst​(adams.core.base.BaseColor value)
      Sets the first color.
      void setFirstSteps​(int value)
      Sets the number of steps between first/second color.
      void setSecond​(adams.core.base.BaseColor value)
      Sets the second color.
      void setSecondSteps​(int value)
      Sets the number of steps between second/third color.
      void setThird​(adams.core.base.BaseColor value)
      Sets the third color.
      String thirdTipText()
      Returns the tip text for this property.
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel
    • Field Detail

      • m_First

        protected adams.core.base.BaseColor m_First
        the first color.
      • m_Second

        protected adams.core.base.BaseColor m_Second
        the second color.
      • m_Third

        protected adams.core.base.BaseColor m_Third
        the third color.
      • m_FirstSteps

        protected int m_FirstSteps
        the number of steps to use between first/second color.
      • m_SecondSteps

        protected int m_SecondSteps
        the number of steps to use between second/third color.
    • Constructor Detail

      • LinearGradientColorPalette

        public LinearGradientColorPalette()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class adams.core.option.AbstractOptionHandler
      • setFirst

        public void setFirst​(adams.core.base.BaseColor value)
        Sets the first color.
        Parameters:
        value - the color
      • getFirst

        public adams.core.base.BaseColor getFirst()
        Returns the first color.
        Returns:
        the color
      • firstTipText

        public String firstTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setSecond

        public void setSecond​(adams.core.base.BaseColor value)
        Sets the second color.
        Parameters:
        value - the color
      • getSecond

        public adams.core.base.BaseColor getSecond()
        Returns the second color.
        Returns:
        the color
      • secondTipText

        public String secondTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setThird

        public void setThird​(adams.core.base.BaseColor value)
        Sets the third color.
        Parameters:
        value - the color
      • getThird

        public adams.core.base.BaseColor getThird()
        Returns the third color.
        Returns:
        the color
      • thirdTipText

        public String thirdTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setFirstSteps

        public void setFirstSteps​(int value)
        Sets the number of steps between first/second color.
        Parameters:
        value - the steps
      • getFirstSteps

        public int getFirstSteps()
        Returns the number of steps between first/second color.
        Returns:
        the steps
      • firstStepsTipText

        public String firstStepsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setSecondSteps

        public void setSecondSteps​(int value)
        Sets the number of steps between second/third color.
        Parameters:
        value - the steps
      • getSecondSteps

        public int getSecondSteps()
        Returns the number of steps between second/third color.
        Returns:
        the steps
      • secondStepsTipText

        public String secondStepsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • generate

        public com.kennycason.kumo.palette.ColorPalette generate​(adams.core.MessageCollection errors)
        Generates the color palette.
        Specified by:
        generate in class AbstractColorPalette
        Parameters:
        errors - for collecting errors
        Returns:
        the color palette, null if none generated