org.xwiki.gwt.wysiwyg.client.plugin.sync
Class SyncPlugin

java.lang.Object
  extended by org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractPlugin
      extended by org.xwiki.gwt.wysiwyg.client.plugin.sync.SyncPlugin
All Implemented Interfaces:
com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.event.shared.EventHandler, com.google.gwt.user.client.rpc.AsyncCallback<SyncResult>, TimerListener, Plugin

public class SyncPlugin
extends org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractPlugin
implements com.google.gwt.event.dom.client.ClickHandler, TimerListener, com.google.gwt.user.client.rpc.AsyncCallback<SyncResult>


Field Summary
static int DEFAULT_SYNC_DELAY
           
 
Constructor Summary
SyncPlugin(SyncServiceAsync syncService)
          Creates a new synchronization plug-in that uses the given service to synchronize multiple editors.
 
Method Summary
 void debugMessage(java.lang.String text)
           
 void destroy()
          Notifies the plug-in to release its resources before being unloaded from the WYSIWYG editor.
 void init(RichTextArea textArea, Config config)
          Initialize the plug-in.
 void onClick(com.google.gwt.event.dom.client.ClickEvent event)
          
 void onElapsed(Timer sender)
          
 void onFailure(java.lang.Throwable caught)
          
 void onSuccess(SyncResult result)
          
 void onSync()
           
 void showDialog(java.lang.String title, java.lang.String message, com.google.gwt.user.client.rpc.AsyncCallback cb)
           
 void showError(java.lang.String text, com.google.gwt.user.client.rpc.AsyncCallback<?> cb)
           
 void showError(java.lang.String code, java.lang.String text, com.google.gwt.user.client.rpc.AsyncCallback<?> cb)
           
 void showError(java.lang.Throwable caught, com.google.gwt.user.client.rpc.AsyncCallback<?> cb)
           
 
Methods inherited from class org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractPlugin
getConfig, getTextArea, getUIExtensionList, getUIExtensions, saveRegistration, saveRegistrations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SYNC_DELAY

public static final int DEFAULT_SYNC_DELAY
See Also:
Constant Field Values
Constructor Detail

SyncPlugin

public SyncPlugin(SyncServiceAsync syncService)
Creates a new synchronization plug-in that uses the given service to synchronize multiple editors.

Parameters:
syncService - the synchronization service
Method Detail

init

public void init(RichTextArea textArea,
                 Config config)
Initialize the plug-in. Plug-ins need to know the text area in order to provide only those feature that are supported.

Specified by:
init in interface Plugin
Overrides:
init in class org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractPlugin
Parameters:
textArea - the text area of the editor
config - the configuration object
See Also:
AbstractPlugin.init(RichTextArea, Config)

destroy

public void destroy()
Notifies the plug-in to release its resources before being unloaded from the WYSIWYG editor.

Specified by:
destroy in interface Plugin
Overrides:
destroy in class org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractPlugin
See Also:
AbstractPlugin.destroy()

onClick

public void onClick(com.google.gwt.event.dom.client.ClickEvent event)

Specified by:
onClick in interface com.google.gwt.event.dom.client.ClickHandler
See Also:
ClickHandler.onClick(ClickEvent)

onElapsed

public void onElapsed(Timer sender)

Specified by:
onElapsed in interface TimerListener
See Also:
TimerListener.onElapsed(Timer)

onSync

public void onSync()

debugMessage

public void debugMessage(java.lang.String text)

onFailure

public void onFailure(java.lang.Throwable caught)

Specified by:
onFailure in interface com.google.gwt.user.client.rpc.AsyncCallback<SyncResult>
See Also:
AsyncCallback.onFailure(Throwable)

onSuccess

public void onSuccess(SyncResult result)

Specified by:
onSuccess in interface com.google.gwt.user.client.rpc.AsyncCallback<SyncResult>
See Also:
AsyncCallback.onSuccess(Object)

showDialog

public void showDialog(java.lang.String title,
                       java.lang.String message,
                       com.google.gwt.user.client.rpc.AsyncCallback cb)
Parameters:
title -
message -

showError

public void showError(java.lang.Throwable caught,
                      com.google.gwt.user.client.rpc.AsyncCallback<?> cb)

showError

public void showError(java.lang.String text,
                      com.google.gwt.user.client.rpc.AsyncCallback<?> cb)

showError

public void showError(java.lang.String code,
                      java.lang.String text,
                      com.google.gwt.user.client.rpc.AsyncCallback<?> cb)


Copyright © 2004-2011 XWiki. All Rights Reserved.