org.xwiki.gwt.wysiwyg.client.widget.wizard.util
Class AbstractSelectorWizardStep<T>

java.lang.Object
  extended by org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractSelectorWizardStep<T>
Type Parameters:
T - the type of data edited by this wizard step
All Implemented Interfaces:
WizardStep
Direct Known Subclasses:
AbstractExplorerWizardStep, AbstractListSelectorWizardStep, AbstractSelectorAggregatorWizardStep, ImagesExplorerWizardStep

public abstract class AbstractSelectorWizardStep<T>
extends java.lang.Object
implements WizardStep

Abstract WizardStep to implement basic selector functions (storing edited data on init(Object, AsyncCallback) and returning on getResult(), step names, directions, initialization), regardless of the actual selecting method.

Version:
$Id: AbstractSelectorWizardStep.java 26786 2010-02-07 16:46:17Z mflorea $

Constructor Summary
AbstractSelectorWizardStep()
           
 
Method Summary
 T getData()
           
 java.lang.String getDirectionName(NavigationListener.NavigationDirection direction)
          
 java.lang.Object getResult()
          
 java.util.EnumSet<NavigationListener.NavigationDirection> getValidDirections()
          
 void init(java.lang.Object data, com.google.gwt.user.client.rpc.AsyncCallback<?> cb)
          
protected  void initializeSelection(com.google.gwt.user.client.rpc.AsyncCallback<?> initCallback)
          Initializes the selection on init(Object, AsyncCallback) time.
 void setActive()
          Notifies this wizard step that it has been activated, when part of an aggregator for example.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xwiki.gwt.user.client.ui.wizard.WizardStep
display, getNextStep, getStepTitle, onCancel, onSubmit
 

Constructor Detail

AbstractSelectorWizardStep

public AbstractSelectorWizardStep()
Method Detail

init

public void init(java.lang.Object data,
                 com.google.gwt.user.client.rpc.AsyncCallback<?> cb)

Specified by:
init in interface WizardStep

initializeSelection

protected void initializeSelection(com.google.gwt.user.client.rpc.AsyncCallback<?> initCallback)
Initializes the selection on init(Object, AsyncCallback) time.

Parameters:
initCallback - the initialization callback, to handle asynchronous initialization.

getDirectionName

public java.lang.String getDirectionName(NavigationListener.NavigationDirection direction)

Specified by:
getDirectionName in interface WizardStep

getResult

public java.lang.Object getResult()

Specified by:
getResult in interface WizardStep

getValidDirections

public java.util.EnumSet<NavigationListener.NavigationDirection> getValidDirections()

Specified by:
getValidDirections in interface WizardStep

getData

public T getData()
Returns:
the data configured by this WizardStep

setActive

public void setActive()
Notifies this wizard step that it has been activated, when part of an aggregator for example.
FIXME: this function should not be here but in it's own decorating interface for aggregated wizard steps or, cleaner, all wizard steps who need to be notified when they're activated should implement Focusable interface and all wizard step handlers (the dialog, the aggregator) should call setFocus(). This is a quick solution to handle tab change in the selector aggregator.



Copyright © 2004-2011 XWiki. All Rights Reserved.