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

java.lang.Object
  extended by org.xwiki.gwt.user.client.ui.wizard.AbstractNavigationAwareWizardStep
      extended by org.xwiki.gwt.user.client.ui.wizard.AbstractInteractiveWizardStep
          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 AbstractInteractiveWizardStep

Abstract interactive wizard step 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: da285b4b271cbdbc120e4096308b4b302e4fde84 $

Constructor Summary
AbstractSelectorWizardStep()
          Default constructor.
AbstractSelectorWizardStep(com.google.gwt.user.client.ui.FlowPanel panel)
          Creates a new step that uses the given panel.
 
Method Summary
 T getData()
           
 Object getResult()
          
 void init(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 org.xwiki.gwt.user.client.ui.wizard.AbstractInteractiveWizardStep
display, getStepTitle, isAutoSubmit, setStepTitle
 
Methods inherited from class org.xwiki.gwt.user.client.ui.wizard.AbstractNavigationAwareWizardStep
getDirectionName, getNextStep, getValidDirections, setDirectionName, setNextStep, setValidDirections
 
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
onCancel, onSubmit
 

Constructor Detail

AbstractSelectorWizardStep

public AbstractSelectorWizardStep()
Default constructor.


AbstractSelectorWizardStep

public AbstractSelectorWizardStep(com.google.gwt.user.client.ui.FlowPanel panel)
Creates a new step that uses the given panel.

Parameters:
panel - the panel where to place the step's widgets
Method Detail

init

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

See Also:
WizardStep.init(Object, AsyncCallback)

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

getResult

public Object getResult()

See Also:
WizardStep.getResult()

getData

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

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–2015 XWiki. All rights reserved.