com.smartgwt.client.tools

## 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 Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `EditContext` | `getDefaultEditContext()` Default EditContext that this palette should use.
    `EditPane` | `getDefaultEditContextAsEditPane()` Default EditContext that this palette should use.
    `EditTree` | `getDefaultEditContextAsEditTree()` Default EditContext that this palette should use.
    `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".
    `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.
    `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.
    `Palette` | `setDefaultEditContext(EditContext defaultEditContext)` Default EditContext that this palette should use.
    `Palette` | `setDefaultEditContext(EditPane defaultEditContext)` Default EditContext that this palette should use.
    `Palette` | `setDefaultEditContext(EditTree defaultEditContext)` Default EditContext that this palette should use.
    `Palette` | `setGenerateNames(boolean generateNames)` Whether created components should have their "ID" or "name" property automatically set to a unique value based on the component's type, eg, "ListGrid0".

- - ### Method Detail

    - #### 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 java.lang.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:
        `java.lang.IllegalStateException` - this property cannot be changed after the component has been created
      See Also:
        `Dashboards & Tools Framework Overview`

    - #### 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:
        `Dashboards & Tools Framework Overview`

    - #### 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