Class EditPane
- All Implemented Interfaces:
HasAttachHandlers
,HasHandlers
,EventListener
,HasVisibility
,IsWidget
,LogicalStructure
,HasClearHandlers
,HasClickHandlers
,HasDoubleClickHandlers
,HasDragMoveHandlers
,HasDragRepositionMoveHandlers
,HasDragRepositionStartHandlers
,HasDragRepositionStopHandlers
,HasDragResizeMoveHandlers
,HasDragResizeStartHandlers
,HasDragResizeStopHandlers
,HasDragStartHandlers
,HasDragStopHandlers
,HasDropHandlers
,HasDropMoveHandlers
,HasDropOutHandlers
,HasDropOverHandlers
,HasFocusChangedHandlers
,HasHoverHandlers
,HasHoverHiddenHandlers
,HasKeyDownHandlers
,HasKeyPressHandlers
,HasMouseDownHandlers
,HasMouseMoveHandlers
,HasMouseOutHandlers
,HasMouseOverHandlers
,HasMouseStillDownHandlers
,HasMouseUpHandlers
,HasMouseWheelHandlers
,HasMovedHandlers
,HasParentMovedHandlers
,HasResizedHandlers
,HasRightMouseDownHandlers
,HasRuleContextChangedHandlers
,HasScrolledHandlers
,HasShowContextMenuHandlers
,HasVisibilityChangedHandlers
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.
EditPane automatically
creates an EditContext
and provides several APIs and settings that are passthroughs to
the underlying EditContext for convenience.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
-
Field Summary
Fields inherited from class com.smartgwt.client.widgets.BaseWidget
config, configOnly, factoryCreated, factoryProperties, id, nativeObject, scClassName
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddFromPaletteNode
(PaletteNode paletteNode) Creates a new EditNode from a PaletteNode, using thedefaultPalette
.addFromPaletteNode
(PaletteNode paletteNode, EditNode parentNode) Creates a new EditNode from a PaletteNode, using thedefaultPalette
.EditNode[]
addFromPaletteNodes
(PaletteNode[] paletteNodes) Add the suppliedPaletteNodes
to the parentNode, preserving internal references from one supplied PaletteNode to another.EditNode[]
addFromPaletteNodes
(PaletteNode[] paletteNodes, EditNode parentNode) Add the suppliedPaletteNodes
to the parentNode, preserving internal references from one supplied PaletteNode to another.Add a newEditNode
to the EditContext, under the specified parent.addNode
(EditNode newNode, EditNode parentNode, Integer index, String parentProperty, Boolean skipParentComponentAdd) addNode
(EditNode newNode, EditNode parentNode, Integer index, String parentProperty, Boolean skipParentComponentAdd, Boolean forceSingularFieldReplace) Add a newEditNode
to the EditContext, under the specified parent.void
addPaletteNodesFromJS
(String jsCode) AddPaletteNodes
from a JavaScript source representation.void
addPaletteNodesFromJS
(String jsCode, EditNode parentNode) void
addPaletteNodesFromJS
(String jsCode, EditNode parentNode, String[] globals) AddPaletteNodes
from a JavaScript source representation.void
addPaletteNodesFromJSON
(String jsonString) RecreateEditNodes
from a JSON representation ofPaletteNodes
(possibly created by callingserializeAllEditNodesAsJSON()
orserializeEditNodesAsJSON()
.void
addPaletteNodesFromJSON
(String jsonString, EditNode parentNode) void
addPaletteNodesFromJSON
(String jsonString, EditNode parentNode, String[] globals) void
addPaletteNodesFromJSON
(String jsonString, EditNode parentNode, String[] globals, Function callback) RecreateEditNodes
from a JSON representation ofPaletteNodes
(possibly created by callingserializeAllEditNodesAsJSON()
orserializeEditNodesAsJSON()
.void
addPaletteNodesFromXML
(String xmlString) RecreateEditNodes
from an XML representation ofPaletteNodes
(possibly created by callingserializeAllEditNodes()
orserializeEditNodes()
.void
addPaletteNodesFromXML
(String xmlString, EditNode parentNode) void
addPaletteNodesFromXML
(String xmlString, EditNode parentNode, String[] globals) void
addPaletteNodesFromXML
(String xmlString, EditNode parentNode, String[] globals, Function callback) RecreateEditNodes
from an XML representation ofPaletteNodes
(possibly created by callingserializeAllEditNodes()
orserializeEditNodes()
.static void
changeAutoChildDefaults
(String autoChildName, Canvas defaults) Changes the defaults for Canvas AutoChildren namedautoChildName
.static void
changeAutoChildDefaults
(String autoChildName, FormItem defaults) Changes the defaults for FormItem AutoChildren namedautoChildName
.void
copyEditNodes
(EditNode editNode) Copies the passed editNode or editNodes to an internal "clipboard" space, for later application viapasteEditNodes()
.void
copyEditNodes
(EditNode... editNode) Copies the passed editNode or editNodes to an internal "clipboard" space, for later application viapasteEditNodes()
.protected JavaScriptObject
create()
void
void
enableEditing
(EditNode editNode) Enable edit mode for anEditNode
.Controls whether components can be dropped into other components which support child components.New nodes added to the editContext are automatically placed into edit mode if the new node's parent is in edit mode.Should the group selection box shown whencanGroupSelect
is true allow dragging the group as a whole?Should a group selection outline covering the outermost bounding boxes of all selected components be shown in this container?Palette
to use when anEditNode
is being created directly by this EditContext, instead of being created due to a user interaction with a palette (eg dragging from aTreePalette
, or clicking onMenuPalette
).An EditContext is automatically created to manage EditMode behavior.Properties to be applied to theeditContext
when created.Gets the tree of editNodes being edited by this editContext.Palette[]
AdditionalPalettes
to consult for metadata when deserializingEdit Nodes
.Should the group selection box shown whencanGroupSelect
is true be hidden during drag?Getter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility.void
getNodeProperty
(EditNode editNode, String name) Returns the specified property from the editNode's serializable "defaults".static EditPane
getOrCreateRef
(JavaScriptObject jsObj) void
getPaletteNodesFromJS
(String jsCode, PaletteNodeCallback callback) ObtainPaletteNodes
from a JavaScript source representation.void
getPaletteNodesFromJS
(String jsCode, PaletteNodeCallback callback, String[] globals) ObtainPaletteNodes
from a JavaScript source representation.void
getPaletteNodesFromXML
(String xmlString, PaletteNodeCallback callback) ObtainPaletteNodes
from an XML representation, but do not add them to the EditContext.When enabled, changes to aliveObject
's position and size will be persisted to theirEditNodes
by default.Root of data to edit.Returns the rootEditNode
of the EditContext typically created fromrootComponent
.Returns an Array ofPaletteNode
s representing all currentEditNode
s in this pane, suitable for saving and restoring via passing each paletteNode toaddNode()
.Set the CSS border to be applied to the selection outline of the selected components.The background color for the selection outline label.Should the selection outline show a label for selected components? A component may also be highlighted with the selection outline and label to indicate the target of a drop.boolean
isNodeEditingOn
(EditNode editNode) Returns true ifeditNode
is in edit mode.makeEditNode
(PaletteNode paletteNode) Creates and returns an EditNode using thedefaultPalette
.makePaletteNode
(EditNode editNode) makePaletteNodeTree
(EditNode editNode) Creates aTree
ofPaletteNodes
from anEditNode
in this context'seditNodeTree
, by usingmakePaletteNode()
on the passedEditNode
and its descendents within theeditNodeTree
.void
"Pastes"editNodes
previously captured viacopyEditNodes()
.void
pasteEditNodes
(EditNode targetEditNode) "Pastes"editNodes
previously captured viacopyEditNodes()
.void
Removes allEditNodes
from the EditContext, but does not destroy theliveObjects
.void
removeNode
(EditNode editNode) RemovesEditNode
from the EditContext.void
removeNodeProperties
(EditNode editNode, String[] properties) Removes the specified properties from an editNode's serializable "defaults".void
reorderNode
(EditNode parentNode, Integer index, Integer moveToIndex) Moves anEditNode
from one child index to another in the EditContext under the specified parent.Serialize the tree ofEditNodes
to an XML representation ofPaletteNodes
.serializeAllEditNodes
(SerializationSettings settings) Serialize the tree ofEditNodes
to an XML representation ofPaletteNodes
.Encode the tree ofEditNodes
to a JSON representation ofPaletteNodes
.Encode the tree ofEditNodes
to a JSON representation ofPaletteNodes
.serializeEditNodes
(EditNode[] nodes) Serialize the providedEditNodes
to an XML representation ofPaletteNodes
.serializeEditNodes
(EditNode[] nodes, SerializationSettings settings) Serialize the providedEditNodes
to an XML representation ofPaletteNodes
.serializeEditNodesAsJSON
(EditNode[] nodes) Serialize the providedEditNodes
to a JSON representation ofPaletteNodes
.serializeEditNodesAsJSON
(EditNode[] nodes, SerializationSettings settings) Serialize the providedEditNodes
to a JSON representation ofPaletteNodes
.setAllowNestedDrops
(Boolean allowNestedDrops) Controls whether components can be dropped into other components which support child components.setAutoEditNewNodes
(Boolean autoEditNewNodes) New nodes added to the editContext are automatically placed into edit mode if the new node's parent is in edit mode.setCanDragGroup
(Boolean canDragGroup) Should the group selection box shown whencanGroupSelect
is true allow dragging the group as a whole?setCanGroupSelect
(Boolean canGroupSelect) Should a group selection outline covering the outermost bounding boxes of all selected components be shown in this container?setDefaultPalette
(Palette defaultPalette) Palette
to use when anEditNode
is being created directly by this EditContext, instead of being created due to a user interaction with a palette (eg dragging from aTreePalette
, or clicking onMenuPalette
).static void
setDefaultProperties
(EditPane editPaneProperties) Class level method to set the default properties of this class.setEditContextProperties
(EditContext editContextProperties) Properties to be applied to theeditContext
when created.setExtraPalettes
(Palette... extraPalettes) AdditionalPalettes
to consult for metadata when deserializingEdit Nodes
.setHideGroupBorderOnDrag
(Boolean hideGroupBorderOnDrag) Should the group selection box shown whencanGroupSelect
is true be hidden during drag?Setter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility.void
setNodeProperties
(EditNode editNode, Canvas properties) Update an editNode's serializable "defaults" with the supplied properties.void
setNodeProperties
(EditNode editNode, Canvas properties, Boolean skipLiveObjectUpdate) Update an editNode's serializable "defaults" with the supplied properties.setPersistCoordinates
(Boolean persistCoordinates) When enabled, changes to aliveObject
's position and size will be persisted to theirEditNodes
by default.setRootComponent
(Record rootComponent) Root of data to edit.setSelectedBorder
(String selectedBorder) Set the CSS border to be applied to the selection outline of the selected components.setSelectedLabelBackgroundColor
(String selectedLabelBackgroundColor) The background color for the selection outline label.setShowSelectedLabel
(Boolean showSelectedLabel) Should the selection outline show a label for selected components? A component may also be highlighted with the selection outline and label to indicate the target of a drop.setUseCopyPasteShortcuts
(Boolean useCopyPasteShortcuts) Methods inherited from class com.smartgwt.client.widgets.Canvas
addChild, addChild, addChild, addChild, addChild, addClearHandler, 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, addRuleContextChangedHandler, addScrolledHandler, addShowContextMenuHandler, addSnapAlignCandidate, addStyleName, addVisibilityChangedHandler, adjustForContent, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateHide, 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, animateShow, asSGWTComponent, blur, bringToFront, clear, clearExplicitTabIndex, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsEventTarget, containsFocus, containsPoint, containsPoint, dataContextChanged, deparent, depeer, disable, enable, encloses, focus, focusAfterGroup, focusAtEnd, focusInNextTabElement, focusInPreviousTabElement, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAdaptiveHeightPriority, getAdaptiveWidthPriority, getAlwaysManageFocusNavigation, getAlwaysShowScrollbars, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideEffect, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeLayoutMode, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaHandleID, getAriaRole, getAriaStateDefaults, getAutoMaskComponents, getAutoParent, getAutoPopulateData, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBorderRadius, getBottom, getById, getByJSObject, getByLocalId, getCanAcceptDrop, getCanAdaptHeight, getCanAdaptWidth, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, getCanvasAutoChild, getCanvasItem, getChildren, getChildrenResizeSnapAlign, getChildrenSnapAlign, getChildrenSnapCenterAlign, getChildrenSnapEdgeAlign, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getChildTabPosition, getClassName, getComponentMask, getComponentMaskDefaults, getContentElement, getContents, getContextMenu, getCorrectZoomOverflow, getCursor, getDataContext, getDataPath, getDefaultHeight, getDefaultWidth, getDefiningProperty, getDefiningPropertyName, getDefiningPropertyNameOptions, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDisableTouchScrollingForDrag, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragMaskType, getDragMaxHeight, getDragMaxWidth, getDragMinHeight, getDragMinWidth, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragTargetAsString, getDragType, getDropTarget, getDropTargetAsString, getDropTypes, getDropTypesAsString, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getEditNode, getEditProxy, getEditProxyConstructor, getElement, getElement, getEnableWhen, getEndLine, getEventEdge, getEventEdge, getExtraSpace, getFacetId, getFloatingScrollbars, getFormItemAutoChild, getForwardSVGeventsToObject, getFullDataPath, getGroupBorderCSS, getGroupLabelBackgroundColor, getGroupLabelStyleName, getGroupPadding, getGroupTitle, getHeight, getHeightAsString, getHideUsingDisplayNone, getHoverAlign, getHoverAutoDestroy, getHoverAutoFitMaxWidth, getHoverAutoFitMaxWidthAsString, getHoverAutoFitWidth, getHoverComponent, getHoverDelay, getHoverFocusKey, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverPersist, getHoverScreen, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapPosition, getHSnapPosition, getHtmlElement, getHtmlElementAsString, getHtmlPosition, getImage, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getIsPrinting, getIsRuleScope, getIsSnapAlignCandidate, getKeepInParentRect, getLayoutAlign, getLeaveGroupLabelSpace, getLeavePageSpace, getLeft, getLeftAsString, getLocalId, getLocateByIDOnly, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getLocatorName, getMargin, getMasterCanvas, getMasterElement, getMatchElement, getMatchElementHeight, getMatchElementWidth, getMaxHeight, getMaxWidth, getMaxZoomOverflowError, getMenuConstructor, getMinHeight, getMinNonEdgeSize, getMinWidth, getMomentumScrollMinSpeed, getMouseStillDownDelay, getMouseStillDownInitialDelay, getName, getNativeAutoHideScrollbars, getNextZIndex, getNoDoubleClicks, getNoDropCursor, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOuterElement, getOverflow, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getPaletteDefaults, getPanelContainer, getParentCanvas, getParentElement, getPeers, getPendingMarkerStyle, getPendingMarkerVisible, getPercentBox, getPercentSource, getPersistentMatchElement, getPointerSettings, getPointerTarget, getPointerTargetAsString, getPosition, getPrefix, getPrintChildrenAbsolutelyPositioned, getPrintHTML, getPrintHTML, getPrintStyleName, getPrompt, getProportionalResizeModifiers, getProportionalResizing, getReceiveScrollbarEvents, getRect, getRedrawOnResize, getResizeBarTarget, getResizeFrom, getRight, getRuleContext, getRuleContext, getRuleScope, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowColor, getShadowDepth, getShadowHOffset, getShadowImage, getShadowOffset, getShadowSoftness, getShadowSpread, getShadowVOffset, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowHoverComponents, getShowPointer, getShowResizeBar, getShowShadow, getShowSnapGrid, getShrinkElementOnHide, getSizeMayChangeOnRedraw, getSkinImgDir, getSnapAlignCandidates, getSnapAlignCenterLineStyle, getSnapAlignEdgeLineStyle, getSnapAxis, getSnapEdge, getSnapGridLineProperties, getSnapGridStyle, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapPosition, getSnapPosition, getSnapResizeToAlign, getSnapResizeToGrid, getSnapTo, getSnapToAlign, getSnapToCenterAlign, getSnapToEdgeAlign, getSnapToGrid, getSnapVDirection, getSnapVGap, getStartLine, getStyleName, getTabIndex, getTestDataContext, getTestInstance, getTitle, getTooltip, getTop, getTopAsString, getTopElement, getUISummary, getUpdateTabPositionOnDraw, getUpdateTabPositionOnReparent, getUseBackMask, getUseCSSShadow, getUseDragMask, getUseImageForSVG, getUseNativeDrag, getUseOpacityFilter, getUseTouchScrolling, getValuesManager, getValuesManagerAsString, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWhen, getVisibleWidth, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getWorkflows, getZIndex, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideComponentMask, hideComponentMask, hideContextMenu, imgHTML, imgHTML, imgHTML, initComplete, intersects, isDirty, isDisabled, isFocused, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, onAttach, onDetach, onInit, pageScrollDown, pageScrollUp, parentResized, placeNear, placeNear, placeNear, print, print, print, print, printComponents, provideRuleContext, provideRuleContext, redraw, redraw, registerFontScaledPaddingStyles, removeChild, removeChild, removePeer, removePeer, removeRuleContext, removeSnapAlignCandidate, resizeAutoChildAttributes, resizeBy, resizeControls, resizeControlsTo, resizeFonts, resizeFonts, resizeFonts, resizeFontsTo, resizeIcons, resizePadding, resizePadding, resizeTo, resizeTo, revealChild, revealChild, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAdaptHeightByCustomizer, setAdaptiveHeightPriority, setAdaptiveWidthPriority, setAdaptWidthByCustomizer, setAlign, setAllowExternalFilters, setAlwaysManageFocusNavigation, setAlwaysShowScrollbars, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideEffect, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeLayoutMode, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaRole, setAriaState, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoHeight, setAutoMaskComponents, setAutoParent, setAutoPopulateData, setAutoResizeAutoChildAttributes, setAutoResizeIcons, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBorderRadius, setBottom, setCanAcceptDrop, setCanAdaptHeight, setCanAdaptWidth, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setChildren, setChildrenResizeSnapAlign, setChildrenSnapAlign, setChildrenSnapCenterAlign, setChildrenSnapEdgeAlign, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setComponentMaskDefaults, setContents, setContextMenu, setCorrectZoomOverflow, setCursor, setDataContext, setDataPath, setDefaultHeight, setDefaultPageSpace, setDefaultProperties, setDefaultShowCustomScrollbars, setDefaultWidth, setDefiningProperty, setDefiningPropertyNameOptions, setDisabled, setDisabledCursor, setDisableTouchScrollingForDrag, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragMaskType, setDragMaxHeight, setDragMaxWidth, setDragMinHeight, setDragMinWidth, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragTarget, setDragType, setDropTarget, setDropTarget, setDropTypes, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setEditMode, setEditMode, setEditMode, setEditProxyConstructor, setElement, setEnableWhen, setEndLine, setExtraSpace, setFacetId, setFloatingScrollbars, setForwardSVGeventsToObject, setGroupBorderCSS, setGroupLabelBackgroundColor, setGroupLabelStyleName, setGroupPadding, setGroupTitle, setHeight, setHeight, setHeight, setHeight100, setHideUsingDisplayNone, setHoverAlign, setHoverAutoDestroy, setHoverAutoFitMaxWidth, setHoverAutoFitMaxWidth, setHoverAutoFitWidth, setHoverDelay, setHoverFocusKey, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverPersist, setHoverScreen, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlElement, setHtmlElement, setHtmlPosition, setImage, setImage, setInitHandler, setIsGroup, setIsRuleScope, setIsSnapAlignCandidate, setKeepInParentRect, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeaveGroupLabelSpace, setLeavePageSpace, setLeft, setLeft, setLocateByIDOnly, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setLocatorName, setLocatorParent, setLocatorParent, setLogicalStructure, setMargin, setMatchElement, setMatchElementHeight, setMatchElementWidth, setMaxHeight, setMaxWidth, setMaxZoomOverflowError, setMenuConstructor, setMinHeight, setMinNonEdgeSize, setMinWidth, setMomentumScrollMinSpeed, setMouseStillDownDelay, setMouseStillDownInitialDelay, setName, setNativeAutoHideScrollbars, setNeverUseFilters, setNoDoubleClicks, setNoDropCursor, setOpacity, setOverflow, setPadding, setPageLeft, setPageTop, setPanelContainer, setParentCanvas, setParentElement, setPeers, setPendingMarkerStyle, setPendingMarkerVisible, setPercentBox, setPercentSource, setPersistentMatchElement, setPointerSettings, setPointerTarget, setPosition, setPrefix, setPrintChildrenAbsolutelyPositioned, setPrintStyleName, setPrompt, setProportionalResizeModifiers, setProportionalResizing, setReceiveScrollbarEvents, setRect, setRect, setRedrawOnResize, setRelativeTabPosition, setResizeBarTarget, setResizeFrom, setResizeFrom, setRight, setRuleScope, setScrollbarConstructor, setScrollbarSize, setShadowColor, setShadowDepth, setShadowHOffset, setShadowImage, setShadowOffset, setShadowSoftness, setShadowSpread, setShadowVOffset, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowHoverComponents, setShowPointer, setShowResizeBar, setShowShadow, setShowSnapGrid, setShrinkElementOnHide, setSizeMayChangeOnRedraw, setSkinImgDir, setSmoothFade, setSnapAlignCandidates, setSnapAlignCenterLineStyle, setSnapAlignEdgeLineStyle, setSnapAxis, setSnapEdge, setSnapGridLineProperties, setSnapGridStyle, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToAlign, setSnapResizeToGrid, setSnapTo, setSnapToAlign, setSnapToCenterAlign, setSnapToEdgeAlign, setSnapToGrid, setSnapVDirection, setSnapVGap, setStartLine, setStyleName, setTabIndex, setTestDataContext, setTitle, setTooltip, setTop, setTop, setUpdateTabPositionOnDraw, setUpdateTabPositionOnReparent, setUseBackMask, setUseCSSShadow, setUseDragMask, setUseImageForSVG, setUseNativeDrag, setUseOpacityFilter, setUseTouchScrolling, setValuesManager, setValuesManager, setVisibility, setVisible, setVisibleWhen, setWidth, setWidth, setWidth, setWidth100, setWorkflows, setZIndex, shouldDragScroll, show, showClickMask, showComponentMask, showComponentMask, showNextTo, showNextTo, showNextTo, showNextTo, showPendingMarker, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, startDebuggingOverflow, stopDebuggingOverflow, updateChildTabPosition, updateChildTabPositions, updateEditNode, updateHover, updateHover, updateShadow, updateTabPositionForDraw, visibleAtPoint, willAcceptDrop
Methods inherited from class com.smartgwt.client.widgets.BaseWidget
addDrawHandler, addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, clearDynamicProperty, completeCreation, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDateArray, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsFloatArray, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hasAutoAssignedID, hasDynamicProperty, hashCode, initNativeObject, internalSetID, internalSetID, isConfigOnly, isCreated, isDrawn, isFactoryCreated, 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, setDefaultProperties, setDragTracker, setFactoryCreated, setID, setJavaScriptObject, setLogicalStructure, setLogicalStructure, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setScClassName, toString
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
-
Constructor Details
-
EditPane
public EditPane() -
EditPane
-
-
Method Details
-
getOrCreateRef
-
changeAutoChildDefaults
Changes the defaults for Canvas AutoChildren namedautoChildName
.- Parameters:
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. For usage tips on this param, seeSGWTProperties
.- See Also:
-
changeAutoChildDefaults
Changes the defaults for FormItem AutoChildren namedautoChildName
.- Parameters:
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. For usage tips on this param, seeSGWTProperties
.- See Also:
-
create
-
setAllowNestedDrops
Controls whether components can be dropped into other components which support child components.When enabled, during a drop interaction in which a
PaletteNode
orEditNode
is the drop data, theComponent Schema
of the current candidate drop target is inspected to see whether that parent allows children of the type being dropped. If it does, the drop will result in a call toaddNode()
for a paletteNode or for an existingEditNode
in the same tree.Specific components can disable nested drops by explicitly setting
EditProxy.allowNestedDrops
to false.This mode is enabled by default unless explicitly disabled by setting this property to false.
- Parameters:
allowNestedDrops
- New allowNestedDrops value. Default value is null- Returns:
EditPane
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getAllowNestedDrops
Controls whether components can be dropped into other components which support child components.When enabled, during a drop interaction in which a
PaletteNode
orEditNode
is the drop data, theComponent Schema
of the current candidate drop target is inspected to see whether that parent allows children of the type being dropped. If it does, the drop will result in a call toaddNode()
for a paletteNode or for an existingEditNode
in the same tree.Specific components can disable nested drops by explicitly setting
EditProxy.allowNestedDrops
to false.This mode is enabled by default unless explicitly disabled by setting this property to false.
- Returns:
- Current allowNestedDrops value. Default value is null
-
setAutoEditNewNodes
New nodes added to the editContext are automatically placed into edit mode if the new node's parent is in edit mode. To suppress this action setautoEditNewNodes
to false.- Parameters:
autoEditNewNodes
- New autoEditNewNodes value. Default value is null- Returns:
EditPane
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getAutoEditNewNodes
New nodes added to the editContext are automatically placed into edit mode if the new node's parent is in edit mode. To suppress this action setautoEditNewNodes
to false.- Returns:
- Current autoEditNewNodes value. Default value is null
-
setCanDragGroup
Should the group selection box shown whencanGroupSelect
is true allow dragging the group as a whole?Treated as
true
if not set andcanGroupSelect
is true.- Parameters:
canDragGroup
- New canDragGroup value. Default value is null- Returns:
EditPane
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getCanDragGroup
Should the group selection box shown whencanGroupSelect
is true allow dragging the group as a whole?Treated as
true
if not set andcanGroupSelect
is true.- Returns:
- Current canDragGroup value. Default value is null
-
setCanGroupSelect
Should a group selection outline covering the outermost bounding boxes of all selected components be shown in this container?Treated as
true
if not set and hoop selection is enabled (seeEditProxy.canSelectChildren
andselectionType
.- Parameters:
canGroupSelect
- New canGroupSelect value. Default value is null- Returns:
EditPane
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getCanGroupSelect
Should a group selection outline covering the outermost bounding boxes of all selected components be shown in this container?Treated as
true
if not set and hoop selection is enabled (seeEditProxy.canSelectChildren
andselectionType
.- Returns:
- Current canGroupSelect value. Default value is null
-
setDefaultPalette
Palette
to use when anEditNode
is being created directly by this EditContext, instead of being created due to a user interaction with a palette (eg dragging from aTreePalette
, or clicking onMenuPalette
).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 anEditNode
is being created directly by this EditContext, instead of being created due to a user interaction with a palette (eg dragging from aTreePalette
, or clicking onMenuPalette
).If no defaultPalette is provided, the EditContext uses an automatically created
HiddenPalette
.- Parameters:
defaultPalette
- the default Palette. Default value is null- Returns:
EditPane
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getDefaultPalette
Palette
to use when anEditNode
is being created directly by this EditContext, instead of being created due to a user interaction with a palette (eg dragging from aTreePalette
, or clicking onMenuPalette
).If no defaultPalette is provided, the EditContext uses an automatically created
HiddenPalette
.- Returns:
Palette
to use when anEditNode
is being created directly by this EditContext, instead of being created due to a user interaction with a palette (eg dragging from aTreePalette
, or clicking onMenuPalette
).If no defaultPalette is provided, the EditContext uses an automatically created
HiddenPalette
. Default value is null
-
getEditContext
An EditContext is automatically created to manage EditMode behavior. The public EditContext APIs exposed by the EditPane are passed through to this object.Additional
editContext
properties can be supplied aseditContextProperties
.This component is an AutoChild named "editContext". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Returns the
EditContext
instance managed by the EditPane. Default value is null - Throws:
IllegalStateException
- if this widget has not yet been rendered.
-
setEditContextProperties
public EditPane setEditContextProperties(EditContext editContextProperties) throws IllegalStateException Properties to be applied to theeditContext
when created.- Parameters:
editContextProperties
- New editContextProperties value. Default value is null- Returns:
EditPane
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getEditContextProperties
Properties to be applied to theeditContext
when created.- Returns:
- Current editContextProperties value. Default value is null
-
setExtraPalettes
AdditionalPalettes
to consult for metadata when deserializingEdit Nodes
. Note that thedefaultPalette
is always consulted and need not be provided again here.- Parameters:
extraPalettes
- New extraPalettes value. Default value is null- Returns:
EditPane
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getExtraPalettes
AdditionalPalettes
to consult for metadata when deserializingEdit Nodes
. Note that thedefaultPalette
is always consulted and need not be provided again here.- Returns:
- Current extraPalettes value. Default value is null
-
setHideGroupBorderOnDrag
public EditPane setHideGroupBorderOnDrag(Boolean hideGroupBorderOnDrag) throws IllegalStateException Should the group selection box shown whencanGroupSelect
is true be hidden during drag?Treated as
true
if not explicitly set to false.- Parameters:
hideGroupBorderOnDrag
- New hideGroupBorderOnDrag value. Default value is null- Returns:
EditPane
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getHideGroupBorderOnDrag
Should the group selection box shown whencanGroupSelect
is true be hidden during drag?Treated as
true
if not explicitly set to false.- Returns:
- Current hideGroupBorderOnDrag value. Default value is null
-
setPersistCoordinates
When enabled, changes to aliveObject
's position and size will be persisted to theirEditNodes
by default. This applies to both programmatic calls and user interaction (drag reposition or drag resize).This feature can be disabled by either setting this property or
EditProxy.persistCoordinates
tofalse
. This property affects all nodes within the EditContext whereas the latter property affects children of a single node.In some use-cases, like Reify, coordinates should not be persisted except when a component explicitly enables this feature. By setting this property to
null
no component will persist coordinates of children unlessEditProxy.persistCoordinates
is explicitly set totrue
.- Parameters:
persistCoordinates
- New persistCoordinates value. Default value is true- Returns:
EditPane
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getPersistCoordinates
When enabled, changes to aliveObject
's position and size will be persisted to theirEditNodes
by default. This applies to both programmatic calls and user interaction (drag reposition or drag resize).This feature can be disabled by either setting this property or
EditProxy.persistCoordinates
tofalse
. This property affects all nodes within the EditContext whereas the latter property affects children of a single node.In some use-cases, like Reify, coordinates should not be persisted except when a component explicitly enables this feature. By setting this property to
null
no component will persist coordinates of children unlessEditProxy.persistCoordinates
is explicitly set totrue
.- Returns:
- Current persistCoordinates value. Default value is true
-
setRootComponent
Root of data to edit. Must contain the "type" property, with the name of a validschema
or nothing will be able to be dropped on this EditContext. A "liveObject" property representing the rootComponent is also suggested. Otherwise, a live object will be created from the palette node.Can be retrieved at any time. Use
getRootEditNode()
to retrieve theEditNode
created from the rootComponent.- Parameters:
rootComponent
- New rootComponent value. Default value is null- Returns:
EditPane
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getRootComponent
Root of data to edit. Must contain the "type" property, with the name of a validschema
or nothing will be able to be dropped on this EditContext. A "liveObject" property representing the rootComponent is also suggested. Otherwise, a live object will be created from the palette node.Can be retrieved at any time. Use
getRootEditNode()
to retrieve theEditNode
created from the rootComponent.- Returns:
- Current rootComponent value. Default value is null
- See Also:
-
setSelectedBorder
Set the CSS border to be applied to the selection outline of the selected components. This property is used whenEditProxy.selectedAppearance
isoutlineMask
oroutlineEdges
.This value is applied as a default to
EditProxy.selectedBorder
.- Parameters:
selectedBorder
- New selectedBorder value. Default value is null- Returns:
EditPane
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getSelectedBorder
Set the CSS border to be applied to the selection outline of the selected components. This property is used whenEditProxy.selectedAppearance
isoutlineMask
oroutlineEdges
.This value is applied as a default to
EditProxy.selectedBorder
.- Returns:
- Current selectedBorder value. Default value is null
-
setSelectedLabelBackgroundColor
public EditPane setSelectedLabelBackgroundColor(String selectedLabelBackgroundColor) throws IllegalStateException The background color for the selection outline label. The default is defined onSelectionOutline
.This value is applied as a default to
EditProxy.selectedLabelBackgroundColor
.NOTE: A selected component label is only supported when
EditProxy.selectedAppearance
is "outlineEdges".- Parameters:
selectedLabelBackgroundColor
- New selectedLabelBackgroundColor value. Default value is null- Returns:
EditPane
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getSelectedLabelBackgroundColor
The background color for the selection outline label. The default is defined onSelectionOutline
.This value is applied as a default to
EditProxy.selectedLabelBackgroundColor
.NOTE: A selected component label is only supported when
EditProxy.selectedAppearance
is "outlineEdges".- Returns:
- Current selectedLabelBackgroundColor value. Default value is null
- See Also:
-
setShowSelectedLabel
Should the selection outline show a label for selected components? A component may also be highlighted with the selection outline and label to indicate the target of a drop. To suppress showing a label at any time set this property tofalse
.To suppress labels during selection but still show them when targeted for a drop, see
EditContext.showSelectedLabelOnSelect
.NOTE: A selected component label is only supported when
EditProxy.selectedAppearance
is "outlineEdges".- Parameters:
showSelectedLabel
- New showSelectedLabel value. Default value is null- Returns:
EditPane
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getShowSelectedLabel
Should the selection outline show a label for selected components? A component may also be highlighted with the selection outline and label to indicate the target of a drop. To suppress showing a label at any time set this property tofalse
.To suppress labels during selection but still show them when targeted for a drop, see
EditContext.showSelectedLabelOnSelect
.NOTE: A selected component label is only supported when
EditProxy.selectedAppearance
is "outlineEdges".- Returns:
- Current showSelectedLabel value. Default value is null
-
setUseCopyPasteShortcuts
public EditPane setUseCopyPasteShortcuts(Boolean useCopyPasteShortcuts) throws IllegalStateException If set, auto-enablesEditProxy.useCopyPasteShortcuts
on theEditProxy
for theroot editNode
. This works whether there is currently a root editNode or one is added later.- Parameters:
useCopyPasteShortcuts
- New useCopyPasteShortcuts value. Default value is null- Returns:
EditPane
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getUseCopyPasteShortcuts
If set, auto-enablesEditProxy.useCopyPasteShortcuts
on theEditProxy
for theroot editNode
. This works whether there is currently a root editNode or one is added later.- Returns:
- Current useCopyPasteShortcuts value. Default value is null
-
addFromPaletteNode
Creates a new EditNode from a PaletteNode, using thedefaultPalette
. If you have an array of possibly inter-related PaletteNodes, then you should useaddFromPaletteNodes()
on the array instead, in order to preserve the relationships.- Parameters:
paletteNode
- the palette node to use to create the new node- Returns:
- the EditNode created from the paletteNode
- See Also:
-
addFromPaletteNode
Creates a new EditNode from a PaletteNode, using thedefaultPalette
. If you have an array of possibly inter-related PaletteNodes, then you should useaddFromPaletteNodes()
on the array instead, in order to preserve the relationships.- Parameters:
paletteNode
- the palette node to use to create the new nodeparentNode
- optional the parent node if the new node should appear under a specific parent- Returns:
- the EditNode created from the paletteNode
- See Also:
-
addFromPaletteNodes
Add the suppliedPaletteNodes
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 viaserializeAllEditNodes()
) rather than callingaddFromPaletteNode()
on each individual PaletteNode.- Parameters:
paletteNodes
- array of PaletteNodes- Returns:
- an array of the EditNodes added to the parentNode
- See Also:
-
addFromPaletteNodes
Add the suppliedPaletteNodes
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 viaserializeAllEditNodes()
) rather than callingaddFromPaletteNode()
on each individual PaletteNode.- Parameters:
paletteNodes
- array of PaletteNodesparentNode
- parent to add to (defaults to the root)- Returns:
- an array of the EditNodes added to the parentNode
- See Also:
-
addNode
Add a newEditNode
to the EditContext, under the specified parent. If the parentNode is not provided it will be determined fromEditContext.defaultParent
.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.
- Parameters:
newNode
- new node to be added- Returns:
- newNodenode added
-
addNode
-
addNode
-
addNode
-
addNode
-
addNode
public EditNode addNode(EditNode newNode, EditNode parentNode, Integer index, String parentProperty, Boolean skipParentComponentAdd, Boolean forceSingularFieldReplace) Add a newEditNode
to the EditContext, under the specified parent. If the parentNode is not provided it will be determined fromEditContext.defaultParent
.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.
- Parameters:
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)forceSingularFieldReplace
- whether to replace existing single field node if newNode liveObject is the same (default false)- Returns:
- newNodenode added
-
addPaletteNodesFromJS
AddPaletteNodes
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 theglobals
parameter will actually receive their global IDs. To override this behavior, pass the special valueALL_GLOBALS
for theglobals
parameter.- Parameters:
jsCode
- JavaScript code to eval.
-
addPaletteNodesFromJS
- See Also:
-
addPaletteNodesFromJS
AddPaletteNodes
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 theglobals
parameter will actually receive their global IDs. To override this behavior, pass the special valueALL_GLOBALS
for theglobals
parameter.- Parameters:
jsCode
- JavaScript code to eval.parentNode
- parent node (defaults to the root)globals
- widgets to allow to take their global IDs
-
addPaletteNodesFromJSON
RecreateEditNodes
from a JSON representation ofPaletteNodes
(possibly created by callingserializeAllEditNodesAsJSON()
orserializeEditNodesAsJSON()
.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 theglobals
parameter will actually receive their global IDs. To override this behavior, pass the special valueALL_GLOBALS
for theglobals
parameter.- Parameters:
jsonString
- JSON string representing an array of PaletteNodes- See Also:
-
addPaletteNodesFromJSON
-
addPaletteNodesFromJSON
-
addPaletteNodesFromJSON
public void addPaletteNodesFromJSON(String jsonString, EditNode parentNode, String[] globals, Function callback) RecreateEditNodes
from a JSON representation ofPaletteNodes
(possibly created by callingserializeAllEditNodesAsJSON()
orserializeEditNodesAsJSON()
.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 theglobals
parameter will actually receive their global IDs. To override this behavior, pass the special valueALL_GLOBALS
for theglobals
parameter.- Parameters:
jsonString
- JSON string representing an array of PaletteNodesparentNode
- parent to add to (defaults to the root)globals
- widgets to allow to take their global IDscallback
- Callback to fire after nodes have been added- See Also:
-
addPaletteNodesFromXML
RecreateEditNodes
from an XML representation ofPaletteNodes
(possibly created by callingserializeAllEditNodes()
orserializeEditNodes()
.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 theglobals
parameter will actually receive their global IDs. To override this behavior, pass the special valueALL_GLOBALS
for theglobals
parameter.- Parameters:
xmlString
- XML string- See Also:
-
addPaletteNodesFromXML
- See Also:
-
addPaletteNodesFromXML
- See Also:
-
addPaletteNodesFromXML
public void addPaletteNodesFromXML(String xmlString, EditNode parentNode, String[] globals, Function callback) RecreateEditNodes
from an XML representation ofPaletteNodes
(possibly created by callingserializeAllEditNodes()
orserializeEditNodes()
.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 theglobals
parameter will actually receive their global IDs. To override this behavior, pass the special valueALL_GLOBALS
for theglobals
parameter.- Parameters:
xmlString
- XML stringparentNode
- parent node (defaults to the root)globals
- widgets to allow to take their global IDscallback
- Callback to fire after nodes have been added- See Also:
-
copyEditNodes
Copies the passed editNode or editNodes to an internal "clipboard" space, for later application viapasteEditNodes()
.- Parameters:
editNode
-
-
copyEditNodes
Copies the passed editNode or editNodes to an internal "clipboard" space, for later application viapasteEditNodes()
.- Parameters:
editNode
-
-
destroyAll
public void destroyAll() -
enableEditing
Enable edit mode for anEditNode
. This is a shortcut for callingCanvas.setEditMode()
.- Parameters:
editNode
- the EditNode on which to enable editing- See Also:
-
getEditNodeTree
Gets the tree of editNodes being edited by this editContext. Standard tree traversal methods can then be used to locate desired editNodes for interaction.Note: the returned tree is read-only and must only be modified by calling methods on EditContext like
EditContext.addNode()
orEditContext.setNodeProperties()
.- Returns:
- the tree of EditNodes
-
getNodeProperty
Returns the specified property from the editNode's serializable "defaults".- Parameters:
editNode
- the editNode to queryname
- the property name to query- See Also:
-
getPaletteNodesFromJS
ObtainPaletteNodes
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 theglobals
parameter will actually receive their global IDs. To override this behavior, pass the special valueALL_GLOBALS
for theglobals
parameter.- Parameters:
jsCode
- JavaScript code to eval.callback
- Callback used to return the PaletteNodes
-
getPaletteNodesFromJS
ObtainPaletteNodes
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 theglobals
parameter will actually receive their global IDs. To override this behavior, pass the special valueALL_GLOBALS
for theglobals
parameter.- Parameters:
jsCode
- JavaScript code to eval.callback
- Callback used to return the PaletteNodesglobals
- widgets to allow to take their global IDs
-
getPaletteNodesFromXML
ObtainPaletteNodes
from an XML representation, but do not add them to the EditContext.- Parameters:
xmlString
- XML stringcallback
- Callback used to return the PaletteNodes- See Also:
-
getRootEditNode
Returns the rootEditNode
of the EditContext typically created fromrootComponent
.- Returns:
- the root EditNode
-
getSaveData
Returns an Array ofPaletteNode
s representing all currentEditNode
s in this pane, suitable for saving and restoring via passing each paletteNode toaddNode()
.- Returns:
- paletteNodes suitable for saving for subsequent restoration
- See Also:
-
isNodeEditingOn
Returns true ifeditNode
is in edit mode.- Parameters:
editNode
- the EditNode- Returns:
- true if node is in edit mode
-
makeEditNode
Creates and returns an EditNode using thedefaultPalette
. Does not add the newly created EditNode to an EditContext.- Parameters:
paletteNode
- the palette node to use to create the new node- Returns:
- the EditNode created from the paletteNode
-
makePaletteNode
Creates aPaletteNode
from anEditNode
in this context'seditNodeTree
.This essentially creates a new
PaletteNode
with theEditNode.defaults
from the passededitNode
. The returnedpaletteNode
could then be used withEditContext.addFromPaletteNode()
to effectively create a copy of the original editNode - specifically a new editNode with a newEditNode.liveObject
created from the same defaults.However note that
makePaletteNode()
does not copy descendant nodes - usemakePaletteNodeTree()
for that.May return null if the passed editNode cannot validly by transformed into a paletteNode, for example if
EditNode.canDuplicate
was set false.- Parameters:
editNode
- the editNode to use to make a paletteNode- Returns:
- paletteNode derived from the editNode or null
-
makePaletteNodeTree
Creates aTree
ofPaletteNodes
from anEditNode
in this context'seditNodeTree
, by usingmakePaletteNode()
on the passedEditNode
and its descendents within theeditNodeTree
.The root node of the returned
Tree
will be a PaletteNode derived from the passedEditNode
.- Parameters:
editNode
- root editNode to make Tree of PaletteNodes from- Returns:
- a Tree of paletteNodes or null
-
pasteEditNodes
public void pasteEditNodes()"Pastes"editNodes
previously captured viacopyEditNodes()
.New editNodes will be added as root-level nodes of the
editNodeTree
unless atargetEditNode
is passed. -
pasteEditNodes
"Pastes"editNodes
previously captured viacopyEditNodes()
.New editNodes will be added as root-level nodes of the
editNodeTree
unless atargetEditNode
is passed.- Parameters:
targetEditNode
-
-
removeAll
public void removeAll()Removes allEditNodes
from the EditContext, but does not destroy theliveObjects
. -
removeNode
RemovesEditNode
from the EditContext. The editNode liveObject is not destroyed.- Parameters:
editNode
- node to be removed
-
removeNodeProperties
Removes the specified properties from an editNode's serializable "defaults". Note that theliveObject
is not updated by this method. To set a property to null (rather than removing it), usesetNodeProperties()
instead.- Parameters:
editNode
- the editNode to updateproperties
- an array of property names to remove- See Also:
-
reorderNode
Moves anEditNode
from one child index to another in the EditContext under the specified parent.No changes are made to the live objects.
- Parameters:
parentNode
- parent to reorder child nodesindex
- index within the parent's children array to be movedmoveToIndex
- index within the parent's children array at which to place moved node
-
serializeAllEditNodes
Serialize the tree ofEditNodes
to an XML representation ofPaletteNodes
. The result can be supplied toaddPaletteNodesFromXML()
to recreate the EditNodes.- Returns:
- an XML representation of PaletteNodes which can be used to recreate the tree of EditNodes.
- See Also:
-
serializeAllEditNodes
Serialize the tree ofEditNodes
to an XML representation ofPaletteNodes
. The result can be supplied toaddPaletteNodesFromXML()
to recreate the EditNodes.- Parameters:
settings
- Additional serialization settings- Returns:
- an XML representation of PaletteNodes which can be used to recreate the tree of EditNodes.
- See Also:
-
serializeAllEditNodesAsJSON
Encode the tree ofEditNodes
to a JSON representation ofPaletteNodes
. The result can be supplied toaddPaletteNodesFromJSON()
to recreate the EditNodes.- Returns:
- a JSON representation of PaletteNodes which can be used to recreate the tree of EditNodes.
- See Also:
-
serializeAllEditNodesAsJSON
Encode the tree ofEditNodes
to a JSON representation ofPaletteNodes
. The result can be supplied toaddPaletteNodesFromJSON()
to recreate the EditNodes.- Parameters:
settings
- Additional serialization settings- Returns:
- a JSON representation of PaletteNodes which can be used to recreate the tree of EditNodes.
- See Also:
-
serializeEditNodes
Serialize the providedEditNodes
to an XML representation ofPaletteNodes
. Note that the EditNodes must have been added to this EditContext. The result can be supplied toaddPaletteNodesFromXML()
to recreate the EditNodes.- Parameters:
nodes
- EditNodes to be serialized- Returns:
- an XML representtion of the provided EditNodes
-
serializeEditNodes
Serialize the providedEditNodes
to an XML representation ofPaletteNodes
. Note that the EditNodes must have been added to this EditContext. The result can be supplied toaddPaletteNodesFromXML()
to recreate the EditNodes.- Parameters:
nodes
- EditNodes to be serializedsettings
- Additional serialization settings- Returns:
- an XML representtion of the provided EditNodes
-
serializeEditNodesAsJSON
Serialize the providedEditNodes
to a JSON representation ofPaletteNodes
. Note that the EditNodes must have been added to this EditContext. The result can be supplied toaddPaletteNodesFromJSON()
to recreate the EditNodes.- Parameters:
nodes
- EditNodes to be serialized- Returns:
- a JSON representtion of the provided EditNodes
-
serializeEditNodesAsJSON
Serialize the providedEditNodes
to a JSON representation ofPaletteNodes
. Note that the EditNodes must have been added to this EditContext. The result can be supplied toaddPaletteNodesFromJSON()
to recreate the EditNodes.- Parameters:
nodes
- EditNodes to be serializedsettings
- Additional serialization settings- Returns:
- a JSON representtion of the provided EditNodes
-
setNodeProperties
Update an editNode's serializable "defaults" with the supplied properties. If you wish to remove a property from the defaults (rather than setting it to null), then useremoveNodeProperties()
instead.- Parameters:
editNode
- the editNode to updateproperties
- the properties to apply- See Also:
-
setNodeProperties
Update an editNode's serializable "defaults" with the supplied properties. If you wish to remove a property from the defaults (rather than setting it to null), then useremoveNodeProperties()
instead.- Parameters:
editNode
- the editNode to updateproperties
- the properties to applyskipLiveObjectUpdate
- whether to skip updating theliveObject
, e.g. if you have already updated the liveObject- See Also:
-
setDefaultProperties
Class level method to set the default properties of this class. If set, then all existing and subsequently created instances of this class will automatically have default properties corresponding to the properties set on the SmartGWT class instance passed to this function before its underlying SmartClient JS object was created. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.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.
- Parameters:
editPaneProperties
- properties that should be used as new defaults when instances of this class are created- See Also:
-
setLogicalStructure
Setter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility. -
getLogicalStructure
Getter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility.- Specified by:
getLogicalStructure
in interfaceLogicalStructure
- Overrides:
getLogicalStructure
in classCanvas
-