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

    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 `defaults` and copying presentation properties (eg `title` to the editNode.
    `void` | `setDefaultEditContext(EditContext defaultEditContext)` Default EditContext that this palette should use.
    `void` | `setDefaultEditContext(EditPane defaultEditContext)` Default EditContext that this palette should use.
    `void` | `setDefaultEditContext(EditTree defaultEditContext)` Default EditContext that this palette should use.
    `void` | `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

          void 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

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

    - #### setDefaultEditContext

          void 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

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

    - #### setDefaultEditContext

          void 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

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

    - #### setGenerateNames

          void 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` - Default value is true
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the component has been created
      See Also:
        `DevTools overview and related methods`

    - #### 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:
        boolean
      See Also:
        `DevTools overview and related methods`

    - #### makeEditNode

          EditNode makeEditNode(PaletteNode paletteNode)

      Given a `PaletteNode`, make an `EditNode` from it by creating a `liveObject` from the `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