Interface Palette

All Known Implementing Classes:
HiddenPalette, ListPalette, MenuPalette, TilePalette, TreePalette

public interface Palette
An interface that provides the ability to create components from a PaletteNode.
  • Method Details

    • setDefaultEditContext

      Palette setDefaultEditContext(EditContext defaultEditContext)
      Default EditContext that this palette should use. Palettes generally create components via drag and drop, but may also support creation via double-click or other UI idioms when a defaultEditContext is set.

      If this method is called after the component has been drawn/initialized: Sets the default EditContext that this palette should use. Palettes generally create components via drag and drop, but may also support creation via double-click or other UI idioms when a defaultEditContext is set.
      Parameters:
      defaultEditContext - the default EditContext used by this Palette. Default value is null
      Returns:
      Palette instance, for chaining setter calls
    • getDefaultEditContext

      EditContext getDefaultEditContext()
      Default EditContext that this palette should use. Palettes generally create components via drag and drop, but may also support creation via double-click or other UI idioms when a defaultEditContext is set.
      Returns:
      Current defaultEditContext value. Default value is null
    • setDefaultEditContext

      Palette setDefaultEditContext(EditTree defaultEditContext)
      Default EditContext that this palette should use. Palettes generally create components via drag and drop, but may also support creation via double-click or other UI idioms when a defaultEditContext is set.

      If this method is called after the component has been drawn/initialized: Sets the default EditContext that this palette should use. Palettes generally create components via drag and drop, but may also support creation via double-click or other UI idioms when a defaultEditContext is set.
      Parameters:
      defaultEditContext - the default EditContext used by this Palette. Default value is null
      Returns:
      Palette instance, for chaining setter calls
    • getDefaultEditContextAsEditTree

      EditTree getDefaultEditContextAsEditTree()
      Default EditContext that this palette should use. Palettes generally create components via drag and drop, but may also support creation via double-click or other UI idioms when a defaultEditContext is set.
      Returns:
      Current defaultEditContext value. Default value is null
    • setDefaultEditContext

      Palette setDefaultEditContext(EditPane defaultEditContext)
      Default EditContext that this palette should use. Palettes generally create components via drag and drop, but may also support creation via double-click or other UI idioms when a defaultEditContext is set.

      If this method is called after the component has been drawn/initialized: Sets the default EditContext that this palette should use. Palettes generally create components via drag and drop, but may also support creation via double-click or other UI idioms when a defaultEditContext is set.
      Parameters:
      defaultEditContext - the default EditContext used by this Palette. Default value is null
      Returns:
      Palette instance, for chaining setter calls
    • getDefaultEditContextAsEditPane

      EditPane getDefaultEditContextAsEditPane()
      Default EditContext that this palette should use. Palettes generally create components via drag and drop, but may also support creation via double-click or other UI idioms when a defaultEditContext is set.
      Returns:
      Current defaultEditContext value. Default value is null
    • setGenerateNames

      Palette setGenerateNames(boolean generateNames) throws IllegalStateException
      Whether created components should have their "ID" or "name" property automatically set to a unique value based on the component's type, eg, "ListGrid0".
      Parameters:
      generateNames - New generateNames value. Default value is true
      Returns:
      Palette instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getGenerateNames

      boolean getGenerateNames()
      Whether created components should have their "ID" or "name" property automatically set to a unique value based on the component's type, eg, "ListGrid0".
      Returns:
      Current generateNames value. Default value is true
      See Also:
    • makeEditNode

      EditNode makeEditNode(PaletteNode paletteNode)
      Given a PaletteNode, make an EditNode from it by creating a liveObject from the PaletteNode.defaults and copying presentation properties (eg title to the editNode.

      If editNodeProperties is specified as an object on on the paletteNode, each property in this object will also be copied across to the editNode.

      Parameters:
      paletteNode - paletteNode to create from
      Returns:
      created EditNode
    • makeEditNode

      EditNode makeEditNode(PaletteNode paletteNode, EditContext editContext)
      Given a PaletteNode, make an EditNode from it by creating a liveObject from the PaletteNode.defaults and copying presentation properties (eg title to the editNode.

      If editNodeProperties is specified as an object on on the paletteNode, each property in this object will also be copied across to the editNode.

      Parameters:
      paletteNode - paletteNode to create from
      editContext - the EditContext where the node will be added. Only required in +{EditContext.screenMode,screenMode}.
      Returns:
      created EditNode