Class FillPane
- java.lang.Object
-
- org.apache.pivot.wtk.Component
-
- org.apache.pivot.wtk.Container
-
- org.apache.pivot.wtk.FillPane
-
- All Implemented Interfaces:
java.lang.Iterable<Component>
,Sequence<Component>
,ConstrainedVisual
,Visual
public class FillPane extends Container
Container that fills the space it has been given inside its parent and then arranges its child components in a line, either vertically or horizontally.This is useful, for instance, as a shortcut to making a one row and one column
TablePane
orGridPane
. Adding just one child to a FillPane, such as aScrollPane
, will allow that child to fill the containing area (as opposed to using aBoxPane
which will only size itself to the size of its children, which doesn't always work well with aScrollPane
).The n children of a FillPane will be given 1/n of the total space available, depending on the orientation. For vertical, each child's height will be 1/n of the total height, and for horizontal each child's width will be 1/n of the total width. The children will always stretch to the full width / height of the orthogonal direction.
Here is an example: for a horizontal FillPane with three buttons as children:
+--------------------------------------------------+ |+---------------++--------------++---------------+| || || || || || || || || || || || || || Button 1 || Button 2 || Button 3 || || || || || || || || || || || || || |+---------------++--------------++---------------+| +--------------------------------------------------+
And here is a vertical FillPane with three Button children:
+--------------------------------------------------+ |+------------------------------------------------+| || || || Button 1 || || || |+------------------------------------------------+| |+------------------------------------------------+| || || || Button 2 || || || |+------------------------------------------------+| |+------------------------------------------------+| || || || Button 3 || || || |+------------------------------------------------+| +--------------------------------------------------+
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Container
Container.EDTChecker
-
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component
Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary
-
Nested classes/interfaces inherited from interface org.apache.pivot.collections.Sequence
Sequence.Tree<T>
-
-
Constructor Summary
Constructors Constructor Description FillPane()
FillPane(Orientation orientation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListenerList<FillPaneListener>
getFillPaneListeners()
Orientation
getOrientation()
void
setOrientation(Orientation orientation)
-
Methods inherited from class org.apache.pivot.wtk.Container
add, assertEventDispatchThread, assertEventDispatchThread, clear, containsFocus, descendantAdded, descendantGainedFocus, descendantLostFocus, descendantRemoved, get, getComponentAt, getContainerListeners, getContainerMouseListeners, getDescendantAt, getFocusTraversalPolicy, getGraphics, getLength, getNamedComponent, indexOf, insert, invalidate, isAncestor, isDoubleBuffered, iterator, layout, load, mouseClick, mouseDown, mouseMove, mouseOut, mouseUp, mouseWheel, move, paint, remove, remove, removeAll, repaint, requestFocus, setDoubleBuffered, setEventDispatchThreadChecker, setFocusTraversalPolicy, setParent, setVisible, store, transferFocus, update
-
Methods inherited from class org.apache.pivot.wtk.Component
checkSkin, clearFocus, contains, copyStyle, copyStyle, getAncestor, getAncestor, getAttribute, getAutomationID, getBaseline, getBaseline, getBounds, getComponentClassListeners, getComponentDataListeners, getComponentDecoratorListeners, getComponentKeyListeners, getComponentListeners, getComponentMouseButtonListeners, getComponentMouseListeners, getComponentMouseWheelListeners, getComponentStateListeners, getComponentStyleListeners, getComponentTooltipListeners, getCursor, getDecoratedBounds, getDecorators, getDisplay, getDragSource, getDropTarget, getFocusedComponent, getHeight, getHeightLimits, getLocation, getMaximumHeight, getMaximumWidth, getMenuHandler, getMinimumHeight, getMinimumWidth, getMouseLocation, getName, getNamedStyles, getParent, getPreferredHeight, getPreferredHeight, getPreferredSize, getPreferredWidth, getPreferredWidth, getScreenBounds, getSize, getSkin, getStyle, getStyle, getStyleBoolean, getStyleBoolean, getStyleColor, getStyleColor, getStyleFont, getStyleFont, getStyleInt, getStyleInt, getStyles, getTextInputMethodListener, getTooltipDelay, getTooltipText, getTooltipWrapText, getTypedStyles, getUserData, getVisibleArea, getVisibleArea, getVisibleArea, getWidth, getWidthLimits, getWindow, getX, getY, indexBoundsCheck, installSkin, isBlocked, isEnabled, isFocusable, isFocused, isMouseOver, isOpaque, isPreferredHeightSet, isPreferredSizeSet, isPreferredWidthSet, isShowing, isValid, isVisible, keyPressed, keyReleased, keyTyped, mapPointFromAncestor, mapPointFromAncestor, mapPointToAncestor, mapPointToAncestor, mouseOver, offsetToScreen, putStyle, putStyle, reenterMouse, repaint, repaint, repaint, repaint, repaint, scrollAreaToVisible, scrollAreaToVisible, setAttribute, setAutomationID, setAutomationID, setCursor, setDragSource, setDropTarget, setEnabled, setFocused, setHeight, setHeightLimits, setHeightLimits, setLocation, setLocation, setMaximumHeight, setMaximumWidth, setMenuHandler, setMinimumHeight, setMinimumWidth, setName, setPreferredHeight, setPreferredSize, setPreferredSize, setPreferredWidth, setSize, setSize, setSkin, setStyleName, setStyleNames, setStyleNames, setStyles, setStyles, setTooltipDelay, setTooltipText, setTooltipWrapText, setWidth, setWidthLimits, setWidthLimits, setX, setY, toString, transferFocus, validate
-
-
-
-
Constructor Detail
-
FillPane
public FillPane()
-
FillPane
public FillPane(Orientation orientation)
-
-
Method Detail
-
getOrientation
public Orientation getOrientation()
-
setOrientation
public void setOrientation(Orientation orientation)
-
getFillPaneListeners
public ListenerList<FillPaneListener> getFillPaneListeners()
-
-