Class PaletteColor

All Implemented Interfaces:
EventListener, IGProp<GProp<?>[]>, IPropCnr, Cloneable
Direct Known Subclasses:
EditorPaletteColor

public class PaletteColor extends PropCnr
A palette color: one entry of an application's palette, holding one value per scheme.

The children are named by scheme. light and dark are reserved (ruling Q3, 2026-09-12); any other name is a custom scheme. Each child is either a ColorProp holding a literal (or inherit), or a ColorReference pointing at another palette color - the pointer that makes a role (ColorRoles) take an application's own color, and that lets one palette color follow another. A ColorProp child holding a referenced GColor is a verification error: inside a palette the pointer is the reference property, which listens to its target and rewrites itself on rename, while a %reference value does not.

What a palette color resolves to under a scheme is ColorResolver's: this class is the data. Storage is one .iiziColor file per palette color in a folder tree under the module's style folder, with .iiziPalette files as named selections over them (rulings Q1 and Q5); the file type, its editors and its base-properties.xml row arrive with the Designer phase (B3) - a property class must exist before the schema names it.

Author:
Christopher Mindus
  • Field Details

  • Constructor Details

    • PaletteColor

      public PaletteColor()
      Creates the palette color property container without a name. The name must be set in all cases using the setPropertyAtom call.
    • PaletteColor

      public PaletteColor(Atom propertyAtom)
      Creates the palette color property container with the specified name.
      Parameters:
      propertyAtom - the name of the palette color, unique within its folder.
  • Method Details

    • getSchemeValue

      public GProp<?> getSchemeValue(String scheme)
      Gets the value of a scheme.
      Parameters:
      scheme - The scheme name, null for none.
      Returns:
      The ColorProp or ColorReference child named by the scheme, or null if there is none (also for a null scheme, and for a child of another class).
    • hasScheme

      public boolean hasScheme(String scheme)
      Checks if a scheme has a value.
      Parameters:
      scheme - The scheme name.
      Returns:
      true if a ColorProp or ColorReference child carries that name.
    • verify

      public boolean verify(PropVerification verification)
      Verifies this palette color: a literal child must not hold a color reference, and a reference child must not lead into a cycle or deeper than ColorResolver.MAX_DEPTH references (pattern: ThemesProp.verify).
      Specified by:
      verify in interface IGProp<GProp<?>[]>
      Overrides:
      verify in class PropCnr
      Parameters:
      verification - The property verification class.
      Returns:
      true if verification should proceed, false if disposed of and verification should not take place.