|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
A special component that can contain other components.
| Constructor Summary | |
Container()
Creates a new container with a default flow layout. |
|
Container(LayoutManager layoutManager)
Creates a new container with the given layoutManager. |
|
| Method Summary | |
Component |
add(Component c)
Adds the given component to this container. |
void |
add(Component c,
java.lang.Object where)
Adds the given component with the given constraints to this container |
Component |
add(java.lang.String where,
Component c)
Adds the givn component at the given position. |
void |
addImpl(Component c,
java.lang.Object constraints,
int index)
This add method encapsulates the real implementation and is called by all other add methods. |
void |
doLayout()
Forces new layout of this container. |
Component |
findComponentAt(int px,
int py)
returns the component at the given position. |
Component |
getComponent(int i)
Returns the component at the given index. |
int |
getComponentCount()
Returns the number of child components in this container. |
Component[] |
getComponents()
Returns a Component array containing all child components of this container. |
Insets |
getInsets()
|
LayoutManager |
getLayout()
Returns the LayoutManger assigned to this Container. |
Dimension |
getMinimumSize()
Returns the minimum size of this container, depending on the current layout manager. |
boolean |
isAncestorOf(Component c)
returns if this container contains the given component or any container containing the given component. |
boolean |
isFocusTraversable()
Returns false |
void |
paintAll(Graphics g)
Paints this component and all child components. |
void |
paintComponents(Graphics g)
Paints all child components. |
void |
remove(Component c)
Removes the given component from this container. |
void |
remove(int i)
Removes the component at the given index from this container. |
void |
removeAll()
Removes all components from this container. |
void |
setLayout(LayoutManager mgr)
Sets the given layout manager. |
void |
update(Graphics g)
This method clears the background using the current background color and calls paintAll. |
void |
validate()
Calls doLayout if the current layout is not valid. (inValidate has been called before). |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Container()
public Container(LayoutManager layoutManager)
| Method Detail |
public Component add(Component c)
public Component add(java.lang.String where,
Component c)
public void add(Component c,
java.lang.Object where)
public void addImpl(Component c,
java.lang.Object constraints,
int index)
public Component findComponentAt(int px,
int py)
findComponentAt in class Componentpublic Component getComponent(int i)
public int getComponentCount()
public Component[] getComponents()
public Insets getInsets()
public Dimension getMinimumSize()
getMinimumSize in class Componentpublic boolean isFocusTraversable()
isFocusTraversable in class Componentpublic boolean isAncestorOf(Component c)
public LayoutManager getLayout()
public void paintAll(Graphics g)
paintAll in class Componentpublic void paintComponents(Graphics g)
public void removeAll()
public void remove(int i)
public void remove(Component c)
public void setLayout(LayoutManager mgr)
public void update(Graphics g)
update in class Componentpublic void doLayout()
public void validate()
validate in class Component
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||