Class ClientSideEditor

java.lang.Object
com.iizigo.panel.ClientSideEditor
All Implemented Interfaces:
ITransactionSender, ITransactionCreator, EventListener, IPropMgrOwner, IProxyEditController, Runnable

Class for client-side editor.
Author:
Christopher Mindus
  • Method Details

    • onEvent

      public void onEvent(GEvent e)
      The listener for root property changes from the JS designer.
      Specified by:
      onEvent in interface EventListener
      Parameters:
      e - The event.
    • onRemoteEventQueued

      public void onRemoteEventQueued()
      Called when a RemoteEvent has been added and needs sending (along with all properties, etc).
      Specified by:
      onRemoteEventQueued in interface IPropMgrOwner
    • run

      public void run()
      The root property updater: updates the JS designer.
      Specified by:
      run in interface Runnable
    • createTransaction

      public SendTransaction createTransaction()
      Creates a transaction with the configured write cache.
      Specified by:
      createTransaction in interface ITransactionCreator
      Returns:
      The new Transaction instance.
    • sendTransaction

      public void sendTransaction(SendTransaction trans)
      Sends a transaction to the JavaScript panel designer. This transaction is ignored if the JavaScript side is not present.
      Specified by:
      sendTransaction in interface ITransactionSender
      Parameters:
      trans - The transaction.
    • getCurrentComplexOperation

      public IComplexOperation getCurrentComplexOperation()
      Gets the ComplexOperation object for the current undo/redo operation.
      Specified by:
      getCurrentComplexOperation in interface IProxyEditController
      Returns:
      An instance of com.iizigo.editor.complex.ComplexOperation if inside the Designer and an Undo Transaction is running, null otherwise.
    • setDragging

      public static void setDragging(ISelection selection)
      Sets the validity of drag-drop in order to accept LocalSelection or not, i.e. that it's from this Eclipse instance the drag-drop originates from. This is queried from JS Designer.
      Parameters:
      selection - The selection of properties, or null to indicate that drag-drop operation is completed or canceled.
    • getJSDraggingProps

      public static ArrayList<DesignerProp> getJSDraggingProps()
      Gets the properties being dragged from JavaScript.
      Returns:
      The dragged properties, or null for none.
    • getClientContextMenuReference

      public String getClientContextMenuReference(UIContextMenu contextMenu)
      Gets the reference to use for a context menu.
      Specified by:
      getClientContextMenuReference in interface IPropMgrOwner
      Parameters:
      contextMenu - The context menu.
      Returns:
      The reference to use, empty string for none (never null).