Class Color4Prop

All Implemented Interfaces:
EventListener, IGProp<Object[]>, Cloneable

public class Color4Prop extends MultiProp<GColor>
Property used by UI styles that has 4 settings/values for color, such as the border color (top/bottom/left/right).
Author:
Christopher Mindus
  • Constructor Details

    • Color4Prop

      public Color4Prop()
      Creates a new 4-color property without name.
    • Color4Prop

      public Color4Prop(Atom propertyAtom)
      Creates a new 4-color property with a name.
      Parameters:
      propertyAtom - the property atom.
  • Method Details

    • appendPropValueItem

      protected void appendPropValueItem(SendTransaction trans, GColor value)
      Appends a color to a transaction. A referenced color travels with the color it resolves to at send time as its fallback, as in ColorProp.
      Specified by:
      appendPropValueItem in class MultiProp<GColor>
      Parameters:
      trans - The transaction.
      value - The value to append.
    • createValue

      public GColor createValue(ReadTransaction trans)
      Creates a new color from a transaction.
      Specified by:
      createValue in class MultiProp<GColor>
    • initializeValueElement

      protected void initializeValueElement(GColor value, Element element)
      Saves a color to an element.
      Specified by:
      initializeValueElement in class MultiProp<GColor>
      Parameters:
      value - The value to "stream" to the XML element.
      element - The XML value element, attributes "index" "null" are "taken".
    • createValue

      protected GColor createValue(Element element) throws Exception
      Creates a color from an element.
      Specified by:
      createValue in class MultiProp<GColor>
      Parameters:
      element - The XML value element, attributes "index" and "null" are "taken".
      Throws:
      Exception - For errors.