org.gcube.portlets.user.td.openwidget.client.general
Class WizardWindow

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.sencha.gxt.widget.core.client.Component
              extended by com.sencha.gxt.widget.core.client.container.Container
                  extended by com.sencha.gxt.widget.core.client.container.ResizeContainer
                      extended by com.sencha.gxt.widget.core.client.container.SimpleContainer
                          extended by com.sencha.gxt.widget.core.client.ContentPanel
                              extended by com.sencha.gxt.widget.core.client.Window
                                  extended by org.gcube.portlets.user.td.openwidget.client.general.WizardWindow
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasResizeHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.AcceptsOneWidget, com.google.gwt.user.client.ui.HasEnabled, com.google.gwt.user.client.ui.HasOneWidget, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IndexedPanel, com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, com.google.gwt.user.client.ui.ProvidesResize, com.google.gwt.user.client.ui.RequiresResize, com.sencha.gxt.widget.core.client.Collapsible, com.sencha.gxt.widget.core.client.container.HasLayout, com.sencha.gxt.widget.core.client.event.ActivateEvent.HasActivateHandlers<com.sencha.gxt.widget.core.client.Window>, com.sencha.gxt.widget.core.client.event.AddEvent.HasAddHandlers, com.sencha.gxt.widget.core.client.event.BeforeAddEvent.HasBeforeAddHandlers, com.sencha.gxt.widget.core.client.event.BeforeCollapseEvent.HasBeforeCollapseHandlers, com.sencha.gxt.widget.core.client.event.BeforeExpandEvent.HasBeforeExpandHandlers, com.sencha.gxt.widget.core.client.event.BeforeHideEvent.HasBeforeHideHandlers, com.sencha.gxt.widget.core.client.event.BeforeRemoveEvent.HasBeforeRemoveHandlers, com.sencha.gxt.widget.core.client.event.BeforeShowContextMenuEvent.HasBeforeShowContextMenuHandler, com.sencha.gxt.widget.core.client.event.BeforeShowEvent.HasBeforeShowHandlers, com.sencha.gxt.widget.core.client.event.BlurEvent.HasBlurHandlers, com.sencha.gxt.widget.core.client.event.CollapseEvent.HasCollapseHandlers, com.sencha.gxt.widget.core.client.event.ContainerHandler.HasContainerHandlers, com.sencha.gxt.widget.core.client.event.DeactivateEvent.HasDeactivateHandlers<com.sencha.gxt.widget.core.client.Window>, com.sencha.gxt.widget.core.client.event.DisableEvent.HasDisableHandlers, com.sencha.gxt.widget.core.client.event.EnableEvent.HasEnableHandlers, com.sencha.gxt.widget.core.client.event.ExpandEvent.HasExpandHandlers, com.sencha.gxt.widget.core.client.event.FocusEvent.HasFocusHandlers, com.sencha.gxt.widget.core.client.event.HideEvent.HasHideHandlers, com.sencha.gxt.widget.core.client.event.MaximizeEvent.HasMaximizeHandlers, com.sencha.gxt.widget.core.client.event.MinimizeEvent.HasMinimizeHandlers, com.sencha.gxt.widget.core.client.event.MoveEvent.HasMoveHandlers, com.sencha.gxt.widget.core.client.event.RemoveEvent.HasRemoveHandlers, com.sencha.gxt.widget.core.client.event.RestoreEvent.HasRestoreHandlers, com.sencha.gxt.widget.core.client.event.ShowContextMenuEvent.HasShowContextMenuHandler, com.sencha.gxt.widget.core.client.event.ShowEvent.HasShowHandlers, com.sencha.gxt.widget.core.client.HasFocusSupport, com.sencha.gxt.widget.core.client.HasItemId, Iterable<com.google.gwt.user.client.ui.Widget>
Direct Known Subclasses:
TDOpen

public class WizardWindow
extends com.sencha.gxt.widget.core.client.Window

Author:
"Giancarlo Panichi" g.panichi@isti.cnr.it

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sencha.gxt.widget.core.client.Window
com.sencha.gxt.widget.core.client.Window.DefaultWindowMessages, com.sencha.gxt.widget.core.client.Window.WindowAppearance, com.sencha.gxt.widget.core.client.Window.WindowMessages
 
Nested classes/interfaces inherited from class com.sencha.gxt.widget.core.client.ContentPanel
com.sencha.gxt.widget.core.client.ContentPanel.ContentPanelAppearance, com.sencha.gxt.widget.core.client.ContentPanel.ContentPanelMessages, com.sencha.gxt.widget.core.client.ContentPanel.DefaultContentPanelMessages, com.sencha.gxt.widget.core.client.ContentPanel.PanelHeaderAppearance
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel
com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
 
Field Summary
protected  com.sencha.gxt.widget.core.client.button.TextButton backButton
           
protected  String BUTTONBACKLABEL
           
protected  String BUTTONFINISHLABEL
           
protected  String BUTTONNEXTLABEL
           
protected  com.sencha.gxt.widget.core.client.container.CardLayoutContainer cardContainer
           
protected  ArrayList<WizardCard> cardStack
           
protected  boolean checkBeforeClose
           
protected  com.google.web.bindery.event.shared.SimpleEventBus eventBus
           
protected  boolean finish
           
protected  com.google.gwt.user.client.Command finishCommand
           
protected  ArrayList<WizardListener> listeners
           
protected  com.sencha.gxt.widget.core.client.button.TextButton nextButton
           
protected  com.google.gwt.user.client.Command nextButtonAction
           
protected  boolean nextCardFinish
           
protected  String originalTitle
           
protected  com.google.gwt.user.client.Command previousButtonAction
           
protected  boolean WIZARDCOLLAPSIBLE
           
protected  String WIZARDHEIGHT
           
protected  String WIZARDWIDTH
           
protected  boolean WIZARRESIZABLE
           
 
Fields inherited from class com.sencha.gxt.widget.core.client.Window
ariaMoveResizeDistance, closeBtn, dragger, manager, removeFromParentOnHide, restoreBtn
 
Fields inherited from class com.sencha.gxt.widget.core.client.ContentPanel
buttonBar, header, secondPassRequired
 
Fields inherited from class com.sencha.gxt.widget.core.client.container.SimpleContainer
resize, widget
 
Fields inherited from class com.sencha.gxt.widget.core.client.container.ResizeContainer
forceLayoutCommand, forceLayoutOnResize, hadLayoutRunning, layoutCommand, layoutRequiredThisEventLoop, layoutRunning
 
Fields inherited from class com.sencha.gxt.widget.core.client.Component
adjustSize, allowTextSelection, cacheSizes, disableContextMenu, disabled, disabledStyle, ensureVisibilityOnSizing, height, hidden, lastSize, layer, left, mask, maskMessage, monitorWindowResize, pageX, pageY, shim, tabIndex, toolTip, toolTipConfig, top, width, windowResizeDelay, windowResizeTask
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
WizardWindow(String title)
          Create a new Wizard Window with the specified title.
 
Method Summary
 void addCard(WizardCard card)
          Adds a card to this wizard.
 void addListener(WizardListener listener)
           
protected  void addNextButtonListener(com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler listener)
          Add a listener to the next button.
 boolean checkBeforeClose()
           
 void close(boolean check)
           
 void fireAborted()
           
 void fireCompleted(org.gcube.portlets.user.td.gwtservice.shared.tr.TRId trId)
           
 void fireFailed(Throwable throwable, String reason, String details)
           
 ArrayList<WizardCard> getCardStack()
          Returns the card list.
 int getCardStackSize()
          Returns the number of available cards.
 int getCurrentCard()
          Returns the current active card.
 String getOriginalTitle()
           
protected  void initTools()
          
 void nextCard()
          Shows the next available card.
 void previousCard()
          Shows the previous available card.
 void removeCard(WizardCard card)
          Remove a card to this wizard.
 void removeListener(WizardListener listener)
           
protected  void setBackButtonText(String text)
          Sets the back button label.
protected  void setBackButtonVisible(boolean visible)
          Sets visible back button.
 void setCards(ArrayList<WizardCard> cards)
          Set the card list.
 void setEnableBackButton(boolean enable)
          Enables the back button on the wizard.
 void setEnableNextButton(boolean enable)
          Enables the next button on the wizard.
 void setFinishCommand(com.google.gwt.user.client.Command finishCommand)
           
 void setNextButtonCommand(com.google.gwt.user.client.Command command)
          Set the command for the next button.
protected  void setNextButtonText(String text)
          Sets the next button label.
 void setNextButtonToFinish()
          Sets the label of next button to "Finish" value and add a close command to it.
protected  void setNextButtonVisible(boolean visible)
          Sets visible next button.
 void setPreviousButtonCommand(com.google.gwt.user.client.Command command)
          Set the command for the previous button.
 void show()
          
 void showErrorAndHide(String title, String failureReason, String failureDetails, Throwable throwable)
           
 
Methods inherited from class com.sencha.gxt.widget.core.client.Window
addActivateHandler, addDeactivateHandler, addMaximizeHandler, addMinimizeHandler, addRestoreHandler, afterShow, alignTo, center, createGhost, doFocus, fitContainer, focus, getConstrain, getContainer, getDraggable, getFocusWidget, getHideButton, getMinHeight, getMinWidth, getModalPanel, getResizable, getWindowMessages, ghost, hide, hide, isAutoHide, isBlinkModal, isClosable, isDraggable, isMaximizable, isMaximized, isMinimizable, isModal, isOnEsc, isResizable, maximize, minimize, onAfterFirstAttach, onBrowserEvent, onDetach, onDragCancel, onDragEnd, onDragMove, onDragStart, onEndResize, onKeyPress, onStartResize, onWindowResize, restore, setActive, setAutoHide, setBlinkModal, setClosable, setConstrain, setContainer, setDraggable, setFocusWidget, setMaximizable, setMinHeight, setMinimizable, setMinWidth, setModal, setOnEsc, setPagePosition, setPosition, setResizable, setWindowMessages, setZIndex, showWindow, toBack, toFront, unghost
 
Methods inherited from class com.sencha.gxt.widget.core.client.ContentPanel
addBeforeCollapseHandler, addBeforeExpandHandler, addButton, addCollapseHandler, addExpandHandler, addTool, adjustBodySize, afterCollapse, afterExpand, collapse, doAttachChildren, doDetachChildren, doLayout, expand, getAnimationDuration, getBody, getButtonAlign, getButtonBar, getContainerTarget, getFrameSize, getHeader, getHTML, getMessages, getMinButtonWidth, getText, isAnimCollapse, isCollapsed, isCollapsible, isExpanded, isHideCollapseTool, isTitleCollapse, layoutBars, onClick, onCollapse, onDisable, onEnable, onExpand, onResize, setAnimationDuration, setAnimCollapse, setBodyBorder, setBodyStyle, setBodyStyleName, setButtonAlign, setCollapsible, setExpanded, setHeaderVisible, setHeadingHtml, setHeadingHtml, setHeadingText, setHideCollapseTool, setMessages, setMinButtonWidth, setTitleCollapse
 
Methods inherited from class com.sencha.gxt.widget.core.client.container.SimpleContainer
add, add, getWidget, isResize, onRemove, setResize, setWidget, setWidget
 
Methods inherited from class com.sencha.gxt.widget.core.client.container.ResizeContainer
applyLayout, applyLayout, forceLayout, forceLayoutOnChildren, forceLayoutOnChildren, getLeftRightMargins, getParentLayoutWidget, getSideMargins, getTopBottomMargins, isLayoutRunning, isOrWasLayoutRunning, isWidgetVisible, onBeforeDoLayout, onLoad, onResize
 
Methods inherited from class com.sencha.gxt.widget.core.client.container.Container
add, addAddHandler, addBeforeAddHandler, addBeforeRemoveHandler, addContainerHandler, addRemoveHandler, adjustIndex, adopt, checkIndexBoundsForInsertion, clear, disable, doPhysicalAttach, doPhysicalDetach, enable, ensureGroupingHandlerRegistration, findWidget, getChildren, getItemByItemId, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, iterator, onInsert, onWidgetHide, onWidgetShow, orphan, remove, remove, remove
 
Methods inherited from class com.sencha.gxt.widget.core.client.Component
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleDependentName, addStyleOnOver, adjustPosition, adjustSize, applyState, assertAfterRender, assertPreRender, blur, clearSizeCache, disableContextMenu, disableEvents, enableEvents, fireCancellableEvent, fireEvent, getData, getElement, getFocusEl, getFocusSupport, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getPositionEl, getShadow, getStateId, getTabIndex, getToolTip, hideShadow, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isMonitorWindowResize, isRendered, isStateful, isVisible, isVisible, mask, mask, notifyHide, notifyShow, onAttach, onBlur, onFocus, onHide, onHideContextMenu, onPosition, onRightClick, onShow, onShowContextMenu, onUnload, removeStyleDependentName, removeStyleOnOver, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setMonitorWindowResize, setPixelSize, setShadow, setSize, setStateful, setStateId, setStyleDependentName, setTabIndex, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, sync, syncSize, unmask
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WIZARDWIDTH

protected final String WIZARDWIDTH
See Also:
Constant Field Values

WIZARDHEIGHT

protected final String WIZARDHEIGHT
See Also:
Constant Field Values

WIZARRESIZABLE

protected final boolean WIZARRESIZABLE
See Also:
Constant Field Values

WIZARDCOLLAPSIBLE

protected final boolean WIZARDCOLLAPSIBLE
See Also:
Constant Field Values

BUTTONBACKLABEL

protected final String BUTTONBACKLABEL
See Also:
Constant Field Values

BUTTONNEXTLABEL

protected final String BUTTONNEXTLABEL
See Also:
Constant Field Values

BUTTONFINISHLABEL

protected final String BUTTONFINISHLABEL
See Also:
Constant Field Values

cardStack

protected ArrayList<WizardCard> cardStack

backButton

protected com.sencha.gxt.widget.core.client.button.TextButton backButton

nextButton

protected com.sencha.gxt.widget.core.client.button.TextButton nextButton

originalTitle

protected String originalTitle

checkBeforeClose

protected boolean checkBeforeClose

nextCardFinish

protected boolean nextCardFinish

nextButtonAction

protected com.google.gwt.user.client.Command nextButtonAction

previousButtonAction

protected com.google.gwt.user.client.Command previousButtonAction

finishCommand

protected com.google.gwt.user.client.Command finishCommand

cardContainer

protected com.sencha.gxt.widget.core.client.container.CardLayoutContainer cardContainer

listeners

protected ArrayList<WizardListener> listeners

eventBus

protected com.google.web.bindery.event.shared.SimpleEventBus eventBus

finish

protected boolean finish
Constructor Detail

WizardWindow

public WizardWindow(String title)
Create a new Wizard Window with the specified title.

Parameters:
title - the wizard window title.height
Method Detail

initTools

protected void initTools()

Overrides:
initTools in class com.sencha.gxt.widget.core.client.Window

addListener

public void addListener(WizardListener listener)

removeListener

public void removeListener(WizardListener listener)

nextCard

public void nextCard()
Shows the next available card.


previousCard

public void previousCard()
Shows the previous available card.


getCardStackSize

public int getCardStackSize()
Returns the number of available cards.

Returns:

getCurrentCard

public int getCurrentCard()
Returns the current active card.

Returns:

checkBeforeClose

public boolean checkBeforeClose()

close

public void close(boolean check)

setNextButtonToFinish

public void setNextButtonToFinish()
Sets the label of next button to "Finish" value and add a close command to it.


setFinishCommand

public void setFinishCommand(com.google.gwt.user.client.Command finishCommand)
Parameters:
finishCommand -

setNextButtonCommand

public void setNextButtonCommand(com.google.gwt.user.client.Command command)
Set the command for the next button.

Parameters:
command - the command to execute.

setPreviousButtonCommand

public void setPreviousButtonCommand(com.google.gwt.user.client.Command command)
Set the command for the previous button.

Parameters:
command - the command to execute.

show

public void show()

Overrides:
show in class com.sencha.gxt.widget.core.client.Window

setCards

public void setCards(ArrayList<WizardCard> cards)
Set the card list.

Parameters:
cards -

addCard

public void addCard(WizardCard card)
Adds a card to this wizard.

Parameters:
card - the card to add.

removeCard

public void removeCard(WizardCard card)
Remove a card to this wizard.

Parameters:
card - the card to add.

setEnableNextButton

public void setEnableNextButton(boolean enable)
Enables the next button on the wizard.

Parameters:
enable - true to enable the next button, false otherwise.

setEnableBackButton

public void setEnableBackButton(boolean enable)
Enables the back button on the wizard.

Parameters:
enable - true to enable the back button, false otherwise.

setNextButtonText

protected void setNextButtonText(String text)
Sets the next button label.

Parameters:
text - the button label.

setBackButtonText

protected void setBackButtonText(String text)
Sets the back button label.

Parameters:
text - the button label.

setNextButtonVisible

protected void setNextButtonVisible(boolean visible)
Sets visible next button.

Parameters:
visible -

setBackButtonVisible

protected void setBackButtonVisible(boolean visible)
Sets visible back button.

Parameters:
visible -

addNextButtonListener

protected void addNextButtonListener(com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler listener)
Add a listener to the next button.

Parameters:
listener - the listener to add.

getOriginalTitle

public String getOriginalTitle()
Returns:
the originalTitle

getCardStack

public ArrayList<WizardCard> getCardStack()
Returns the card list.

Returns:
teh card list.

showErrorAndHide

public void showErrorAndHide(String title,
                             String failureReason,
                             String failureDetails,
                             Throwable throwable)

fireCompleted

public void fireCompleted(org.gcube.portlets.user.td.gwtservice.shared.tr.TRId trId)

fireAborted

public void fireAborted()

fireFailed

public void fireFailed(Throwable throwable,
                       String reason,
                       String details)


Copyright © 2013. All Rights Reserved.