Package com.iizigo.panel
Class ClientSideEditor
- java.lang.Object
- com.iizigo.panel.ClientSideEditor
- All Implemented Interfaces:
ITransactionSender,ITransactionCreator,EventListener,IPropMgrOwner,IProxyEditController,java.lang.Runnable
public class ClientSideEditor extends java.lang.Object implements EventListener, java.lang.Runnable, IProxyEditController, IPropMgrOwner, ITransactionCreator, ITransactionSender
Class for client-side editor.- Author:
- Christopher Mindus
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SendTransactioncreateTransaction()Creates a transaction with the configured write cache.java.lang.StringgetClientContextMenuReference(UIContextMenu contextMenu)Gets the reference to use for a context menu.IComplexOperationgetCurrentComplexOperation()Gets the ComplexOperation object for the current undo/redo operation.voidonEvent(GEvent e)The listener for root property changes from the JS designer.voidonRemoteEventQueued()Called when a RemoteEvent has been added and needs sending (along with all properties, etc).voidrun()The root property updater: updates the JS designer.voidsendTransaction(SendTransaction trans)Sends a transaction to the JavaScript panel designer.static voidsetDragging(org.eclipse.jface.viewers.ISelection selection)Sets the validity of drag-drop in order to accept LocalSelection or not, i.e.
Method Detail
onEvent
public void onEvent(GEvent e)
The listener for root property changes from the JS designer.- Specified by:
onEventin interfaceEventListener- 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:
onRemoteEventQueuedin interfaceIPropMgrOwner
run
public void run()
The root property updater: updates the JS designer.- Specified by:
runin interfacejava.lang.Runnable
createTransaction
public SendTransaction createTransaction()
Creates a transaction with the configured write cache.- Specified by:
createTransactionin interfaceITransactionCreator- Returns:
- The new
Transactioninstance.
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:
sendTransactionin interfaceITransactionSender- Parameters:
trans- The transaction.
getCurrentComplexOperation
public IComplexOperation getCurrentComplexOperation()
Gets the ComplexOperation object for the current undo/redo operation.- Specified by:
getCurrentComplexOperationin interfaceIProxyEditController- 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(org.eclipse.jface.viewers.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.
getClientContextMenuReference
public java.lang.String getClientContextMenuReference(UIContextMenu contextMenu)
Gets the reference to use for a context menu.- Specified by:
getClientContextMenuReferencein interfaceIPropMgrOwner- Parameters:
contextMenu- The context menu.- Returns:
- The reference to use, empty string for none (never null).