de.matthiasmann.twl
Class SplitPane

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

public class SplitPane
extends Widget


Nested Class Summary
static class SplitPane.Direction
           
 
Nested classes/interfaces inherited from class de.matthiasmann.twl.Widget
Widget.OffscreenMouseAdjustments, Widget.RenderOffscreen
 
Field Summary
static int CENTER
          Magic constant for setSplitPosition(int) to keep both widgets on equal size.
static int MIN_SIZE
          Magic constant for setSplitPosition(int) to keep the first (or second widget when getReverseSplitPosition() is active) in it's minimum size.
static int PREFERRED_SIZE
          Magic constant for setSplitPosition(int) to keep the first (or second widget when getReverseSplitPosition() is active) in it's preferred size.
 
Fields inherited from class de.matthiasmann.twl.Widget
STATE_DISABLED, STATE_HAS_FOCUSED_CHILD, STATE_HAS_OPEN_POPUPS, STATE_KEYBOARD_FOCUS
 
Constructor Summary
SplitPane()
           
 
Method Summary
protected  void childAdded(Widget child)
          A new child has been added.
protected  void childRemoved(Widget exChild)
          A child has been removed.
 SplitPane.Direction getDirection()
           
 int getMaxSplitPosition()
           
 int getMinHeight()
          Returns the minimum height of the widget.
 int getMinWidth()
          Returns the minimum width of the widget.
 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 getReverseSplitPosition()
           
 int getSplitPosition()
           
 boolean isRespectMinSizes()
           
protected  void layout()
          Called when the layoutInvalid flag is set.
 void setDirection(SplitPane.Direction direction)
           
 void setRespectMinSizes(boolean respectMinSizes)
           
 void setReverseSplitPosition(boolean reverseSplitPosition)
           
 void setSplitPosition(int pos)
           
 
Methods inherited from class de.matthiasmann.twl.Widget
add, addActionMapping, addPropertyChangeListener, addPropertyChangeListener, adjustSize, afterAddToGUI, allChildrenRemoved, applyTheme, applyThemeBackground, applyThemeBorder, applyThemeInputMap, applyThemeMaxSize, applyThemeMinSize, applyThemeMouseCursor, applyThemeOffscreenExtra, applyThemeOverlay, applyThemeTooltip, beforeRemoveFromGUI, borderChanged, canAcceptKeyboardFocus, childInvalidateLayout, 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, paint, paintBackground, paintChild, paintChildren, paintDragOverlay, paintOverlay, paintWidget, positionChanged, 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
 

Field Detail

CENTER

public static final int CENTER
Magic constant for setSplitPosition(int) to keep both widgets on equal size.

See Also:
Constant Field Values

MIN_SIZE

public static final int MIN_SIZE
Magic constant for setSplitPosition(int) to keep the first (or second widget when getReverseSplitPosition() is active) in it's minimum size.

See Also:
Constant Field Values

PREFERRED_SIZE

public static final int PREFERRED_SIZE
Magic constant for setSplitPosition(int) to keep the first (or second widget when getReverseSplitPosition() is active) in it's preferred size.

See Also:
Constant Field Values
Constructor Detail

SplitPane

public SplitPane()
Method Detail

getDirection

public SplitPane.Direction getDirection()

setDirection

public void setDirection(SplitPane.Direction direction)

getMaxSplitPosition

public int getMaxSplitPosition()

getSplitPosition

public int getSplitPosition()

setSplitPosition

public void setSplitPosition(int pos)

getReverseSplitPosition

public boolean getReverseSplitPosition()

setReverseSplitPosition

public void setReverseSplitPosition(boolean reverseSplitPosition)

isRespectMinSizes

public boolean isRespectMinSizes()

setRespectMinSizes

public void setRespectMinSizes(boolean respectMinSizes)

childRemoved

protected void childRemoved(Widget exChild)
Description copied from class: Widget
A child has been removed. The default implementation calls invalidateLayout.

Overrides:
childRemoved in class Widget
Parameters:
exChild - the removed widget - no longer a child
See Also:
Widget.invalidateLayout()

childAdded

protected void childAdded(Widget child)
Description copied from class: Widget
A new child has been added. The default implementation calls invalidateLayout.

Overrides:
childAdded in class Widget
Parameters:
child - the new child
See Also:
Widget.invalidateLayout()

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

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