All Packages Class Hierarchy This Package Previous Next Index
Class com.bulletproof.gui.Container
java.lang.Object
|
+----com.bulletproof.gui.Component
|
+----com.bulletproof.gui.Container
- public class Container
- extends Component
A generic GUI container object is a component
that can contain other GUI components.
Components added to a container are tracked in a list. The order
of the list will define the components' front-to-back stacking order
within the container. If no index is specified when adding a
component to a container, it will be added to the end of the list
(and hence to the bottom of the stacking order).
-
Container()
- Constructs a new Container.
-
Container(LayoutManager)
- Constructs a new Container with the speicified layout manager.
-
add(Component)
-
Adds the specified component to this container.
-
add(String, Component)
- Adds the specified component to this container.
-
doLayout()
-
Does a layout on this Container.
-
findComponentAt(int, int)
-
Find the component at the specified x and y position
-
getComponent(int)
-
Get the specific component
-
getComponentCount()
-
Get the specific component
-
getLayout()
-
Gets the layout manager for this container.
-
getMinimumSize()
-
Returns the minimum size of this container.
-
paint(Graphics)
-
Paints the container.
-
processMouseEvent(MouseEvent)
- This method attempts to distribute a mouse event to a lightweight
component.
-
remove(Component)
-
Removes the component at the specified index from this container.
-
removeAll()
-
Paints the components in this container.
-
setLayout(LayoutManager)
-
Sets the layout manager for this container.
-
setMasterDrawRegion(Rectangle)
-
Set the master drawing region for this container and it's children.
-
validate()
-
Validates this Container and all of the components contained
within it.
Container
public Container()
- Constructs a new Container. Containers can be extended directly,
but are lightweight in this case and must be contained by a parent
somewhere higher up in the component tree that is native.
(such as Frame for example).
Container
public Container(LayoutManager layoutManager)
- Constructs a new Container with the speicified layout manager. Containers can be extended directly,
but are lightweight in this case and must be contained by a parent
somewhere higher up in the component tree that is native.
(such as Frame for example).
- Parameters:
- layoutManager - the desired layout manager for this container
add
public Component add(Component component)
- Adds the specified component to this container.
- Parameters:
- comp - the component to be added
add
public Component add(String where,
Component c)
- Adds the specified component to this container.
- Parameters:
- where - the position where the component is to be added
- comp - the component to be added
doLayout
public void doLayout()
- Does a layout on this Container. Most programs should not call
this directly, but should invoke validate instead.
- Overrides:
- doLayout in class Component
- See Also:
- setLayout, validate
getComponentCount
public int getComponentCount()
- Get the specific component
getComponent
public Component getComponent(int comp)
- Get the specific component
findComponentAt
public Component findComponentAt(int x,
int y)
- Find the component at the specified x and y position
getMinimumSize
public Dimension getMinimumSize()
- Returns the minimum size of this container.
- Overrides:
- getMinimumSize in class Component
getLayout
public LayoutManager getLayout()
- Gets the layout manager for this container.
- See Also:
- doLayout, setLayout
paint
public void paint(Graphics g)
- Paints the container. This forwards the paint to any lightweight components
that are children of this container.
- Parameters:
- g - the specified Graphics window
- Overrides:
- paint in class Component
processMouseEvent
public void processMouseEvent(MouseEvent me)
- This method attempts to distribute a mouse event to a lightweight
component. It tries to avoid doing any unnecessary probes down
into the component tree to minimize the overhead of determining
where to route the event, since mouse movement events tend to
come in large and frequent amounts.
- Overrides:
- processMouseEvent in class Component
removeAll
public void removeAll()
- Paints the components in this container.
- Parameters:
- g - the specified Graphics window
remove
public void remove(Component c)
- Removes the component at the specified index from this container.
- Parameters:
- index - the index of the component to be removed
- See Also:
- add
setLayout
public void setLayout(LayoutManager mgr)
- Sets the layout manager for this container.
- Parameters:
- mgr - the specified layout manager
- See Also:
- doLayout, getLayout
validate
public void validate()
- Validates this Container and all of the components contained
within it.
- Overrides:
- validate in class Component
- See Also:
- validate, invalidate
setMasterDrawRegion
public void setMasterDrawRegion(Rectangle region)
- Set the master drawing region for this container and it's children.
- Parameters:
- region - the specified master drawing region
- Overrides:
- setMasterDrawRegion in class Component
All Packages Class Hierarchy This Package Previous Next Index