Class awt.DisplayItem
All Packages    This Package    Previous    Next

Class awt.DisplayItem

java.lang.Object
   |
   +----browser.Observable
           |
           +----awt.DisplayItem

public class DisplayItem
extends Observable
implements Layoutable
DisplayItem is an object that can be embedded inside a DisplayItemWindow. It is essentially a virtual window inside another window that allows painting and input handling.
See Also:
DisplayItemWindow
Version:
1.13 14 Mar 1995
Author:
Jonathan Payne

fgColor
height
parent
valid
Item is not valid if it has been resized.
width
x
y

DisplayItem()
DisplayItem(int, int, int, int)

containsPoint(int, int)
Return true if x,y are contained inside this DisplayItem.
deactivate()
Called when this item is no longer needed.
getChild(String)
getFGColor()
getPreferredSize()
gotFocus()
invalidate()
keyPressed(int)
layout()
lostFocus()
minDimension()
move(int, int)
paint(Window, int, int)
refresh()
requestUpdate()
reshape(int, int, int, int)
resize(int, int)
setColor(Color)
setParent(DisplayItemWindow)
toString()
trackEnter(Event)
Enter with mouse button already down.
trackExit(Event)
Exit with mouse button already down.
trackMotion(Event)
trackStart(Event)
trackStop(Event)
update(Window, int, int)
This is called when the display item needs updating.
validate()

parent
  public DisplayItemWindow parent
x
  public int x
y
  public int y
width
  public int width
height
  public int height
fgColor
  protected Color fgColor
valid
  protected boolean valid
Item is not valid if it has been resized.

DisplayItem
  public DisplayItem()
DisplayItem
  public DisplayItem(int x,
                     int y,
                     int width,
                     int height)

setParent
  public void setParent(DisplayItemWindow p)
getPreferredSize
  public Dimension getPreferredSize()
minDimension
  public Dimension minDimension()
layout
  public void layout()
getFGColor
  public Color getFGColor()
toString
  public String toString()
move
  public void move(int x,
                   int y)
reshape
  public void reshape(int x,
                      int y,
                      int width,
                      int height)
getChild
  public Layoutable getChild(String name)
resize
  public void resize(int w,
                     int h)
setColor
  public void setColor(Color c)
refresh
  public void refresh()
containsPoint
  public boolean containsPoint(int x,
                               int y)
Return true if x,y are contained inside this DisplayItem. By default, this method will test x,y against the bounding box for this item.

deactivate

  public void deactivate()
Called when this item is no longer needed. This is used, for example, to cancel backgroud tasks associated with animations

invalidate

  public void invalidate()
validate
  public void validate()
paint
  public void paint(Window window,
                    int x,
                    int y)
update
  public void update(Window window,
                     int x,
                     int y)
This is called when the display item needs updating. The background is not cleared, so it is possible for the display item to do incremental updating with no flashing. By default, this clears the background and calls paint.

requestUpdate

  public void requestUpdate()
trackStart
  public void trackStart(Event e)
trackMotion
  public void trackMotion(Event e)
trackStop
  public void trackStop(Event e)
trackEnter
  public void trackEnter(Event e)
Enter with mouse button already down. Only possible if sticky tracking is turned off.

trackExit

  public void trackExit(Event e)
Exit with mouse button already down. Only possible if sticky tracking is turned off.

gotFocus

  public void gotFocus()
lostFocus
  public void lostFocus()
keyPressed
  public void keyPressed(int key)

All Packages    This Package    Previous    Next