de.matthiasmann.twl
Class PositionAnimatedPanel

java.lang.Object
  extended by de.matthiasmann.twl.Widget
      extended by de.matthiasmann.twl.PositionAnimatedPanel

public class PositionAnimatedPanel
extends Widget

A widget that slides in/out a selected edge of the screen.


Nested Class Summary
static class PositionAnimatedPanel.Direction
           
 
Nested classes/interfaces inherited from class de.matthiasmann.twl.Widget
Widget.OffscreenMouseAdjustments, Widget.RenderOffscreen
 
Field Summary
 
Fields inherited from class de.matthiasmann.twl.Widget
STATE_DISABLED, STATE_HAS_FOCUSED_CHILD, STATE_HAS_OPEN_POPUPS, STATE_KEYBOARD_FOCUS
 
Constructor Summary
PositionAnimatedPanel(Widget animatedWidget)
           
 
Method Summary
protected  void afterAddToGUI(GUI gui)
          Called after this widget has been added to a GUI tree.
protected  void applyTheme(ThemeInfo themeInfo)
          Apply the given theme.
protected  void beforeRemoveFromGUI(GUI gui)
          Called when this widget is removed from the GUI tree.
 int getAuraSizeX()
           
 int getAuraSizeY()
           
 BooleanModel getForceVisibleModel()
           
 PositionAnimatedPanel.Direction getHideDirection()
           
 int getMinHeight()
          Returns the minimum height of the widget.
 int getMinWidth()
          Returns the minimum width of the widget.
 int getMoveSpeedIn()
           
 int getMoveSpeedOut()
           
 int getPreferredInnerHeight()
          Computes the preferred inner height (the size of the widget without the border) The default implementation uses the current position of the children.
 int getPreferredInnerWidth()
          Computes the preferred inner width (the size of the widget without the border) The default implementation uses the current position of the children.
 boolean isForceVisible()
           
 boolean isForceVisibleJumps()
           
 boolean isHidden()
           
protected  void layout()
          Called when the layoutInvalid flag is set.
protected  void paint(GUI gui)
          Paints this widget and it's children.
protected  void positionChanged()
          Called when the position of this widget was changed.
 void setAuraSizeX(int auraSizeX)
           
 void setAuraSizeY(int auraSizeY)
           
 void setForceVisible(boolean forceVisible)
           
 void setForceVisibleJumps(boolean forceJumps)
           
 void setForceVisibleModel(BooleanModel forceVisibleModel)
           
 void setHideDirection(PositionAnimatedPanel.Direction direction)
           
 void setMoveSpeedIn(int moveSpeedIn)
           
 void setMoveSpeedOut(int moveSpeedOut)
           
 
Methods inherited from class de.matthiasmann.twl.Widget
add, addActionMapping, addPropertyChangeListener, addPropertyChangeListener, adjustSize, allChildrenRemoved, applyThemeBackground, applyThemeBorder, applyThemeInputMap, applyThemeMaxSize, applyThemeMinSize, applyThemeMouseCursor, applyThemeOffscreenExtra, applyThemeOverlay, applyThemeTooltip, borderChanged, canAcceptKeyboardFocus, childAdded, childInvalidateLayout, childRemoved, childVisibilityChanged, computeSize, destroy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, focusFirstChild, focusLastChild, focusNextChild, focusPrevChild, getActionMap, getAnimationState, getBackground, getBorderBottom, getBorderHorizontal, getBorderLeft, getBorderRight, getBorderTop, getBorderVertical, getBottom, getChild, getChildAt, getChildIndex, getGUI, getHeight, getInnerBottom, getInnerHeight, getInnerRight, getInnerWidth, getInnerX, getInnerY, getInputMap, getKeyboardFocusOrder, getMaxHeight, getMaxWidth, getMouseCursor, getMouseCursor, getNumChildren, getOffscreenExtraBottom, getOffscreenExtraLeft, getOffscreenExtraRight, getOffscreenExtraTop, getOrCreateActionMap, getOverlay, getParent, getPreferredHeight, getPreferredWidth, getRenderOffscreen, getRight, getRootWidget, getTheme, getThemePath, getThemeTooltipContent, getTintAnimator, getTooltipContent, getTooltipContentAt, getWidgetAt, getWidth, getX, getY, giveupKeyboardFocus, handleEvent, handleKeyStrokeAction, hasKeyboardFocus, hasOpenPopups, hasSharedAnimationState, insertChild, invalidateLayout, invalidateLayoutLocally, isAbsoluteTheme, isClip, isDepthFocusTraversal, isEnabled, isFocusKeyEnabled, isInside, isLocallyEnabled, isMouseInside, isVisible, keyboardFocusChildChanged, keyboardFocusGained, keyboardFocusGained, keyboardFocusLost, layoutChildFullInnerArea, layoutChildrenFullInnerArea, moveChild, paintBackground, paintChild, paintChildren, paintDragOverlay, paintOverlay, paintWidget, reapplyTheme, removeAllChildren, removeChild, removeChild, removePropertyChangeListener, removePropertyChangeListener, requestKeyboardFocus, requestKeyboardFocus, resetTooltip, setActionMap, setBackground, setBorderSize, setBorderSize, setBorderSize, setBorderSize, setCanAcceptKeyboardFocus, setClip, setDepthFocusTraversal, setEnabled, setFocusKeyEnabled, setInnerSize, setInputMap, setMaxSize, setMinSize, setMouseCursor, setOffscreenExtra, setOffscreenExtra, setOverlay, setPosition, setRenderOffscreen, setSize, setTheme, setTintAnimator, setTooltipContent, setVisible, sizeChanged, updateTintAnimation, updateTooltip, validateLayout, widgetDisabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PositionAnimatedPanel

public PositionAnimatedPanel(Widget animatedWidget)
Method Detail

getHideDirection

public PositionAnimatedPanel.Direction getHideDirection()

setHideDirection

public void setHideDirection(PositionAnimatedPanel.Direction direction)

getMoveSpeedIn

public int getMoveSpeedIn()

setMoveSpeedIn

public void setMoveSpeedIn(int moveSpeedIn)

getMoveSpeedOut

public int getMoveSpeedOut()

setMoveSpeedOut

public void setMoveSpeedOut(int moveSpeedOut)

getAuraSizeX

public int getAuraSizeX()

setAuraSizeX

public void setAuraSizeX(int auraSizeX)

getAuraSizeY

public int getAuraSizeY()

setAuraSizeY

public void setAuraSizeY(int auraSizeY)

isForceVisible

public boolean isForceVisible()

setForceVisible

public void setForceVisible(boolean forceVisible)

isForceVisibleJumps

public boolean isForceVisibleJumps()

setForceVisibleJumps

public void setForceVisibleJumps(boolean forceJumps)

getForceVisibleModel

public BooleanModel getForceVisibleModel()

setForceVisibleModel

public void setForceVisibleModel(BooleanModel forceVisibleModel)

isHidden

public boolean isHidden()

getMinWidth

public int getMinWidth()
Description copied from class: Widget
Returns the minimum width of the widget. Layout manager will allocate atleast the minimum width to a widget even when the container is not big enough. The default implementation will not return values smaller then the current border width.

Overrides:
getMinWidth in class Widget
Returns:
the minimum width of the widget

getMinHeight

public int getMinHeight()
Description copied from class: Widget
Returns the minimum height of the widget. Layout manager will allocate atleast the minimum height to a widget even when the container is not big enough. The default implementation will not return values smaller then the current border width.

Overrides:
getMinHeight in class Widget
Returns:
the minimum height of the widget

getPreferredInnerWidth

public int getPreferredInnerWidth()
Description copied from class: Widget
Computes the preferred inner width (the size of the widget without the border) The default implementation uses the current position of the children. It is highly recommended to override this method as the default implementation lead to unstable layouts. The default behavior might change in the future to provide a better default behavior.

Overrides:
getPreferredInnerWidth in class Widget
Returns:
the preferred inner width

getPreferredInnerHeight

public int getPreferredInnerHeight()
Description copied from class: Widget
Computes the preferred inner height (the size of the widget without the border) The default implementation uses the current position of the children. It is highly recommended to override this method as the default implementation lead to unstable layouts. The default behavior might change in the future to provide a better default behavior.

Overrides:
getPreferredInnerHeight in class Widget
Returns:
the preferred inner height

applyTheme

protected void applyTheme(ThemeInfo themeInfo)
Description copied from class: Widget
Apply the given theme. This method also calls invalidateLayout()

Overrides:
applyTheme in class Widget
Parameters:
themeInfo - The theme info for this widget

afterAddToGUI

protected void afterAddToGUI(GUI gui)
Description copied from class: Widget
Called after this widget has been added to a GUI tree.

Overrides:
afterAddToGUI in class Widget
Parameters:
gui - the GUI object - same as getGUI()
See Also:
Widget.getGUI()

beforeRemoveFromGUI

protected void beforeRemoveFromGUI(GUI gui)
Description copied from class: Widget
Called when this widget is removed from the GUI tree. After this call getGUI() will return null.

Overrides:
beforeRemoveFromGUI in class Widget
Parameters:
gui - the GUI object - same as getGUI()
See Also:
Widget.getGUI()

layout

protected void layout()
Description copied from class: Widget
Called when the layoutInvalid flag is set. The default implementation does nothing.

Overrides:
layout in class Widget

positionChanged

protected void positionChanged()
Description copied from class: Widget
Called when the position of this widget was changed. The default implementation does nothing. Child positions are already updated to retain the absolute coordinate system. This has the side effect of firing child's positionChanged before the parent's.

Overrides:
positionChanged in class Widget

paint

protected void paint(GUI gui)
Description copied from class: Widget
Paints this widget and it's children.

A subclass should overwrite paintWidget() instead of this function.

The default implementation calls the following method in order:

  1. Widget.paintBackground(de.matthiasmann.twl.GUI)
  2. Widget.paintWidget(de.matthiasmann.twl.GUI)
  3. Widget.paintChildren(de.matthiasmann.twl.GUI)
  4. Widget.paintOverlay(de.matthiasmann.twl.GUI)

Overrides:
paint in class Widget
Parameters:
gui - the GUI object