Class GGradient.Swatch

  • Enclosing class:
    GGradient

    public static class GGradient.Swatch
    extends java.lang.Object
    Inner class for a Swatch in a gradient.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int color
      The RGB color 0-0xFFFFFF.
      int stop
      The stop position (0-100) as percent value in the gradient direction.
    • Constructor Summary

      Constructors 
      Constructor Description
      Swatch​(int color, int stop)
      Constructs a swatch.
      Swatch​(ReadTransaction trans)
      Constructs a swatch from a Transaction.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void append​(SendTransaction trans)
      Appends a swatch to a transaction.
      boolean equals​(java.lang.Object o)
      Checks if two swatch objects are equal.
      java.lang.String getString()
      Gets the color as a String in the form described below.
      protected java.lang.String paramString()
      Returns the parameter string representing the state of this event.
      java.lang.String toString()
      Returns a string representation of this class instance and its values.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • color

        public final int color
        The RGB color 0-0xFFFFFF.
      • stop

        public final int stop
        The stop position (0-100) as percent value in the gradient direction.
    • Constructor Detail

      • Swatch

        public Swatch​(int color,
                      int stop)
        Constructs a swatch.
        Parameters:
        color - The RGB color 0-0xFFFFFF.
        stop - The stop position (0-100) as percent value in the gradient direction.
        Throws:
        java.lang.IllegalArgumentException - for range errors.
      • Swatch

        public Swatch​(ReadTransaction trans)
        Constructs a swatch from a Transaction.
    • Method Detail

      • append

        public void append​(SendTransaction trans)
        Appends a swatch to a transaction.
      • equals

        public boolean equals​(java.lang.Object o)
        Checks if two swatch objects are equal.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - another swatch object. If null, the swatches are not equal.
        Returns:
        true if equal, false otherwise.
      • getString

        public java.lang.String getString()
        Gets the color as a String in the form described below.
        Returns:
        the String as described above.
      • paramString

        protected java.lang.String paramString()
        Returns the parameter string representing the state of this event. This string is useful for debugging. Subclasses adds extra information to the string by preceding it with a comma followed by the extra information.
        Returns:
        the parameter string of this event.
      • toString

        public java.lang.String toString()
        Returns a string representation of this class instance and its values.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string representation of this class instance.