Package 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
Modifier and TypeMethodDescriptionDefault 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".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.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".
-
Method Details
-
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.- 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
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
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
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
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.- 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.- Parameters:
paletteNode
- paletteNode to create fromeditContext
- theEditContext
where the node will be added. Only required in +{EditContext.screenMode,screenMode}.- Returns:
- created EditNode
-