Package com.smartgwt.client.tools
Class HiddenPalette
java.lang.Object
com.smartgwt.client.core.BaseClass
com.smartgwt.client.tools.HiddenPalette
- All Implemented Interfaces:
HasHandlers
,Palette
A Palette with no visible representation that handles programmatic creation of components.
- See Also:
-
Field Summary
Fields inherited from class com.smartgwt.client.core.BaseClass
config, configOnly, factoryCreated, factoryProperties, id, scClassName
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
getData()
A list ofPaletteNodes
for component creation.Default EditContext that this palette should use.Default EditContext that this palette should use.Default EditContext that this palette should use.boolean
Whether created components should have their "ID" or "name" property automatically set to a unique value based on the component's type, eg, "ListGrid0".getJsObj()
static HiddenPalette
getOrCreateRef
(JavaScriptObject jsObj) boolean
makeEditNode
(PaletteNode paletteNode) Given aPaletteNode
, make anEditNode
from it by creating aliveObject
from thePaletteNode.defaults
and copying presentation properties (egtitle
to the editNode.makeEditNode
(PaletteNode paletteNode, EditContext editContext) Given aPaletteNode
, make anEditNode
from it by creating aliveObject
from thePaletteNode.defaults
and copying presentation properties (egtitle
to the editNode.setData
(PaletteNode... data) A list ofPaletteNodes
for component creation.setDefaultEditContext
(EditContext defaultEditContext) Default EditContext that this palette should use.setDefaultEditContext
(EditPane defaultEditContext) Default EditContext that this palette should use.setDefaultEditContext
(EditTree defaultEditContext) Default EditContext that this palette should use.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".void
Methods inherited from class com.smartgwt.client.core.BaseClass
addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, asSGWTComponent, clearDynamicProperty, createJsObj, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getID, getRef, getRuleScope, getScClassName, getTestInstance, hasAutoAssignedID, hasDynamicProperty, internalSetID, internalSetID, isConfigOnly, isFactoryCreated, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setFactoryCreated, setID, setProperty, setProperty, setProperty, setProperty, setRuleScope, setScClassName
-
Constructor Details
-
HiddenPalette
public HiddenPalette() -
HiddenPalette
-
-
Method Details
-
getOrCreateRef
-
setJavaScriptObject
- Overrides:
setJavaScriptObject
in classBaseClass
-
create
-
isCreated
public boolean isCreated() -
getJsObj
-
getOrCreateJsObj
- Overrides:
getOrCreateJsObj
in classBaseClass
-
setData
A list ofPaletteNodes
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
A list ofPaletteNodes
for component creation.- Returns:
- Current data value. Default value is null
-
setDefaultEditContext
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 interfacePalette
- Parameters:
defaultEditContext
- the default EditContext used by this Palette. Default value is null- Returns:
HiddenPalette
instance, for chaining setter calls
-
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 interfacePalette
- Returns:
- Current defaultEditContext value. Default value is null
-
setDefaultEditContext
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 interfacePalette
- Parameters:
defaultEditContext
- the default EditContext used by this Palette. Default value is null- Returns:
HiddenPalette
instance, for chaining setter calls
-
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 interfacePalette
- Returns:
- Current defaultEditContext value. Default value is null
-
setDefaultEditContext
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 interfacePalette
- Parameters:
defaultEditContext
- the default EditContext used by this Palette. Default value is null- Returns:
HiddenPalette
instance, for chaining setter calls
-
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 interfacePalette
- Returns:
- Current defaultEditContext value. Default value is null
-
setGenerateNames
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 interfacePalette
- 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 interfacePalette
- Returns:
- Current generateNames value. Default value is true
- See Also:
-
makeEditNode
Given aPaletteNode
, make anEditNode
from it by creating aliveObject
from thePaletteNode.defaults
and copying presentation properties (egtitle
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 interfacePalette
- Parameters:
paletteNode
- paletteNode to create from- Returns:
- created EditNode
-
makeEditNode
Given aPaletteNode
, make anEditNode
from it by creating aliveObject
from thePaletteNode.defaults
and copying presentation properties (egtitle
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 interfacePalette
- Parameters:
paletteNode
- paletteNode to create fromeditContext
- theEditContext
where the node will be added. Only required in +{EditContext.screenMode,screenMode}.- Returns:
- created EditNode
-