public class PaletteNode extends TreeNode
A PaletteNode
expresses visual properties for how the palette will display it (eg title
, icon
) as
well as instructions for creating the component the paletteNode represents (type
, defaults
).
Various types of palettes (ListPalette
, TreePalette
, MenuPalette
, TilePalette
) render a PaletteNode in different ways, and allow the user to trigger creation
in different ways (eg drag and drop, or just click). All share a common pattern for how components are created from
palettes.
Note that in a TreePalette, a PaletteNode is essentially a TreeNode
and can have properties expected for a TreeNode (eg, showDropIcon
). Likewise a PaletteNode in a
MenuPalette can have the properties of a MenuItem
, such as MenuItem.enableIf()
.
id
factoryCreated, factoryProperties
Constructor and Description |
---|
PaletteNode() |
PaletteNode(JavaScriptObject jsObj) |
Modifier and Type | Method and Description |
---|---|
Canvas |
getCanvasDefaults()
Defaults for the component to be created from this palette.
|
Canvas |
getCanvasLiveObject()
For a paletteNode which should be a "singleton", that is, always provides the exact same object (==) rather than a
dynamically created copy, provide the singleton object as
liveObject . |
DrawItem |
getDrawItemDefaults()
Defaults for the component to be created from this palette.
|
DrawItem |
getDrawItemLiveObject()
For a paletteNode which should be a "singleton", that is, always provides the exact same object (==) rather than a
dynamically created copy, provide the singleton object as
liveObject . |
DrawPane |
getDrawPaneDefaults()
Defaults for the component to be created from this palette.
|
DrawPane |
getDrawPaneLiveObject()
For a paletteNode which should be a "singleton", that is, always provides the exact same object (==) rather than a
dynamically created copy, provide the singleton object as
liveObject . |
EditNode |
getEditNodeProperties()
Properties to be applied to the
editNode when created. |
EditProxy |
getEditProxyProperties()
Properties to be applied to the
liveObject .editProxy when created. |
FormItem |
getFormItemDefaults()
Defaults for the component to be created from this palette.
|
FormItem |
getFormItemLiveObject()
For a paletteNode which should be a "singleton", that is, always provides the exact same object (==) rather than a
dynamically created copy, provide the singleton object as
liveObject . |
java.lang.String |
getIcon()
Icon for this paletteNode.
|
static PaletteNode |
getOrCreateRef(JavaScriptObject jsObj) |
java.lang.String |
getTitle()
Textual title for this paletteNode.
|
java.lang.String |
getType()
String this paletteNode creates, for example, "ListGrid".
|
void |
setCanvasDefaults(Canvas defaults)
Defaults for the component to be created from this palette.
|
void |
setCanvasLiveObject(Canvas liveObject)
For a paletteNode which should be a "singleton", that is, always provides the exact same object (==) rather than a
dynamically created copy, provide the singleton object as
liveObject . |
void |
setDrawItemDefaults(DrawItem defaults)
Defaults for the component to be created from this palette.
|
void |
setDrawItemLiveObject(DrawItem liveObject)
For a paletteNode which should be a "singleton", that is, always provides the exact same object (==) rather than a
dynamically created copy, provide the singleton object as
liveObject . |
void |
setDrawPaneDefaults(DrawPane defaults)
Defaults for the component to be created from this palette.
|
void |
setDrawPaneLiveObject(DrawPane liveObject)
For a paletteNode which should be a "singleton", that is, always provides the exact same object (==) rather than a
dynamically created copy, provide the singleton object as
liveObject . |
void |
setEditNodeProperties(EditNode editNodeProperties)
Properties to be applied to the
editNode when created. |
void |
setEditProxyProperties(EditProxy editProxyProperties)
Properties to be applied to the
liveObject .editProxy when created. |
void |
setFormItemDefaults(FormItem defaults)
Defaults for the component to be created from this palette.
|
void |
setFormItemLiveObject(FormItem liveObject)
For a paletteNode which should be a "singleton", that is, always provides the exact same object (==) rather than a
dynamically created copy, provide the singleton object as
liveObject . |
void |
setIcon(java.lang.String icon)
Icon for this paletteNode.
|
void |
setTitle(java.lang.String title)
Textual title for this paletteNode.
|
void |
setType(java.lang.String type)
String this paletteNode creates, for example, "ListGrid".
|
getCanAcceptDrop, getCanDrag, getEnabled, getName, getShowDropIcon, getShowOpenIcon, setCanAcceptDrop, setCanDrag, setChildren, setEnabled, setID, setIsFolder, setName, setParentID, setShowDropIcon, setShowOpenIcon
get_baseStyle, get_canEdit, get_canRemove, getBackgroundComponent, getCanExpand, getCanSelect, getCustomStyle, getDetailDS, getIncludeInSummary, getIsGridSummary, getIsGroupSummary, getIsSeparator, getLinkText, getSingleCellValue, set_baseStyle, set_canEdit, set_canRemove, setBackgroundComponent, setCanExpand, setCanSelect, setCustomStyle, setDetailDS, setIncludeInSummary, setIsGridSummary, setIsGroupSummary, setIsSeparator, setLinkText, setSingleCellValue
convertToRecordArray, copyAttributes, copyAttributesInto, getAttributeAsRecordArray, getAttributeAsRecordList, isARecord, toMap
getRef, getRef, internalSetID
applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated
public PaletteNode()
public PaletteNode(JavaScriptObject jsObj)
public static PaletteNode getOrCreateRef(JavaScriptObject jsObj)
public void setCanvasDefaults(Canvas defaults)
For example, if type
is "ListGrid", properties valid to pass to ListGrid.create().
Note that event handlers or method overrides cannot be configured as defaults
, as they cannot be serialized
or restored. Instead, create a subclass that implements the desired behaviors, and use that subclass as type
.
See also Reflection
for
special concerns when making a GWT subclass usable in Component XML
and
Dashboards & Tools
in general.
defaults
- Default value is nullpublic Canvas getCanvasDefaults()
For example, if type
is "ListGrid", properties valid to pass to ListGrid.create().
Note that event handlers or method overrides cannot be configured as defaults
, as they cannot be serialized
or restored. Instead, create a subclass that implements the desired behaviors, and use that subclass as type
.
See also Reflection
for
special concerns when making a GWT subclass usable in Component XML
and
Dashboards & Tools
in general.
public void setCanvasLiveObject(Canvas liveObject)
liveObject
. Instead of dynamically creating
an object from defaults, the liveObject
will simply be assigned to liveObject
for the created editNode.
liveObject
- Default value is nullpublic Canvas getCanvasLiveObject()
liveObject
. Instead of dynamically creating
an object from defaults, the liveObject
will simply be assigned to liveObject
for the created editNode.
public void setDrawItemDefaults(DrawItem defaults)
For example, if type
is "ListGrid", properties valid to pass to ListGrid.create().
Note that event handlers or method overrides cannot be configured as defaults
, as they cannot be serialized
or restored. Instead, create a subclass that implements the desired behaviors, and use that subclass as type
.
See also Reflection
for
special concerns when making a GWT subclass usable in Component XML
and
Dashboards & Tools
in general.
defaults
- Default value is nullpublic DrawItem getDrawItemDefaults()
For example, if type
is "ListGrid", properties valid to pass to ListGrid.create().
Note that event handlers or method overrides cannot be configured as defaults
, as they cannot be serialized
or restored. Instead, create a subclass that implements the desired behaviors, and use that subclass as type
.
See also Reflection
for
special concerns when making a GWT subclass usable in Component XML
and
Dashboards & Tools
in general.
public void setDrawItemLiveObject(DrawItem liveObject)
liveObject
. Instead of dynamically creating
an object from defaults, the liveObject
will simply be assigned to liveObject
for the created editNode.
liveObject
- Default value is nullpublic DrawItem getDrawItemLiveObject()
liveObject
. Instead of dynamically creating
an object from defaults, the liveObject
will simply be assigned to liveObject
for the created editNode.
public void setDrawPaneDefaults(DrawPane defaults)
For example, if type
is "ListGrid", properties valid to pass to ListGrid.create().
Note that event handlers or method overrides cannot be configured as defaults
, as they cannot be serialized
or restored. Instead, create a subclass that implements the desired behaviors, and use that subclass as type
.
See also Reflection
for
special concerns when making a GWT subclass usable in Component XML
and
Dashboards & Tools
in general.
defaults
- Default value is nullpublic DrawPane getDrawPaneDefaults()
For example, if type
is "ListGrid", properties valid to pass to ListGrid.create().
Note that event handlers or method overrides cannot be configured as defaults
, as they cannot be serialized
or restored. Instead, create a subclass that implements the desired behaviors, and use that subclass as type
.
See also Reflection
for
special concerns when making a GWT subclass usable in Component XML
and
Dashboards & Tools
in general.
public void setDrawPaneLiveObject(DrawPane liveObject)
liveObject
. Instead of dynamically creating
an object from defaults, the liveObject
will simply be assigned to liveObject
for the created editNode.
liveObject
- Default value is nullpublic DrawPane getDrawPaneLiveObject()
liveObject
. Instead of dynamically creating
an object from defaults, the liveObject
will simply be assigned to liveObject
for the created editNode.
public void setEditNodeProperties(EditNode editNodeProperties)
editNode
when created.editNodeProperties
- Default value is nullpublic EditNode getEditNodeProperties()
editNode
when created.public void setEditProxyProperties(EditProxy editProxyProperties)
liveObject
.editProxy
when created.editProxyProperties
- Default value is nullpublic EditProxy getEditProxyProperties()
liveObject
.editProxy
when created.public void setFormItemDefaults(FormItem defaults)
For example, if type
is "ListGrid", properties valid to pass to ListGrid.create().
Note that event handlers or method overrides cannot be configured as defaults
, as they cannot be serialized
or restored. Instead, create a subclass that implements the desired behaviors, and use that subclass as type
.
See also Reflection
for
special concerns when making a GWT subclass usable in Component XML
and
Dashboards & Tools
in general.
defaults
- Default value is nullpublic FormItem getFormItemDefaults()
For example, if type
is "ListGrid", properties valid to pass to ListGrid.create().
Note that event handlers or method overrides cannot be configured as defaults
, as they cannot be serialized
or restored. Instead, create a subclass that implements the desired behaviors, and use that subclass as type
.
See also Reflection
for
special concerns when making a GWT subclass usable in Component XML
and
Dashboards & Tools
in general.
public void setFormItemLiveObject(FormItem liveObject)
liveObject
. Instead of dynamically creating
an object from defaults, the liveObject
will simply be assigned to liveObject
for the created editNode.
liveObject
- Default value is nullpublic FormItem getFormItemLiveObject()
liveObject
. Instead of dynamically creating
an object from defaults, the liveObject
will simply be assigned to liveObject
for the created editNode.
public void setIcon(java.lang.String icon)
public java.lang.String getIcon()
public void setTitle(java.lang.String title)
setTitle
in class TreeNode
title
- Default value is nullTree.setTitleProperty(java.lang.String)
,
Tree.getTitle(com.smartgwt.client.widgets.tree.TreeNode)
public java.lang.String getTitle()
getTitle
in class TreeNode
Tree.getTitleProperty()
,
Tree.getTitle(com.smartgwt.client.widgets.tree.TreeNode)
public void setType(java.lang.String type)
type
- See SCClassName
. Default value is nullpublic java.lang.String getType()
SCClassName