Class JDFLabColor

All Implemented Interfaces:
Serializable, Cloneable, Iterable<Object>, Collection<Object>, List<Object>, RandomAccess, JDFBaseDataTypes

public class JDFLabColor extends JDFNumList
This class is a representation of a Lab color (JDFLabColor). It is a blank separated list of double values consisting of L, a and b value.
See Also:
  • Constructor Details

    • JDFLabColor

      public JDFLabColor()
      constructs a Lab color with all values set to 0.0 Double
    • JDFLabColor

      @Deprecated public JDFLabColor(Vector v) throws DataFormatException
      Deprecated.
      use typesafe constructors
      constructs a Lab color with all values set via a Vector of Double objects
      Parameters:
      v - the given vector
      Throws:
      DataFormatException - - if the Vector has not a valid format
    • JDFLabColor

      public JDFLabColor(String s) throws DataFormatException
      constructs a Lab color with all values set via a String
      Parameters:
      s - the given String
      Throws:
      DataFormatException - - if the String has not a valid format
    • JDFLabColor

      public JDFLabColor(JDFLabColor nl)
      constructs a Lab color with all values set via a JDFNumberList
      Parameters:
      nl - the given number list
      Throws:
      DataFormatException - - if the String does not have a valid format
    • JDFLabColor

      public JDFLabColor(double l, double a, double b)
      constructs a new Lab color with the given double values
      Parameters:
      l - the value L
      a - the value a
      b - the value b
  • Method Details

    • createLabColor

      public static JDFLabColor createLabColor(String s)
      factory for JDFShape that silently returns null in case of illegal strings
      Parameters:
      s - the string to parse - if JDFXYPair compatible, a 0 z dimension value is assumed
      Returns:
      the JDFShape, null if s is not compatible
    • isValid

      public boolean isValid() throws DataFormatException
      isValid - true if the size of the vector is 3 and all objects are Double types
      Specified by:
      isValid in class JDFNumList
      Returns:
      boolean - true if all instances are Double or Integer types
      Throws:
      DataFormatException - - if the Vector has not a valid format
    • getL

      public double getL()
      getL - returns the value L of the Lab color
      Returns:
      double - the value L of the Lab color
    • setL

      public void setL(double l)
      setL - sets the value L of the Lab color
      Parameters:
      l - the value L of the Lab color
    • getA

      public double getA()
      getA - returns the value a of the Lab color
      Returns:
      double - the value a of the Lab color
    • setA

      public void setA(double a)
      setA - sets the value a of the Lab color
      Parameters:
      a - the value a of the Lab color
    • getB

      public double getB()
      getB - returns the value b of the Lab color
      Returns:
      double - the value b of the Lab color
    • setB

      public void setB(double b)
      setB - sets the value b of the Lab color
      Parameters:
      b - the value b of the Lab color
    • deltaE

      public double deltaE(JDFLabColor other)
      simple lab distance disregarding all the new fangled calculations
      Parameters:
      other -
      Returns: