pivot.wtk
Class Display

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

public final class Display
extends Container

Container that serves as the root of a component hierarchy.

Author:
gbrown

Nested Class Summary
 
Nested classes/interfaces inherited from class pivot.wtk.Component
Component.Attributes, Component.ComponentDictionary, Component.DecoratorSequence, Component.StyleDictionary
 
Nested classes/interfaces inherited from interface pivot.collections.Sequence
Sequence.Search, Sequence.Sort, Sequence.Tree
 
Constructor Summary
protected Display(ApplicationContext.DisplayHost displayHost)
           
 
Method Summary
 ApplicationContext.DisplayHost getDisplayHost()
           
 Point getMouseLocation()
           
 void insert(Component component, int index)
          Inserts an item into the sequence at a specific index.
 void invalidate()
          Notifies the component's parent that it needs to re-layout.
 void paint(java.awt.Graphics2D graphics)
          Paints the component.
 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 pivot.wtk.Container
add, containsFocus, get, getComponentAt, getContainerListeners, getContainerMouseListeners, getContextKey, getDescendantAt, getFocusTraversalPolicy, getLength, indexOf, isAncestor, isFocusable, isValid, iterator, load, load, mouseClick, mouseDown, mouseMove, mouseOut, mouseUp, mouseWheel, move, remove, remove, removeAll, requestFocus, setContextKey, setEnabled, setFocusTraversalPolicy, setTooltip, setVisible, store, store, update, validate
 
Methods inherited from class pivot.wtk.Component
clearFocus, clearFocus, finalize, getAttributes, getBounds, getComponentClassListeners, getComponentDataListeners, getComponentDecoratorListeners, getComponentDragDropListeners, getComponentKeyListeners, getComponentLayoutListeners, getComponentListeners, getComponentMouseButtonListeners, getComponentMouseListeners, getComponentMouseWheelListeners, getComponents, getComponentStateListeners, getCursor, getDecoratedBounds, getDecorators, getDisplay, getDragSource, getDropTarget, getFocusedComponent, getHandle, getHeight, getLocation, getParent, getPreferredHeight, getPreferredHeight, getPreferredSize, getPreferredWidth, getPreferredWidth, getSize, getSkin, getStyles, getTooltipText, getUserData, getVisibleArea, getVisibleArea, getVisibleArea, getWidth, getWindow, getX, getY, installSkin, isBlocked, isDisplayable, isEnabled, isFocused, isMouseOver, isPreferredHeightSet, isPreferredSizeSet, isPreferredWidthSet, isShowing, isVisible, keyPressed, keyReleased, keyTyped, mapPointFromAncestor, mapPointToAncestor, mouseOver, repaint, repaint, repaint, repaint, repaint, requestFocus, scrollAreaToVisible, scrollAreaToVisible, setAttributes, setCursor, setCursor, setDisplayable, setDragSource, setDropTarget, setFocused, setLocation, setPreferredHeight, setPreferredSize, setPreferredSize, setPreferredWidth, setSize, setSize, setStyles, setStyles, setStyles, setTooltipText, setUserData, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, 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
Notifies the component's parent that it needs to re-layout.

Overrides:
invalidate in class Container

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

paint

public void paint(java.awt.Graphics2D graphics)
Description copied from class: Component
Paints the component. Delegates to the skin.

Specified by:
paint in interface Visual
Overrides:
paint in class Container
Parameters:
graphics - The graphics context in which to paint the visual.

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().