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

java.lang.Object
  extended by org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractSelectorWizardStep<T>
      extended by org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractSelectorAggregatorWizardStep<T>
Type Parameters:
T - the type of object edited by this wizard step
All Implemented Interfaces:
com.google.gwt.event.logical.shared.SelectionHandler<java.lang.Integer>, com.google.gwt.event.shared.EventHandler, NavigationListener, SourcesNavigationEvents, WizardStep
Direct Known Subclasses:
AbstractEntitySelectorAggregatorWizardStep

public abstract class AbstractSelectorAggregatorWizardStep<T>
extends AbstractSelectorWizardStep<T>
implements com.google.gwt.event.logical.shared.SelectionHandler<java.lang.Integer>, SourcesNavigationEvents, NavigationListener

Wizard step used to aggregate a set of selectors for a file attached (file attachment or image) to a page in the wiki, and switch between the current page view and the entire wiki view.

Version:
$Id: AbstractSelectorAggregatorWizardStep.java 28844 2010-05-12 13:22:39Z mflorea $
See Also:
AbstractSelectorWizardStep

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.xwiki.gwt.user.client.ui.wizard.NavigationListener
NavigationListener.NavigationDirection
 
Constructor Summary
AbstractSelectorAggregatorWizardStep()
          Creates a new aggregator selector wizard step.
 
Method Summary
 void addNavigationListener(NavigationListener listener)
          
 com.google.gwt.user.client.ui.Widget display()
          
protected  java.lang.String getDefaultStepName()
           
 java.lang.String getDirectionName(NavigationListener.NavigationDirection direction)
          
 java.lang.String getNextStep()
          
protected  java.lang.String getRequiredStep()
           
 java.lang.Object getResult()
          
protected  WizardStep getStep(java.lang.String name)
           
protected abstract  WizardStep getStepInstance(java.lang.String name)
           
protected abstract  java.util.List<java.lang.String> getStepNames()
           
 void init(java.lang.Object data, com.google.gwt.user.client.rpc.AsyncCallback<?> cb)
          
 void onCancel()
          
 void onDirection(NavigationListener.NavigationDirection direction)
          
 void onSelection(com.google.gwt.event.logical.shared.SelectionEvent<java.lang.Integer> event)
          
 void onSubmit(com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> async)
          
 void removeNavigationListener(NavigationListener listener)
          
protected  void selectTab(java.lang.String tabName)
          Selects the tab indicated by the passed name.
 
Methods inherited from class org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractSelectorWizardStep
getData, getValidDirections, initializeSelection, setActive
 
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
getStepTitle
 

Constructor Detail

AbstractSelectorAggregatorWizardStep

public AbstractSelectorAggregatorWizardStep()
Creates a new aggregator selector wizard step.

Method Detail

getStep

protected WizardStep getStep(java.lang.String name)
Parameters:
name - the name of the step to get
Returns:
the step for the passed name

getStepInstance

protected abstract WizardStep getStepInstance(java.lang.String name)
Parameters:
name - the name of the step to initialize
Returns:
an instance of the step recognized by the passed name

getStepNames

protected abstract java.util.List<java.lang.String> getStepNames()
Returns:
the list of all step names

getDefaultStepName

protected java.lang.String getDefaultStepName()
Returns:
the step which should be selected by default, the first step name by default

onSelection

public void onSelection(com.google.gwt.event.logical.shared.SelectionEvent<java.lang.Integer> event)

Specified by:
onSelection in interface com.google.gwt.event.logical.shared.SelectionHandler<java.lang.Integer>
See Also:
SelectionHandler.onSelection(SelectionEvent)

selectTab

protected void selectTab(java.lang.String tabName)
Selects the tab indicated by the passed name.

Parameters:
tabName - the name of the tab to select

display

public com.google.gwt.user.client.ui.Widget display()

Specified by:
display in interface WizardStep

getDirectionName

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

Specified by:
getDirectionName in interface WizardStep
Overrides:
getDirectionName in class AbstractSelectorWizardStep<T>

getNextStep

public java.lang.String getNextStep()

Specified by:
getNextStep in interface WizardStep

getResult

public java.lang.Object getResult()

Specified by:
getResult in interface WizardStep
Overrides:
getResult in class AbstractSelectorWizardStep<T>

init

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

Specified by:
init in interface WizardStep
Overrides:
init in class AbstractSelectorWizardStep<T>

getRequiredStep

protected java.lang.String getRequiredStep()
Returns:
the name of the step required to be loaded by the current created or edited element, if any, or null otherwise (if previous selection should be preserved). To be overwritten by subclasses to detect whether the data being handled requires the "all pages" step to be loaded or not.

onCancel

public void onCancel()

Specified by:
onCancel in interface WizardStep

onSubmit

public void onSubmit(com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> async)

Specified by:
onSubmit in interface WizardStep

addNavigationListener

public void addNavigationListener(NavigationListener listener)

Specified by:
addNavigationListener in interface SourcesNavigationEvents

removeNavigationListener

public void removeNavigationListener(NavigationListener listener)

Specified by:
removeNavigationListener in interface SourcesNavigationEvents

onDirection

public void onDirection(NavigationListener.NavigationDirection direction)

Specified by:
onDirection in interface NavigationListener


Copyright © 2004-2010 XWiki. All Rights Reserved.