org.cruxframework.crux.widgets.client.swappanel
Class HorizontalSwapPanel

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Composite
              extended by org.cruxframework.crux.widgets.client.swappanel.HorizontalSwapPanel
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget, HasSwapHandlers

public class HorizontalSwapPanel
extends com.google.gwt.user.client.ui.Composite
implements HasSwapHandlers

A panel that swaps its contents using slide animations.

Author:
Gesse Dafe

Nested Class Summary
static class HorizontalSwapPanel.Direction
           
 
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
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
HorizontalSwapPanel()
          Constructor
 
Method Summary
 com.google.gwt.event.shared.HandlerRegistration addSwapHandler(SwapHandler handler)
           
 void clear()
           
 com.google.gwt.user.client.ui.Widget getCurrentWidget()
           
 int getTransitionDuration()
           
 boolean isUseFadeTransitions()
          Get the useFadeTransitions property.
 void setCurrentWidget(com.google.gwt.user.client.ui.Widget widget)
          Sets the widget that will be initially visible on this panel.
 void setHeight(String height)
           
 void setTransitionDuration(int transitionDuration)
          Sets the duration of the animations in milliseconds.
 void setUseFadeTransitions(boolean useFadeTransitions)
          Set the useFadeTransitions property.
 void transitTo(com.google.gwt.user.client.ui.Widget w, HorizontalSwapPanel.Direction direction)
          Changes the widget being shown on this widget.
 void transitTo(com.google.gwt.user.client.ui.Widget w, HorizontalSwapPanel.Direction direction, org.cruxframework.crux.core.client.css.transition.Transition.Callback completeCallback)
          Changes the widget being shown on this widget.
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

HorizontalSwapPanel

public HorizontalSwapPanel()
Constructor

Method Detail

setHeight

public void setHeight(String height)
Overrides:
setHeight in class com.google.gwt.user.client.ui.UIObject

addSwapHandler

public com.google.gwt.event.shared.HandlerRegistration addSwapHandler(SwapHandler handler)
Specified by:
addSwapHandler in interface HasSwapHandlers

setCurrentWidget

public void setCurrentWidget(com.google.gwt.user.client.ui.Widget widget)
Sets the widget that will be initially visible on this panel.

Parameters:
widget -

isUseFadeTransitions

public boolean isUseFadeTransitions()
Get the useFadeTransitions property. When this property is true, this panel will use a fade animation when setCurrentWidget is called

Returns:

setUseFadeTransitions

public void setUseFadeTransitions(boolean useFadeTransitions)
Set the useFadeTransitions property. When this property is true, this panel will use a fade animation when setCurrentWidget is called

Parameters:
useFadeTransitions -

getCurrentWidget

public com.google.gwt.user.client.ui.Widget getCurrentWidget()
Returns:

transitTo

public void transitTo(com.google.gwt.user.client.ui.Widget w,
                      HorizontalSwapPanel.Direction direction)
Changes the widget being shown on this widget.

Parameters:
w -
direction - the direction of the animation

transitTo

public void transitTo(com.google.gwt.user.client.ui.Widget w,
                      HorizontalSwapPanel.Direction direction,
                      org.cruxframework.crux.core.client.css.transition.Transition.Callback completeCallback)
Changes the widget being shown on this widget.

Parameters:
w -
direction - the direction of the animation
completeCallback -

setTransitionDuration

public void setTransitionDuration(int transitionDuration)
Sets the duration of the animations in milliseconds.

Parameters:
transitionDuration -

getTransitionDuration

public int getTransitionDuration()
Returns:

clear

public void clear()


Copyright © 2015. All rights reserved.