org.xwiki.gwt.wysiwyg.client.widget.wizard.util
Class AbstractSelectorAggregatorWizardStep<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>
              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<Integer>, com.google.gwt.event.shared.EventHandler, NavigationListener, SourcesNavigationEvents, WizardStep
Direct Known Subclasses:
AttachmentSelectorAggregatorWizardStep, PageSelectorWizardStep

public abstract class AbstractSelectorAggregatorWizardStep<T>
extends AbstractSelectorWizardStep<T>
implements com.google.gwt.event.logical.shared.SelectionHandler<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: 612afbb156a8d97b989f5c4571f09d75e94dbb00 $
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)
          
protected  String getDefaultStepName()
           
 String getDirectionName(NavigationListener.NavigationDirection direction)
          
 String getNextStep()
          
protected  String getRequiredStep()
           
 Object getResult()
          
protected  WizardStep getStep(String name)
           
protected abstract  WizardStep getStepInstance(String name)
           
protected abstract  List<String> getStepNames()
           
 void init(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<Integer> event)
          
 void onSubmit(com.google.gwt.user.client.rpc.AsyncCallback<Boolean> async)
          
 void removeNavigationListener(NavigationListener listener)
          
protected  void selectTab(String tabName)
          Selects the tab indicated by the passed name.
 
Methods inherited from class org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractSelectorWizardStep
getData, initializeSelection, setActive
 
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
getValidDirections, setDirectionName, setNextStep, setValidDirections
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSelectorAggregatorWizardStep

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

Method Detail

getStep

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

getStepInstance

protected abstract WizardStep getStepInstance(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 List<String> getStepNames()
Returns:
the list of all step names

getDefaultStepName

protected 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<Integer> event)

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

selectTab

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

Parameters:
tabName - the name of the tab to select

getDirectionName

public String getDirectionName(NavigationListener.NavigationDirection direction)

Specified by:
getDirectionName in interface WizardStep
Overrides:
getDirectionName in class AbstractNavigationAwareWizardStep

getNextStep

public String getNextStep()

Specified by:
getNextStep in interface WizardStep
Overrides:
getNextStep in class AbstractNavigationAwareWizardStep

getResult

public Object getResult()

Specified by:
getResult in interface WizardStep
Overrides:
getResult in class AbstractSelectorWizardStep<T>
See Also:
WizardStep.getResult()

init

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

Specified by:
init in interface WizardStep
Overrides:
init in class AbstractSelectorWizardStep<T>
See Also:
WizardStep.init(Object, AsyncCallback)

getRequiredStep

protected 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<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-2013 XWiki. All Rights Reserved.