Class EditNode

All Implemented Interfaces:
HasHandlers

public class EditNode extends PaletteNode
An object representing a component that is currently being edited within an EditContext.

An EditNode is essentially a copy of a PaletteNode, initially with the same properties as the PaletteNode from which it was generated. However unlike a PaletteNode, an EditNode always has a liveObject - the object created from the PaletteNode.defaults or other properties defined on a paletteNode.

Like a Palette, an EditContext may use properties such as PaletteNode.icon or PaletteNode.title to display EditNodes.

An EditContext generally offers some means of editing EditNodes and, as edits are made, updates defaults with the information required to re-create the component.

  • Constructor Details

    • EditNode

      public EditNode()
    • EditNode

      public EditNode(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static EditNode getOrCreateRef(JavaScriptObject jsObj)
    • setCanDuplicate

      public EditNode setCanDuplicate(Boolean canDuplicate)
      Overrides:
      setCanDuplicate in class PaletteNode
      Parameters:
      canDuplicate - New canDuplicate value. Default value is null
      Returns:
      EditNode instance, for chaining setter calls
    • getCanDuplicate

      public Boolean getCanDuplicate()
      Overrides:
      getCanDuplicate in class PaletteNode
      Returns:
      Current canDuplicate value. Default value is null
    • setCanvasDefaults

      public EditNode setCanvasDefaults(Canvas defaults)
      Properties required to recreate the current liveObject.
      Overrides:
      setCanvasDefaults in class PaletteNode
      Parameters:
      defaults - New defaults value. Default value is null
      Returns:
      EditNode instance, for chaining setter calls
      See Also:
    • getCanvasDefaults

      public Canvas getCanvasDefaults()
      Properties required to recreate the current liveObject.
      Overrides:
      getCanvasDefaults in class PaletteNode
      Returns:
      Current defaults value. Default value is null
    • setCanvasLiveObject

      public EditNode setCanvasLiveObject(Canvas liveObject)
      Live version of the object created from the defaults. For example, if type is "ListGrid", liveObject would be a ListGrid.
      Overrides:
      setCanvasLiveObject in class PaletteNode
      Parameters:
      liveObject - New liveObject value. Default value is null
      Returns:
      EditNode instance, for chaining setter calls
    • getCanvasLiveObject

      public Canvas getCanvasLiveObject()
      Live version of the object created from the defaults. For example, if type is "ListGrid", liveObject would be a ListGrid.
      Overrides:
      getCanvasLiveObject in class PaletteNode
      Returns:
      Current liveObject value. Default value is null
    • setDrawItemDefaults

      public EditNode setDrawItemDefaults(DrawItem defaults)
      Properties required to recreate the current liveObject.
      Overrides:
      setDrawItemDefaults in class PaletteNode
      Parameters:
      defaults - New defaults value. Default value is null
      Returns:
      EditNode instance, for chaining setter calls
      See Also:
    • getDrawItemDefaults

      public DrawItem getDrawItemDefaults()
      Properties required to recreate the current liveObject.
      Overrides:
      getDrawItemDefaults in class PaletteNode
      Returns:
      Current defaults value. Default value is null
    • setDrawItemLiveObject

      public EditNode setDrawItemLiveObject(DrawItem liveObject)
      Live version of the object created from the defaults. For example, if type is "ListGrid", liveObject would be a ListGrid.
      Overrides:
      setDrawItemLiveObject in class PaletteNode
      Parameters:
      liveObject - New liveObject value. Default value is null
      Returns:
      EditNode instance, for chaining setter calls
    • getDrawItemLiveObject

      public DrawItem getDrawItemLiveObject()
      Live version of the object created from the defaults. For example, if type is "ListGrid", liveObject would be a ListGrid.
      Overrides:
      getDrawItemLiveObject in class PaletteNode
      Returns:
      Current liveObject value. Default value is null
    • setDrawPaneDefaults

      public EditNode setDrawPaneDefaults(DrawPane defaults)
      Properties required to recreate the current liveObject.
      Overrides:
      setDrawPaneDefaults in class PaletteNode
      Parameters:
      defaults - New defaults value. Default value is null
      Returns:
      EditNode instance, for chaining setter calls
      See Also:
    • getDrawPaneDefaults

      public DrawPane getDrawPaneDefaults()
      Properties required to recreate the current liveObject.
      Overrides:
      getDrawPaneDefaults in class PaletteNode
      Returns:
      Current defaults value. Default value is null
    • setDrawPaneLiveObject

      public EditNode setDrawPaneLiveObject(DrawPane liveObject)
      Live version of the object created from the defaults. For example, if type is "ListGrid", liveObject would be a ListGrid.
      Overrides:
      setDrawPaneLiveObject in class PaletteNode
      Parameters:
      liveObject - New liveObject value. Default value is null
      Returns:
      EditNode instance, for chaining setter calls
    • getDrawPaneLiveObject

      public DrawPane getDrawPaneLiveObject()
      Live version of the object created from the defaults. For example, if type is "ListGrid", liveObject would be a ListGrid.
      Overrides:
      getDrawPaneLiveObject in class PaletteNode
      Returns:
      Current liveObject value. Default value is null
    • setEditProxyProperties

      public EditNode setEditProxyProperties(EditProxy editProxyProperties)
      Properties to be applied to the liveObject.editProxy when created.

      Note that the editProxy is created the first time a component is placed into editMode, so any editProxyProperties must be set before then.

      Overrides:
      setEditProxyProperties in class PaletteNode
      Parameters:
      editProxyProperties - New editProxyProperties value. Default value is null
      Returns:
      EditNode instance, for chaining setter calls
      See Also:
    • getEditProxyProperties

      public EditProxy getEditProxyProperties()
      Properties to be applied to the liveObject.editProxy when created.

      Note that the editProxy is created the first time a component is placed into editMode, so any editProxyProperties must be set before then.

      Overrides:
      getEditProxyProperties in class PaletteNode
      Returns:
      Current editProxyProperties value. Default value is null
    • setFormItemDefaults

      public EditNode setFormItemDefaults(FormItem defaults)
      Properties required to recreate the current liveObject.
      Overrides:
      setFormItemDefaults in class PaletteNode
      Parameters:
      defaults - New defaults value. Default value is null
      Returns:
      EditNode instance, for chaining setter calls
    • getFormItemDefaults

      public FormItem getFormItemDefaults()
      Properties required to recreate the current liveObject.
      Overrides:
      getFormItemDefaults in class PaletteNode
      Returns:
      Current defaults value. Default value is null
    • setFormItemLiveObject

      public EditNode setFormItemLiveObject(FormItem liveObject)
      Live version of the object created from the defaults. For example, if type is "ListGrid", liveObject would be a ListGrid.
      Overrides:
      setFormItemLiveObject in class PaletteNode
      Parameters:
      liveObject - New liveObject value. Default value is null
      Returns:
      EditNode instance, for chaining setter calls
    • getFormItemLiveObject

      public FormItem getFormItemLiveObject()
      Live version of the object created from the defaults. For example, if type is "ListGrid", liveObject would be a ListGrid.
      Overrides:
      getFormItemLiveObject in class PaletteNode
      Returns:
      Current liveObject value. Default value is null
    • setType

      public EditNode setType(String type)
      String of the canvasLiveObject, for example, "ListGrid".
      Overrides:
      setType in class PaletteNode
      Parameters:
      type - New type value. Default value is null
      Returns:
      EditNode instance, for chaining setter calls
      See Also:
    • getType

      public String getType()
      String of the canvasLiveObject, for example, "ListGrid".
      Overrides:
      getType in class PaletteNode
      Returns:
      Current type value. Default value is null
      See Also:
    • setUseEditMask

      public EditNode setUseEditMask(Boolean useEditMask)
      Shortcut property to be applied to the liveObject.editProxy when created.
      Parameters:
      useEditMask - New useEditMask value. Default value is null
      Returns:
      EditNode instance, for chaining setter calls
    • getUseEditMask

      public Boolean getUseEditMask()
      Shortcut property to be applied to the liveObject.editProxy when created.
      Returns:
      Current useEditMask value. Default value is null
    • getLiveObject

      public Object getLiveObject()
      Live version of the object created from the defaults. For example, if type is "ListGrid", liveObject would be a ListGrid. Use the more specific live object getter API, such as getCanvasLiveObject() if you are sure of the type.
      Overrides:
      getLiveObject in class PaletteNode
      Returns:
      Object
      See Also: