Class awt.Component
All Packages    This Package    Previous    Next

Class awt.Component

java.lang.Object
   |
   +----awt.Component

public class Component
extends Object
implements EventHandler, Layoutable
The parent class of all native GUI components.
Version:
1.15 03 Feb 1995
Author:
Arthur van Hoff, Sami Shaio

dim
If not 0, then this is the minimum dimension.
height
mapped
True when the object is mapped.
marginHeight
marginWidth
name
The symbolic name of the object.
parent
The parent of the object, this may be 0 for windows.
tidy
True when the object is tidy (layed out).
width
x
The dimensions of the object.
y

getChild(String)
Returns child by name, only valid for containers.
getPreferredSize()
Returns the natural size of the object.
handleEvent(Event)
Handle Events
layout()
Calls layout() on the component (most commonly used by container objects).
map()
Maps the object (called automatically when the parent is mapped).
minDimension()
Returns the minimum size of the object.
move(int, int)
Moves the component to a new location.
postEvent(Event)
Posting Events
reshape(int, int, int, int)
Reshapes the component.
resize(int, int)
Changes the size of the component.
setDimension(Dimension)
Sets the dimension of the component.
setDimension(int, int)
Sets the dimension of the component.
setForeground(Color)
Sets the foreground color of this component (if applicable).
unMap()
UnMaps the object (called automatically when the parent is unmapped).

parent
  public Container parent
The parent of the object, this may be 0 for windows.
name
  public String name
The symbolic name of the object. Often used for layout.
x
  public int x
The dimensions of the object.
y
  public int y
width
  public int width
height
  public int height
marginHeight
  public int marginHeight
marginWidth
  public int marginWidth
mapped
  public boolean mapped
True when the object is mapped.
tidy
  protected boolean tidy
True when the object is tidy (layed out).
dim
  protected Dimension dim
If not 0, then this is the minimum dimension.

map
  public void map()
Maps the object (called automatically when the parent is mapped). This has no effect if the parent is not mapped.

unMap

  public void unMap()
UnMaps the object (called automatically when the parent is unmapped).

reshape

  public void reshape(int pX,
                      int pY,
                      int pW,
                      int pH)
Reshapes the component. Leaves the object untidy. This means that Layout must be called to tidy it up.

move

  public void move(int pX,
                   int pY)
Moves the component to a new location.

resize

  public void resize(int pW,
                     int pH)
Changes the size of the component.

layout

  public void layout()
Calls layout() on the component (most commonly used by container objects).

getPreferredSize

  public Dimension getPreferredSize()
Returns the natural size of the object.

getChild

  public Layoutable getChild(String name)
Returns child by name, only valid for containers. Override if needed.

minDimension

  public Dimension minDimension()
Returns the minimum size of the object.

setDimension

  public void setDimension(Dimension d)
Sets the dimension of the component.

setForeground

  public void setForeground(Color c)
Sets the foreground color of this component (if applicable).

setDimension

  public void setDimension(int pW,
                           int pH)
Sets the dimension of the component.

postEvent

  public boolean postEvent(Event e)
Posting Events

handleEvent

  public boolean handleEvent(Event e)
Handle Events


All Packages    This Package    Previous    Next