public class EditPane extends Canvas implements EditContext
Palette
, and direct manipulation of the position and size of those components. Any drag onto an EditPane from a Palette will add an EditNode created from the dragged PaletteNode.
config, configOnly, id, nativeObject, scClassName
Constructor and Description |
---|
EditPane() |
EditPane(com.google.gwt.core.client.JavaScriptObject jsObj) |
Modifier and Type | Method and Description |
---|---|
EditNode |
addFromPaletteNode(PaletteNode paletteNode)
Creates a new EditNode from a PaletteNode, using the
defaultPalette . |
EditNode |
addFromPaletteNode(PaletteNode paletteNode,
EditNode parentNode)
Creates a new EditNode from a PaletteNode, using the
defaultPalette . |
EditNode[] |
addFromPaletteNodes(PaletteNode[] paletteNodes)
Add the supplied
PaletteNodes to the parentNode, preserving internal
references from one supplied PaletteNode to another. |
EditNode[] |
addFromPaletteNodes(PaletteNode[] paletteNodes,
EditNode parentNode)
Add the supplied
PaletteNodes to the parentNode, preserving internal
references from one supplied PaletteNode to another. |
EditNode |
addNode(EditNode newNode)
Add a new
EditNode to the EditContext, under the specified parent. |
EditNode |
addNode(EditNode newNode,
EditNode parentNode) |
EditNode |
addNode(EditNode newNode,
EditNode parentNode,
java.lang.Integer index) |
EditNode |
addNode(EditNode newNode,
EditNode parentNode,
java.lang.Integer index,
java.lang.String parentProperty) |
EditNode |
addNode(EditNode newNode,
EditNode parentNode,
java.lang.Integer index,
java.lang.String parentProperty,
java.lang.Boolean skipParentComponentAdd)
Add a new
EditNode to the EditContext, under the specified parent. |
void |
addPaletteNodesFromJS(java.lang.String jsCode)
Add
PaletteNodes from a JavaScript source representation. |
void |
addPaletteNodesFromJS(java.lang.String jsCode,
EditNode parentNode) |
void |
addPaletteNodesFromJS(java.lang.String jsCode,
EditNode parentNode,
java.lang.String[] globals)
Add
PaletteNodes from a JavaScript source representation. |
void |
addPaletteNodesFromJSON(java.lang.String jsonString)
Recreate
EditNodes from a JSON representation of PaletteNodes (possibly created by calling EditContext.serializeAllEditNodesAsJSON() or EditContext.serializeEditNodesAsJSON() . |
void |
addPaletteNodesFromJSON(java.lang.String jsonString,
EditNode parentNode) |
void |
addPaletteNodesFromJSON(java.lang.String jsonString,
EditNode parentNode,
java.lang.String[] globals)
Recreate
EditNodes from a JSON representation of PaletteNodes (possibly created by calling EditContext.serializeAllEditNodesAsJSON() or EditContext.serializeEditNodesAsJSON() . |
void |
addPaletteNodesFromXML(java.lang.String xmlString)
Recreate
EditNodes from an XML representation of PaletteNodes (possibly created by calling EditContext.serializeAllEditNodes() or EditContext.serializeEditNodes() . |
void |
addPaletteNodesFromXML(java.lang.String xmlString,
EditNode parentNode) |
void |
addPaletteNodesFromXML(java.lang.String xmlString,
EditNode parentNode,
java.lang.String[] globals)
Recreate
EditNodes from an XML representation of PaletteNodes (possibly created by calling EditContext.serializeAllEditNodes() or EditContext.serializeEditNodes() . |
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
Canvas defaults)
Changes the defaults for Canvas AutoChildren named
autoChildName . |
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
FormItem defaults)
Changes the defaults for FormItem AutoChildren named
autoChildName . |
protected com.google.gwt.core.client.JavaScriptObject |
create() |
void |
destroyAll()
|
Palette |
getDefaultPalette()
Palette to use when an EditNode is being created
directly by this EditContext, instead of being created due to a user interaction with a palette (eg dragging from a
TreePalette , or clicking on MenuPalette ). |
Palette[] |
getExtraPalettes()
Additional
Palettes to consult for metadata when deserializing Edit Nodes . |
com.smartgwt.logicalstructure.core.LogicalStructureObject |
getLogicalStructure() |
static EditPane |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
void |
getPaletteNodesFromJS(java.lang.String jsCode,
PaletteNodeCallback callback)
Obtain
PaletteNodes from a JavaScript source representation. |
void |
getPaletteNodesFromJS(java.lang.String jsCode,
PaletteNodeCallback callback,
java.lang.String[] globals)
Obtain
PaletteNodes from a JavaScript source representation. |
void |
getPaletteNodesFromXML(java.lang.String xmlString,
PaletteNodeCallback callback)
Obtain
PaletteNodes from an XML representation, but do not add them to the
EditContext. |
boolean |
getPersistCoordinates()
If enabled, changes to a
liveObject 's position and size will be
persisted to their EditNodes . |
PaletteNode[] |
getSaveData()
Returns an Array of
PaletteNode s representing all current EditNode s in this pane, suitable for saving and restoring via passing each paletteNode to
addNode() . |
EditNode |
makeEditNode(PaletteNode paletteNode)
Creates and returns an EditNode using the
defaultPalette . |
void |
removeAll()
Removes all
EditNodes from the EditContext, but does not destroy the liveObjects . |
void |
removeNodeProperties(EditNode editNode,
java.lang.String[] properties)
Removes the specified properties from an editNode's serializable "defaults".
|
java.lang.String |
serializeAllEditNodes()
Serialize the tree of
EditNodes to an XML representation of PaletteNodes . |
java.lang.String |
serializeAllEditNodes(java.lang.Boolean serverless)
Serialize the tree of
EditNodes to an XML representation of PaletteNodes . |
java.lang.String |
serializeAllEditNodesAsJSON()
Encode the tree of
EditNodes to a JSON representation of PaletteNodes . |
java.lang.String |
serializeAllEditNodesAsJSON(java.lang.Boolean serverless)
Encode the tree of
EditNodes to a JSON representation of PaletteNodes . |
java.lang.String |
serializeEditNodes(EditNode[] nodes)
Serialize the provided
EditNodes to an XML representation of PaletteNodes . |
java.lang.String |
serializeEditNodes(EditNode[] nodes,
java.lang.Boolean serverless)
Serialize the provided
EditNodes to an XML representation of PaletteNodes . |
java.lang.String |
serializeEditNodesAsJSON(EditNode[] nodes)
Serialize the provided
EditNodes to a JSON representation of PaletteNodes . |
java.lang.String |
serializeEditNodesAsJSON(EditNode[] nodes,
java.lang.Boolean serverless)
Serialize the provided
EditNodes to a JSON representation of PaletteNodes . |
void |
setDefaultPalette(Palette defaultPalette)
Palette to use when an EditNode is being created
directly by this EditContext, instead of being created due to a user interaction with a palette (eg dragging from a
TreePalette , or clicking on MenuPalette ). |
static void |
setDefaultProperties(EditPane editPaneProperties)
Class level method to set the default properties of this class.
|
void |
setExtraPalettes(Palette... extraPalettes)
Additional
Palettes to consult for metadata when deserializing Edit Nodes . |
com.smartgwt.logicalstructure.core.LogicalStructureObject |
setLogicalStructure(com.smartgwt.logicalstructure.widgets.tools.EditPaneLogicalStructure s) |
void |
setNodeProperties(EditNode editNode,
Canvas properties)
Update an editNode's serializable "defaults" with the supplied properties.
|
void |
setNodeProperties(EditNode editNode,
Canvas properties,
java.lang.Boolean skipLiveObjectUpdate)
Update an editNode's serializable "defaults" with the supplied properties.
|
void |
setPersistCoordinates(boolean persistCoordinates)
If enabled, changes to a
liveObject 's position and size will be
persisted to their EditNodes . |
addChild, addChild, addChild, addChild, addChild, addClickHandler, addDoubleClickHandler, addDragMoveHandler, addDragRepositionMoveHandler, addDragRepositionStartHandler, addDragRepositionStopHandler, addDragResizeMoveHandler, addDragResizeStartHandler, addDragResizeStopHandler, addDragStartHandler, addDragStopHandler, addDropHandler, addDropMoveHandler, addDropOutHandler, addDropOverHandler, addFocusChangedHandler, addHoverHandler, addHoverHiddenHandler, addKeyDownHandler, addKeyPressHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseStillDownHandler, addMouseUpHandler, addMouseWheelHandler, addMovedHandler, addParentMovedHandler, addPeer, addPeer, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addScrolledHandler, addShowContextMenuHandler, addStyleName, addVisibilityChangedHandler, adjustForContent, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateMove, animateMove, animateMove, animateMove, animateRect, animateRect, animateRect, animateRect, animateResize, animateResize, animateResize, animateResize, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateShow, animateShow, animateShow, animateShow, animateShow, animateShow, asSGWTComponent, blur, bringToFront, clear, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsFocus, containsPoint, containsPoint, deparent, depeer, disable, enable, focus, focusInNextTabElement, focusInPreviousTabElement, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaRole, getAutoDraw, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBottom, getById, getByJSObject, getByLocalId, getCanAcceptDrop, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, getCanvasAutoChild, getCanvasItem, getChildren, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getClassName, getComponentMask, getComponentMaskDefaults, getContentElement, getContents, getContextMenu, getCursor, getDataPath, getDefaultHeight, getDefaultWidth, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragMaskType, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragType, getDropTypes, getDropTypesAsString, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getElement, getElement, getEventEdge, getEventEdge, getExtraSpace, getFacetId, getFormItemAutoChild, getFullDataPath, getGroupBorderCSS, getGroupLabelBackgroundColor, getGroupLabelStyleName, getGroupTitle, getHeight, getHeightAsString, getHideUsingDisplayNone, getHoverAlign, getHoverAutoDestroy, getHoverComponent, getHoverDelay, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapOrigin, getHSnapOrigin, getHSnapPosition, getHSnapPosition, getHtmlElement, getHtmlPosition, getImage, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getKeepInParentRect, getLayoutAlign, getLeft, getLeftAsString, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getMargin, getMasterCanvas, getMasterElement, getMatchElement, getMaxHeight, getMaxWidth, getMenuConstructor, getMinHeight, getMinWidth, getMomentumScrollMinSpeed, getMouseStillDownDelay, getMouseStillDownInitialDelay, getNextZIndex, getNoDoubleClicks, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOuterElement, getOverflow, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getParentCanvas, getParentElement, getPeers, getPercentBox, getPercentSource, getPosition, getPrefix, getPrintChildrenAbsolutelyPositioned, getPrintHTML, getPrintHTML, getPrompt, getRect, getRedrawOnResize, getResizeBarTarget, getResizeFrom, getRight, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowDepth, getShadowImage, getShadowOffset, getShadowSoftness, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowHoverComponents, getShowResizeBar, getShowShadow, getShrinkElementOnHide, getSkinImgDir, getSnapAxis, getSnapEdge, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapResizeToGrid, getSnapTo, getSnapToGrid, getSnapVDirection, getSnapVGap, getStyleName, getTabIndex, getTestInstance, getTitle, getTooltip, getTop, getTopAsString, getTopElement, getUseBackMask, getUseDragMask, getUseNativeDrag, getUseOpacityFilter, getValuesManager, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWidth, getVSnapOrigin, getVSnapOrigin, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getZIndex, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideComponentMask, hideContextMenu, imgHTML, imgHTML, imgHTML, intersects, isDirty, isDisabled, isDrawn, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, onAttach, onDetach, onInit, parentResized, printComponents, redraw, redraw, removeChild, removeChild, removePeer, removePeer, resizeBy, resizeTo, resizeTo, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAlign, setAllowExternalFilters, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaRole, setAriaState, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoDraw, setAutoHeight, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBottom, setCanAcceptDrop, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setChildren, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setComponentMaskDefaults, setContents, setContextMenu, setCursor, setDataPath, setDefaultHeight, setDefaultProperties, setDefaultWidth, setDisabled, setDisabledCursor, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragMaskType, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragType, setDropTypes, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setElement, setExtraSpace, setFacetId, setGroupBorderCSS, setGroupLabelBackgroundColor, setGroupLabelStyleName, setGroupTitle, setHeight, setHeight, setHeight, setHeight100, setHideUsingDisplayNone, setHoverAlign, setHoverAutoDestroy, setHoverDelay, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlElement, setHtmlPosition, setImage, setImage, setInitHandler, setIsGroup, setKeepInParentRect, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeft, setLeft, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setLogicalStructure, setMargin, setMatchElement, setMaxHeight, setMaxWidth, setMenuConstructor, setMinHeight, setMinWidth, setMomentumScrollMinSpeed, setMouseStillDownDelay, setMouseStillDownInitialDelay, setNeverUseFilters, setNoDoubleClicks, setOpacity, setOverflow, setPadding, setPageLeft, setPageTop, setParentCanvas, setParentElement, setPeers, setPercentBox, setPercentSource, setPosition, setPrefix, setPrintChildrenAbsolutelyPositioned, setPrompt, setRect, setRect, setRedrawOnResize, setResizeBarTarget, setResizeFrom, setResizeFrom, setRight, setScrollbarConstructor, setScrollbarSize, setShadowDepth, setShadowImage, setShadowOffset, setShadowSoftness, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowHoverComponents, setShowResizeBar, setShowShadow, setShrinkElementOnHide, setSkinImgDir, setSmoothFade, setSnapAxis, setSnapEdge, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToGrid, setSnapTo, setSnapToGrid, setSnapVDirection, setSnapVGap, setStyleName, setTabIndex, setTitle, setTooltip, setTop, setTop, setUseBackMask, setUseDragMask, setUseNativeDrag, setUseOpacityFilter, setValuesManager, setVisibility, setVisible, setWidth, setWidth, setWidth, setWidth100, setZIndex, shouldDragScroll, show, showClickMask, showComponentMask, showComponentMask, showNextTo, showNextTo, showNextTo, showNextTo, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, updateEditNode, updateHover, updateHover, updateShadow, visibleAtPoint, willAcceptDrop
addDrawHandler, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDateArray, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsFloatArray, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hasAutoAssignedID, hashCode, initNativeObject, internalSetID, internalSetID, isConfigOnly, isCreated, onBind, onDestroy, onDraw, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setDragTracker, setID, setJavaScriptObject, setLogicalStructure, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setScClassName, toString
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents
public EditPane()
public EditPane(com.google.gwt.core.client.JavaScriptObject jsObj)
public static EditPane getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public static void changeAutoChildDefaults(java.lang.String autoChildName, Canvas defaults)
autoChildName
.autoChildName
- name of an AutoChild to customize the defaults for.defaults
- Canvas defaults to apply. These defaults override any existing properties
without destroying or wiping out non-overridden properties.AutoChildUsage
public static void changeAutoChildDefaults(java.lang.String autoChildName, FormItem defaults)
autoChildName
.autoChildName
- name of an AutoChild to customize the defaults for.defaults
- FormItem defaults to apply. These defaults override any existing properties
without destroying or wiping out non-overridden properties.AutoChildUsage
protected com.google.gwt.core.client.JavaScriptObject create()
public void setDefaultPalette(Palette defaultPalette)
Palette
to use when an EditNode
is being created
directly by this EditContext, instead of being created due to a user interaction with a palette (eg dragging from a
TreePalette
, or clicking on MenuPalette
). If no
defaultPalette is provided, the EditContext uses an automatically created HiddenPalette
.
If this method is called after the component has been drawn/initialized:
Palette
to use when an EditNode
is being created directly by this EditContext, instead of being created due to a user interaction with a palette (eg dragging from a TreePalette
, or clicking on MenuPalette
).
If no defaultPalette is provided, the EditContext uses an automatically created HiddenPalette
.
setDefaultPalette
in interface EditContext
defaultPalette
- the default Palette. Default value is nullpublic Palette getDefaultPalette()
Palette
to use when an EditNode
is being created
directly by this EditContext, instead of being created due to a user interaction with a palette (eg dragging from a
TreePalette
, or clicking on MenuPalette
). If no
defaultPalette is provided, the EditContext uses an automatically created HiddenPalette
.
getDefaultPalette
in interface EditContext
Palette
to use when an EditNode
is being created
directly by this EditContext, instead of being created due to a user interaction with a palette (eg dragging from a
TreePalette
, or clicking on MenuPalette
). If no
defaultPalette is provided, the EditContext uses an automatically created HiddenPalette
.
public void setExtraPalettes(Palette... extraPalettes)
Palettes
to consult for metadata when deserializing Edit Nodes
. Note that the defaultPalette
is always consulted and need not be provided
again here.setExtraPalettes
in interface EditContext
extraPalettes
- Default value is nullpublic Palette[] getExtraPalettes()
Palettes
to consult for metadata when deserializing Edit Nodes
. Note that the defaultPalette
is always consulted and need not be provided
again here.getExtraPalettes
in interface EditContext
public void setPersistCoordinates(boolean persistCoordinates)
liveObject
's position and size will be
persisted to their EditNodes
. This applies to both programmatic calls and
user interaction (drag reposition or drag resize).setPersistCoordinates
in interface EditContext
persistCoordinates
- Default value is truepublic boolean getPersistCoordinates()
liveObject
's position and size will be
persisted to their EditNodes
. This applies to both programmatic calls and
user interaction (drag reposition or drag resize).getPersistCoordinates
in interface EditContext
public PaletteNode[] getSaveData()
PaletteNode
s representing all current EditNode
s in this pane, suitable for saving and restoring via passing each paletteNode to
addNode()
.public EditNode addFromPaletteNode(PaletteNode paletteNode)
defaultPalette
. If you have an array of possibly inter-related PaletteNodes, then you should use addFromPaletteNodes()
on the array instead, in order to
preserve the relationships.addFromPaletteNode
in interface EditContext
paletteNode
- the palette node to use to create the new nodeEditContext.addFromPaletteNodes(com.smartgwt.client.tools.PaletteNode[])
public EditNode addFromPaletteNode(PaletteNode paletteNode, EditNode parentNode)
defaultPalette
. If you have an array of possibly inter-related PaletteNodes, then you should use addFromPaletteNodes()
on the array instead, in order to
preserve the relationships.addFromPaletteNode
in interface EditContext
paletteNode
- the palette node to use to create the new nodeparentNode
- optional the parent node if the new node should appear under a specific parentEditContext.addFromPaletteNodes(com.smartgwt.client.tools.PaletteNode[])
public EditNode[] addFromPaletteNodes(PaletteNode[] paletteNodes)
PaletteNodes
to the parentNode, preserving internal
references from one supplied PaletteNode to another. This method should be used with an array of possibly inter-related
PaletteNodes (for instance, those produced as a result of serialization via serializeAllEditNodes()
, rather than calling addFromPaletteNode()
on each individual PaletteNode.addFromPaletteNodes
in interface EditContext
paletteNodes
- array of PaletteNodesEditContext.addFromPaletteNode(com.smartgwt.client.tools.PaletteNode)
public EditNode[] addFromPaletteNodes(PaletteNode[] paletteNodes, EditNode parentNode)
PaletteNodes
to the parentNode, preserving internal
references from one supplied PaletteNode to another. This method should be used with an array of possibly inter-related
PaletteNodes (for instance, those produced as a result of serialization via serializeAllEditNodes()
, rather than calling addFromPaletteNode()
on each individual PaletteNode.addFromPaletteNodes
in interface EditContext
paletteNodes
- array of PaletteNodesparentNode
- parent to add to (defaults to the root)EditContext.addFromPaletteNode(com.smartgwt.client.tools.PaletteNode)
public EditNode addNode(EditNode newNode)
EditNode
to the EditContext, under the specified parent. The EditContext will interrogate the parent and new nodes to determine what field within the parent allows a child of this type, and to find a method to add the newNode's liveObject to the parentNode's liveObject. The new relationship will then be stored in the tree of EditNodes.
For example, when a Tab is dropped on a TabSet, the field TabSet.tabs is discovered as the correct target field via naming conventions, and the method TabSet.addTab() is likewise discovered as the correct method to add a Tab to a TabSet.
addNode
in interface EditContext
newNode
- new node to be addedpublic EditNode addNode(EditNode newNode, EditNode parentNode)
addNode
in interface EditContext
EditPane#addNode()}
public EditNode addNode(EditNode newNode, EditNode parentNode, java.lang.Integer index)
addNode
in interface EditContext
EditPane#addNode()}
public EditNode addNode(EditNode newNode, EditNode parentNode, java.lang.Integer index, java.lang.String parentProperty)
addNode
in interface EditContext
EditPane#addNode()}
public EditNode addNode(EditNode newNode, EditNode parentNode, java.lang.Integer index, java.lang.String parentProperty, java.lang.Boolean skipParentComponentAdd)
EditNode
to the EditContext, under the specified parent. The EditContext will interrogate the parent and new nodes to determine what field within the parent allows a child of this type, and to find a method to add the newNode's liveObject to the parentNode's liveObject. The new relationship will then be stored in the tree of EditNodes.
For example, when a Tab is dropped on a TabSet, the field TabSet.tabs is discovered as the correct target field via naming conventions, and the method TabSet.addTab() is likewise discovered as the correct method to add a Tab to a TabSet.
addNode
in interface EditContext
newNode
- new node to be addedparentNode
- parent to add the new node under.index
- index within the parent's children arrayparentProperty
- the property of the liveParent to which the new node should be added, if not
auto-discoverable from the schemaskipParentComponentAdd
- whether to skip adding the liveObject to the liveParent (default false)public void addPaletteNodesFromJS(java.lang.String jsCode)
PaletteNodes
from a JavaScript source representation. By default,
components that have global IDs
will not actually be allowed to take
those global IDs - instead, only widgets that have one of the global IDs passed as the globals
parameter
will actually receive their global IDs. To override this behavior, pass the special value ALL_GLOBALS
for the globals
parameter.
addPaletteNodesFromJS
in interface EditContext
jsCode
- JavaScript code to eval.public void addPaletteNodesFromJS(java.lang.String jsCode, EditNode parentNode)
addPaletteNodesFromJS
in interface EditContext
EditPane#addPaletteNodesFromJS()}
public void addPaletteNodesFromJS(java.lang.String jsCode, EditNode parentNode, java.lang.String[] globals)
PaletteNodes
from a JavaScript source representation. By default,
components that have global IDs
will not actually be allowed to take
those global IDs - instead, only widgets that have one of the global IDs passed as the globals
parameter
will actually receive their global IDs. To override this behavior, pass the special value ALL_GLOBALS
for the globals
parameter.
addPaletteNodesFromJS
in interface EditContext
jsCode
- JavaScript code to eval.parentNode
- parent node (defaults to the root)globals
- widgets to allow to take their global IDspublic void addPaletteNodesFromJSON(java.lang.String jsonString)
EditNodes
from a JSON representation of PaletteNodes
(possibly created by calling EditContext.serializeAllEditNodesAsJSON()
or EditContext.serializeEditNodesAsJSON()
. By default,
components that have global IDs
will not actually be allowed to take
those global IDs - instead, only widgets that have one of the global IDs passed as the globals
parameter
will actually receive their global IDs. To override this behavior, pass the special value ALL_GLOBALS
for the globals
parameter.
addPaletteNodesFromJSON
in interface EditContext
jsonString
- JSON stringEditContext.serializeAllEditNodesAsJSON()
,
EditContext.serializeEditNodesAsJSON(com.smartgwt.client.tools.EditNode[])
public void addPaletteNodesFromJSON(java.lang.String jsonString, EditNode parentNode)
addPaletteNodesFromJSON
in interface EditContext
EditPane#addPaletteNodesFromJSON()}
public void addPaletteNodesFromJSON(java.lang.String jsonString, EditNode parentNode, java.lang.String[] globals)
EditNodes
from a JSON representation of PaletteNodes
(possibly created by calling EditContext.serializeAllEditNodesAsJSON()
or EditContext.serializeEditNodesAsJSON()
. By default,
components that have global IDs
will not actually be allowed to take
those global IDs - instead, only widgets that have one of the global IDs passed as the globals
parameter
will actually receive their global IDs. To override this behavior, pass the special value ALL_GLOBALS
for the globals
parameter.
addPaletteNodesFromJSON
in interface EditContext
jsonString
- JSON stringparentNode
- parent node (defaults to the root)globals
- widgets to allow to take their global IDsEditContext.serializeAllEditNodesAsJSON()
,
EditContext.serializeEditNodesAsJSON(com.smartgwt.client.tools.EditNode[])
public void addPaletteNodesFromXML(java.lang.String xmlString)
EditNodes
from an XML representation of PaletteNodes
(possibly created by calling EditContext.serializeAllEditNodes()
or EditContext.serializeEditNodes()
. By default, components
that have global IDs
will not actually be allowed to take those global
IDs - instead, only widgets that have one of the global IDs passed as the globals
parameter will actually
receive their global IDs. To override this behavior, pass the special value ALL_GLOBALS
for the globals
parameter.
addPaletteNodesFromXML
in interface EditContext
xmlString
- XML stringEditContext.serializeAllEditNodes()
,
EditContext.serializeEditNodes(com.smartgwt.client.tools.EditNode[])
public void addPaletteNodesFromXML(java.lang.String xmlString, EditNode parentNode)
addPaletteNodesFromXML
in interface EditContext
EditPane#addPaletteNodesFromXML()}
public void addPaletteNodesFromXML(java.lang.String xmlString, EditNode parentNode, java.lang.String[] globals)
EditNodes
from an XML representation of PaletteNodes
(possibly created by calling EditContext.serializeAllEditNodes()
or EditContext.serializeEditNodes()
. By default, components
that have global IDs
will not actually be allowed to take those global
IDs - instead, only widgets that have one of the global IDs passed as the globals
parameter will actually
receive their global IDs. To override this behavior, pass the special value ALL_GLOBALS
for the globals
parameter.
addPaletteNodesFromXML
in interface EditContext
xmlString
- XML stringparentNode
- parent node (defaults to the root)globals
- widgets to allow to take their global IDsEditContext.serializeAllEditNodes()
,
EditContext.serializeEditNodes(com.smartgwt.client.tools.EditNode[])
public void destroyAll()
destroyAll
in interface EditContext
public void getPaletteNodesFromJS(java.lang.String jsCode, PaletteNodeCallback callback)
PaletteNodes
from a JavaScript source representation. By
default, components that have global IDs
will not actually be allowed
to take those global IDs - instead, only widgets that have one of the global IDs passed as the globals
parameter will actually receive their global IDs. To override this behavior, pass the special value ALL_GLOBALS
for the globals
parameter.
getPaletteNodesFromJS
in interface EditContext
jsCode
- JavaScript code to eval.callback
- Callback used to return the PaletteNodespublic void getPaletteNodesFromJS(java.lang.String jsCode, PaletteNodeCallback callback, java.lang.String[] globals)
PaletteNodes
from a JavaScript source representation. By
default, components that have global IDs
will not actually be allowed
to take those global IDs - instead, only widgets that have one of the global IDs passed as the globals
parameter will actually receive their global IDs. To override this behavior, pass the special value ALL_GLOBALS
for the globals
parameter.
getPaletteNodesFromJS
in interface EditContext
jsCode
- JavaScript code to eval.callback
- Callback used to return the PaletteNodesglobals
- widgets to allow to take their global IDspublic void getPaletteNodesFromXML(java.lang.String xmlString, PaletteNodeCallback callback)
PaletteNodes
from an XML representation, but do not add them to the
EditContext.getPaletteNodesFromXML
in interface EditContext
xmlString
- XML stringcallback
- Callback used to return the PaletteNodesEditContext.serializeAllEditNodes()
,
EditContext.serializeEditNodes(com.smartgwt.client.tools.EditNode[])
public EditNode makeEditNode(PaletteNode paletteNode)
defaultPalette
. Does not add the newly created EditNode to the EditContext.makeEditNode
in interface EditContext
paletteNode
- the palette node to use to create the new nodepublic void removeAll()
EditNodes
from the EditContext, but does not destroy the liveObjects
.removeAll
in interface EditContext
public void removeNodeProperties(EditNode editNode, java.lang.String[] properties)
liveObject
is not updated by this method. To set a property to
null (rather than removing it), use setNodeProperties()
instead.removeNodeProperties
in interface EditContext
editNode
- the editNode to updateproperties
- an array of property names to removeEditContext.setNodeProperties(com.smartgwt.client.tools.EditNode, com.smartgwt.client.widgets.Canvas)
public java.lang.String serializeAllEditNodes()
EditNodes
to an XML representation of PaletteNodes
. The result can be supplied to addPaletteNodesFromXML()
to recreate the EditNodes.serializeAllEditNodes
in interface EditContext
EditContext.addPaletteNodesFromXML(java.lang.String)
public java.lang.String serializeAllEditNodes(java.lang.Boolean serverless)
EditNodes
to an XML representation of PaletteNodes
. The result can be supplied to addPaletteNodesFromXML()
to recreate the EditNodes.serializeAllEditNodes
in interface EditContext
serverless
- If true, specify DataSources in full rather than assuming they can be downloaded from the
server. Defaults to false.EditContext.addPaletteNodesFromXML(java.lang.String)
public java.lang.String serializeAllEditNodesAsJSON()
EditNodes
to a JSON representation of PaletteNodes
. The result can be supplied to addPaletteNodesFromJSON()
to recreate the EditNodes.serializeAllEditNodesAsJSON
in interface EditContext
EditContext.addPaletteNodesFromJSON(java.lang.String)
public java.lang.String serializeAllEditNodesAsJSON(java.lang.Boolean serverless)
EditNodes
to a JSON representation of PaletteNodes
. The result can be supplied to addPaletteNodesFromJSON()
to recreate the EditNodes.serializeAllEditNodesAsJSON
in interface EditContext
serverless
- If true, specify DataSources in full rather than assuming they can be downloaded from the
server. Defaults to false.EditContext.addPaletteNodesFromJSON(java.lang.String)
public java.lang.String serializeEditNodes(EditNode[] nodes)
EditNodes
to an XML representation of PaletteNodes
. Note that the EditNodes must have been added to this EditContext.
The result can be supplied to addPaletteNodesFromXML()
to recreate the EditNodes.serializeEditNodes
in interface EditContext
nodes
- EditNodes to be serializedpublic java.lang.String serializeEditNodes(EditNode[] nodes, java.lang.Boolean serverless)
EditNodes
to an XML representation of PaletteNodes
. Note that the EditNodes must have been added to this EditContext.
The result can be supplied to addPaletteNodesFromXML()
to recreate the EditNodes.serializeEditNodes
in interface EditContext
nodes
- EditNodes to be serializedserverless
- If true, specify DataSources in full rather than assuming they can be downloaded from the
server. Defaults to false.public java.lang.String serializeEditNodesAsJSON(EditNode[] nodes)
EditNodes
to a JSON representation of PaletteNodes
. Note that the EditNodes must have been added to this EditContext.
The result can be supplied to addPaletteNodesFromJSON()
to recreate the EditNodes.serializeEditNodesAsJSON
in interface EditContext
nodes
- EditNodes to be serializedpublic java.lang.String serializeEditNodesAsJSON(EditNode[] nodes, java.lang.Boolean serverless)
EditNodes
to a JSON representation of PaletteNodes
. Note that the EditNodes must have been added to this EditContext.
The result can be supplied to addPaletteNodesFromJSON()
to recreate the EditNodes.serializeEditNodesAsJSON
in interface EditContext
nodes
- EditNodes to be serializedserverless
- If true, specify DataSources in full rather than assuming they can be downloaded from the
server. Defaults to false.public void setNodeProperties(EditNode editNode, Canvas properties)
removeNodeProperties()
instead.setNodeProperties
in interface EditContext
editNode
- the editNode to updateproperties
- the properties to applyEditContext.removeNodeProperties(com.smartgwt.client.tools.EditNode, java.lang.String[])
public void setNodeProperties(EditNode editNode, Canvas properties, java.lang.Boolean skipLiveObjectUpdate)
removeNodeProperties()
instead.setNodeProperties
in interface EditContext
editNode
- the editNode to updateproperties
- the properties to applyskipLiveObjectUpdate
- whether to skip updating the liveObject
, e.g. if you have
already updated the liveObjectEditContext.removeNodeProperties(com.smartgwt.client.tools.EditNode, java.lang.String[])
public static void setDefaultProperties(EditPane editPaneProperties)
Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.
editPaneProperties
- properties that should be used as new defaults when instances of this class are createdpublic com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.tools.EditPaneLogicalStructure s)
public com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()
getLogicalStructure
in interface LogicalStructure
getLogicalStructure
in class Canvas