Class HiddenPalette

java.lang.Object
com.smartgwt.client.core.BaseClass
com.smartgwt.client.tools.HiddenPalette
All Implemented Interfaces:
HasHandlers, Palette

public class HiddenPalette extends BaseClass implements Palette
A Palette with no visible representation that handles programmatic creation of components.
See Also:
  • Constructor Details

    • HiddenPalette

      public HiddenPalette()
    • HiddenPalette

      public HiddenPalette(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static HiddenPalette getOrCreateRef(JavaScriptObject jsObj)
    • setJavaScriptObject

      public void setJavaScriptObject(JavaScriptObject jsObj)
      Overrides:
      setJavaScriptObject in class BaseClass
    • create

      public JavaScriptObject create()
      Specified by:
      create in class BaseClass
    • isCreated

      public boolean isCreated()
      Overrides:
      isCreated in class BaseClass
    • getJsObj

      public JavaScriptObject getJsObj()
      Overrides:
      getJsObj in class BaseClass
    • getOrCreateJsObj

      public JavaScriptObject getOrCreateJsObj()
      Overrides:
      getOrCreateJsObj in class BaseClass
    • setData

      public HiddenPalette setData(PaletteNode... data) throws IllegalStateException
      A list of PaletteNodes for component creation.
      Parameters:
      data - New data value. Default value is null
      Returns:
      HiddenPalette instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getData

      public PaletteNode[] getData()
      A list of PaletteNodes for component creation.
      Returns:
      Current data value. Default value is null
    • setDefaultEditContext

      public HiddenPalette 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.
      Specified by:
      setDefaultEditContext in interface Palette
      Parameters:
      defaultEditContext - the default EditContext used by this Palette. Default value is null
      Returns:
      HiddenPalette instance, for chaining setter calls
    • getDefaultEditContext

      public 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.
      Specified by:
      getDefaultEditContext in interface Palette
      Returns:
      Current defaultEditContext value. Default value is null
    • setDefaultEditContext

      public HiddenPalette 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.
      Specified by:
      setDefaultEditContext in interface Palette
      Parameters:
      defaultEditContext - the default EditContext used by this Palette. Default value is null
      Returns:
      HiddenPalette instance, for chaining setter calls
    • getDefaultEditContextAsEditTree

      public 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.
      Specified by:
      getDefaultEditContextAsEditTree in interface Palette
      Returns:
      Current defaultEditContext value. Default value is null
    • setDefaultEditContext

      public HiddenPalette 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.
      Specified by:
      setDefaultEditContext in interface Palette
      Parameters:
      defaultEditContext - the default EditContext used by this Palette. Default value is null
      Returns:
      HiddenPalette instance, for chaining setter calls
    • getDefaultEditContextAsEditPane

      public 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.
      Specified by:
      getDefaultEditContextAsEditPane in interface Palette
      Returns:
      Current defaultEditContext value. Default value is null
    • setGenerateNames

      public HiddenPalette 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".
      Specified by:
      setGenerateNames in interface Palette
      Parameters:
      generateNames - New generateNames value. Default value is true
      Returns:
      HiddenPalette instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
      See Also:
    • getGenerateNames

      public 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".
      Specified by:
      getGenerateNames in interface Palette
      Returns:
      Current generateNames value. Default value is true
      See Also:
    • makeEditNode

      public 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.

      Specified by:
      makeEditNode in interface Palette
      Parameters:
      paletteNode - paletteNode to create from
      Returns:
      created EditNode
    • makeEditNode

      public 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.

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