Documentation of 'info.monitorenter.gui.util.HSBColor' Java class
HSBColor
info.monitorenter.gui.util

Class HSBColor

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable


    public class HSBColor
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Cloneable
    Color that internally works with the Hue Saturation Luminance color space.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      HSBColor(java.awt.Color rgbcolor)
      Creates an instance transformed from the rgb color.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object clone()
      Clone implementation.
      boolean equals(java.lang.Object obj) 
      java.awt.Color getRGBColor()
      Returns the transformation of this color to the rgb color.
      int hashCode() 
      static HSBColor rgbToHSB(java.awt.Color color)
      Inspired by float[] java.awt.Color.RGBtoHSB(int r,int g, int b, float[]hsbvals) except that algorithm is tuned
      Testing results showed about 25% speed up.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HSBColor

        public HSBColor(java.awt.Color rgbcolor)
        Creates an instance transformed from the rgb color.

        Parameters:
        rgbcolor - standard java rgb color.
    • Method Detail

      • rgbToHSB

        public static HSBColor rgbToHSB(java.awt.Color color)
        Inspired by float[] java.awt.Color.RGBtoHSB(int r,int g, int b, float[]hsbvals) except that algorithm is tuned
        Testing results showed about 25% speed up. Therefore the sources have become harder to understand.
        Parameters:
        color - the java.awt.Color (that follows the RGB model) and should be transformed to a color instance in the hue-saturation-luminance model.
        Returns:
        the transformed values of the RGB colors in that order: hue,saturation,brightness.
      • clone

        public java.lang.Object clone()
        Clone implementation.

        Following statements are true:
        x.clone() != x x.clone().getClass() == x.getClass() x.clone().equals(x) A deep copy of this HSBColor is returned.

        Overrides:
        clone in class java.lang.Object
        Returns:
        an instance copied from this one.
      • equals

        public boolean equals(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • getRGBColor

        public java.awt.Color getRGBColor()
        Returns the transformation of this color to the rgb color.

        Returns:
        the transformation of this color to the rgb color.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.