Documentation of 'org.jhotdraw.color.DefaultColorSliderModel' Java class
DefaultColorSliderModel
org.jhotdraw.color

Class DefaultColorSliderModel

    • Constructor Detail

      • DefaultColorSliderModel

        public DefaultColorSliderModel()
        Creates a color slider model with an ICC sRGB color space.
      • DefaultColorSliderModel

        public DefaultColorSliderModel(java.awt.color.ColorSpace sys)
        Creates a color slider model with the specified color space.
    • Method Detail

      • setColorSpace

        public void setColorSpace(java.awt.color.ColorSpace newValue)
        Description copied from interface: ColorSliderModel
        Changes the ColorSpace used by this ColorSliderModel.
        Parameters:
        newValue - ColorSpace.
      • configureSlider

        public void configureSlider(int componentIndex,
                                    javax.swing.JSlider slider)
        Configures a JSlider for this model. If the JSlider is already configured for another model, it is unconfigured first.
      • unconfigureSlider

        public void unconfigureSlider(javax.swing.JSlider slider)
        Unconfigures a JSlider from this model.
      • getBoundedRangeModel

        public javax.swing.DefaultBoundedRangeModel getBoundedRangeModel(int componentIndex)
        Returns the bounded range model of the specified color componentIndex.
        Parameters:
        componentIndex - .
        Returns:
        BoundedRangeModel.
      • getSliderValue

        public int getSliderValue(int componentIndex)
        Returns the value of the specified color componentIndex.
      • setSliderValue

        public void setSliderValue(int componentIndex,
                                   int value)
        Sets the value of the specified color componentIndex.
      • addColorSlider

        public void addColorSlider(javax.swing.JSlider slider)
      • removeColorSlider

        public void removeColorSlider(javax.swing.JSlider slider)
      • getColorSpace

        public java.awt.color.ColorSpace getColorSpace()
        Description copied from interface: ColorSliderModel
        Returns the ColorSpace used by this ColorSliderModel.
        Returns:
        ColorSpace.
      • getComponentCount

        public int getComponentCount()
        Description copied from interface: ColorSliderModel
        Returns the number of components used by this ColorSliderModel.
        Returns:
        Component count.
      • getColor

        public java.awt.Color getColor()
        Description copied from interface: ColorSliderModel
        Returns the color value of the model. This is a convenience method for calling getCompositeColor().getColor().
        Returns:
        color.
      • getInterpolatedRGB

        public int getInterpolatedRGB(int i,
                                      float componentValue)
        Description copied from interface: ColorSliderModel
        Returns an RGB value based on the value of the specified component index and value, based on the values of all other components of the model.
        Returns:
        RGB value.
      • setComponent

        public void setComponent(int i,
                                 float newValue)
        Description copied from interface: ColorSliderModel
        Sets a value for an individual component.
      • getComponent

        public float getComponent(int i)
        Description copied from interface: ColorSliderModel
        Gets a value of an individual component.
        Returns:
        Value
      • setColor

        public void setColor(java.awt.Color newValue)
        Description copied from interface: ColorSliderModel
        Sets the color value of the model. This is a convenience method for calling setCompositeColor(new CompositeColor(getColorSpace(), color.getRGB());
        Parameters:
        newValue - .
      • getComponents

        public float[] getComponents()
        Description copied from interface: ColorSliderModel
        Gets all component values.
        Returns:
        Values.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.