org.apache.pivot.wtk
Class Display

java.lang.Object
  extended by org.apache.pivot.wtk.Component
      extended by org.apache.pivot.wtk.Container
          extended by org.apache.pivot.wtk.Display
All Implemented Interfaces:
Iterable<Component>, Sequence<Component>, ConstrainedVisual, Visual

public final class Display
extends Container

Container that serves as the root of a component hierarchy.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component
Component.ComponentDictionary, Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary
 
Nested classes/interfaces inherited from interface org.apache.pivot.collections.Sequence
Sequence.Tree
 
Constructor Summary
protected Display(ApplicationContext.DisplayHost displayHost)
           
 
Method Summary
 ApplicationContext.DisplayHost getDisplayHost()
           
 FocusTraversalPolicy getFocusTraversalPolicy()
          Returns this container's focus traversal policy.
 Point getMouseLocation()
           
 void insert(Component component, int index)
          Inserts an item into the sequence at a specific index.
 void invalidate()
          Flags the component's hierarchy as invalid, and clears any cached preferred size.
 void repaint(int x, int y, int width, int height, boolean immediate)
          Flags an area as needing to be repainted.
 void setLocation(int x, int y)
          Sets the component's location.
protected  void setParent(Container parent)
           
protected  void setSkin(Skin skin)
          Sets the skin, replacing any previous skin.
 
Methods inherited from class org.apache.pivot.wtk.Container
add, containsFocus, descendantGainedFocus, descendantLostFocus, descendantRemoved, get, getComponentAt, getContainerListeners, getContainerMouseListeners, getContextKey, getDescendantAt, getLength, indexOf, isAncestor, iterator, load, mouseClick, mouseDown, mouseMove, mouseOut, mouseUp, mouseWheel, move, paint, remove, remove, removeAll, requestFocus, setContextKey, setFocusTraversalPolicy, setTooltip, setVisible, store, transferFocus, update, validate
 
Methods inherited from class org.apache.pivot.wtk.Component
clearFocus, getAttributes, getBounds, getComponentClassListeners, getComponentDataListeners, getComponentDecoratorListeners, getComponentKeyListeners, getComponentListeners, getComponentMouseButtonListeners, getComponentMouseListeners, getComponentMouseWheelListeners, getComponents, getComponentStateListeners, getCursor, getDecoratedBounds, getDecorators, getDisplay, getDragSource, getDropTarget, getFocusedComponent, getGraphics, getHandle, getHeight, getLocation, getMaximumPreferredHeight, getMaximumPreferredWidth, getMenuHandler, getMinimumPreferredHeight, getMinimumPreferredWidth, getParent, getPreferredHeight, getPreferredHeight, getPreferredHeightLimits, getPreferredSize, getPreferredWidth, getPreferredWidth, getPreferredWidthLimits, getSize, getSkin, getStyles, getTooltipText, getUserData, getVisibleArea, getVisibleArea, getVisibleArea, getWidth, getWindow, getX, getY, installSkin, isBlocked, isEnabled, isFocusable, isFocused, isMouseOver, isOpaque, isPreferredHeightSet, isPreferredSizeSet, isPreferredWidthSet, isShowing, isValid, isVisible, keyPressed, keyReleased, keyTyped, load, mapPointFromAncestor, mapPointToAncestor, mouseOver, repaint, repaint, repaint, repaint, repaint, scrollAreaToVisible, scrollAreaToVisible, setAttributes, setCursor, setCursor, setDragSource, setDropTarget, setEnabled, setHeight, setLocation, setMaximumPreferredHeight, setMaximumPreferredWidth, setMenuHandler, setMinimumPreferredHeight, setMinimumPreferredWidth, setPreferredHeight, setPreferredHeightLimits, setPreferredHeightLimits, setPreferredSize, setPreferredSize, setPreferredWidth, setPreferredWidthLimits, setPreferredWidthLimits, setSize, setSize, setStyles, setStyles, setStyles, setTooltipText, setWidth, setX, setY, store, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Display

protected Display(ApplicationContext.DisplayHost displayHost)
Method Detail

getDisplayHost

public ApplicationContext.DisplayHost getDisplayHost()

getMouseLocation

public Point getMouseLocation()

setSkin

protected void setSkin(Skin skin)
Description copied from class: Component
Sets the skin, replacing any previous skin.

Overrides:
setSkin in class Component
Parameters:
skin - The new skin.

setParent

protected void setParent(Container parent)
Overrides:
setParent in class Container

setLocation

public void setLocation(int x,
                        int y)
Description copied from class: Component
Sets the component's location. NOTE This method should only be called when performing layout. However, since some containers do not reposition components during layout, it is valid for callers to invoke this method directly when such containers.

Overrides:
setLocation in class Component
Parameters:
x - The component's horizontal position relative to the origin of the parent container.
y - The component's vertical position relative to the origin of the parent container.

invalidate

public void invalidate()
Description copied from class: Component
Flags the component's hierarchy as invalid, and clears any cached preferred size.

Overrides:
invalidate in class Component

repaint

public void repaint(int x,
                    int y,
                    int width,
                    int height,
                    boolean immediate)
Description copied from class: Component
Flags an area as needing to be repainted.

Overrides:
repaint in class Component

insert

public void insert(Component component,
                   int index)
Description copied from interface: Sequence
Inserts an item into the sequence at a specific index.

Specified by:
insert in interface Sequence<Component>
Overrides:
insert in class Container
Parameters:
component - The item to be added to the sequence.
index - The index at which the item should be inserted. Must be a value between 0 and getLength().

getFocusTraversalPolicy

public FocusTraversalPolicy getFocusTraversalPolicy()
Description copied from class: Container
Returns this container's focus traversal policy.

Overrides:
getFocusTraversalPolicy in class Container