|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container
A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
Field Summary |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Method Summary | |
Component |
add(Component comp)
Adds the specified component to this container. |
Component |
add(Component comp,
int pos)
Adds the specified component to this container at the given position. |
Component |
add(String name,
Component comp)
Adds the specified component to this container. |
void |
addNotify()
Notifies the container to create a peer. |
int |
countComponents()
Returns the number of components in this panel. |
void |
deliverEvent(Event e)
Delivers an event. |
Component |
getComponent(int n)
Gets the nth component in this container. |
Component[] |
getComponents()
Gets all the components in this container. |
LayoutManager |
getLayout()
Gets the layout manager for this container. |
Insets |
insets()
Returns the insets of the container. |
void |
layout()
Does a layout on this Container. |
void |
list(PrintStream out,
int indent)
Prints out a list, starting at the specified indention, to the specified out stream. |
Component |
locate(int x,
int y)
Locates the component that contains the x,y position. |
Dimension |
minimumSize()
Returns the minimum size of this container. |
void |
paintComponents(Graphics g)
Paints the components in this container. |
protected String |
paramString()
Returns the parameter String of this Container. |
Dimension |
preferredSize()
Returns the preferred size of this container. |
void |
printComponents(Graphics g)
Prints the components in this container. |
void |
remove(Component comp)
Removes the specified component from this container. |
void |
removeAll()
Removes all the components from this container. |
void |
removeNotify()
Notifies the container to remove its peer. |
void |
setLayout(LayoutManager mgr)
Sets the layout manager for this container. |
void |
validate()
Validates this Container and all of the components contained within it. |
Methods inherited from class java.awt.Component |
action, bounds, checkImage, checkImage, createImage, createImage, disable, enable, enable, getBackground, getColorModel, getFont, getFontMetrics, getForeground, getGraphics, getParent, getPeer, getToolkit, gotFocus, handleEvent, hide, imageUpdate, inside, invalidate, isEnabled, isShowing, isValid, isVisible, keyDown, keyUp, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, prepareImage, prepareImage, print, printAll, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setFont, setForeground, show, show, size, toString, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public int countComponents()
getComponent(int)
public Component getComponent(int n)
n
- the number of the component to get
ArrayIndexOutOfBoundsException
- If the nth value does not
exist.public Component[] getComponents()
public Insets insets()
LayoutManager
public Component add(Component comp)
comp
- the component to be addedpublic Component add(Component comp, int pos)
comp
- the component to be addedpos
- the position at which to insert the component. -1
means insert at the end.remove(java.awt.Component)
public Component add(String name, Component comp)
name
- the component namecomp
- the component to be addedremove(java.awt.Component)
,
LayoutManager
public void remove(Component comp)
comp
- the component to be removedadd(java.awt.Component)
public void removeAll()
add(java.awt.Component)
,
remove(java.awt.Component)
public LayoutManager getLayout()
layout()
,
setLayout(java.awt.LayoutManager)
public void setLayout(LayoutManager mgr)
mgr
- the specified layout managerlayout()
,
getLayout()
public void layout()
layout
in class Component
setLayout(java.awt.LayoutManager)
public void validate()
validate
in class Component
validate()
,
Component.invalidate()
public Dimension preferredSize()
preferredSize
in class Component
minimumSize()
public Dimension minimumSize()
minimumSize
in class Component
preferredSize()
public void paintComponents(Graphics g)
g
- the specified Graphics windowComponent.paint(java.awt.Graphics)
,
Component.paintAll(java.awt.Graphics)
public void printComponents(Graphics g)
g
- the specified Graphics windowComponent.print(java.awt.Graphics)
,
Component.printAll(java.awt.Graphics)
public void deliverEvent(Event e)
deliverEvent
in class Component
e
- the eventComponent.handleEvent(java.awt.Event)
,
Component.postEvent(java.awt.Event)
public Component locate(int x, int y)
locate
in class Component
x
- the x coordinatey
- the y coordinate
Component.inside(int, int)
public void addNotify()
addNotify
in class Component
removeNotify()
public void removeNotify()
removeNotify
in class Component
addNotify()
protected String paramString()
paramString
in class Component
public void list(PrintStream out, int indent)
list
in class Component
out
- the Stream nameindent
- the start of the list
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |