org.zaval.lw
Interface LwContainer
- All Superinterfaces:
- Layoutable, LayoutContainer, LwComponent, Validationable
- All Known Subinterfaces:
- LwComposite, LwDesktop, LwLayer
- All Known Implementing Classes:
- LwPanel
- public interface LwContainer
- extends LwComponent, LayoutContainer
This interface defines light weight container that inherits the LwComponent interface and
can contain other light weight components as child components.
The interface inherits LayoutContainer interface so it is possible to use a layout manager
to layout its child components.
|
Method Summary |
void |
add(LwComponent c)
Adds the specified lightweight component as a child of this container.
|
void |
add(java.lang.Object s,
LwComponent c)
Adds the specified lightweight component with the specified constraints as a child
of this container. |
LwLayout |
getLwLayout()
Gets a layout manager for this container. |
int |
indexOf(LwComponent c)
Searches the specified component among this container children and returns
an index of the component in the child list. |
void |
insert(int i,
java.lang.Object s,
LwComponent c)
Inserts the specified lightweight component with the specified constraints as a child
of this container at the specified position in the container list. |
boolean |
isInvalidatedByChild(LwComponent c)
Invoked by a child component whenever the child invalidates itself. |
void |
paintOnTop(java.awt.Graphics g)
Paints additional elements (for example marker) after the container and its child components
have been rendered. |
void |
remove(int i)
Removes the component, specified by the index, from this container.
|
void |
removeAll()
Removes all child components from this container.
|
void |
setLwLayout(LwLayout m)
Sets the layout manager for this container. |
| Methods inherited from interface org.zaval.lw.LwComponent |
canHaveFocus, getBackground, getLwComponentAt, getLwParent, getOrigin, getViewMan, getVisiblePart, isEnabled, isOpaque, paint, repaint, repaint, repaint, setBackground, setEnabled, setInsets, setLwParent, setOpaque, setViewMan, setVisible, update |
| Methods inherited from interface org.zaval.lw.Layoutable |
getBounds, getHeight, getInsets, getLocation, getPreferredSize, getSize, getWidth, getX, getY, isVisible, setLocation, setSize |
add
public void add(LwComponent c)
- Adds the specified lightweight component as a child of this container.
The method should call the
componentAdded method its layout manager to inform
the layout manager that the new child has been added.
- Parameters:
c - the lightweight component to be added.
add
public void add(java.lang.Object s,
LwComponent c)
- Adds the specified lightweight component with the specified constraints as a child
of this container. The method should call the
componentAdded method its
layout manager to inform the layout manager that the new child has been added.
- Parameters:
s - the object expressing layout constraints for this.c - the lightweight component to be added.
insert
public void insert(int i,
java.lang.Object s,
LwComponent c)
- Inserts the specified lightweight component with the specified constraints as a child
of this container at the specified position in the container list. The method should call
the
componentAdded method its layout manager to inform the layout manager
that the new child has been added with the given constraints.
- Parameters:
i - the position in the container list at which to insert
the component.s - the object expressing layout constraints for this.c - the lightweight component to be added.
remove
public void remove(int i)
- Removes the component, specified by the index, from this container.
The layout manager of this container should be informed by calling
the
componentRemoved method of the manager.
- Parameters:
i - the index of the component to be removed.
removeAll
public void removeAll()
- Removes all child components from this container.
The layout manager of this container should be informed by calling
the
componentRemoved method of the manager for every child component
that has been removed.
indexOf
public int indexOf(LwComponent c)
- Searches the specified component among this container children and returns
an index of the component in the child list. If the component has not been found
than the method returns
-1.
- Parameters:
c - the component to get index.- Returns:
- a child component index inside the container children list.
setLwLayout
public void setLwLayout(LwLayout m)
- Sets the layout manager for this container.
- Parameters:
m - the specified layout manager.
getLwLayout
public LwLayout getLwLayout()
- Gets a layout manager for this container.
- Returns:
- a layout manager.
paintOnTop
public void paintOnTop(java.awt.Graphics g)
- Paints additional elements (for example marker) after the container and its child components
have been rendered.
- Parameters:
g - the graphics context.
isInvalidatedByChild
public boolean isInvalidatedByChild(LwComponent c)
- Invoked by a child component whenever the child invalidates itself. Usually a child component
invalidate its parent. The method provides ability to control container invalidation by the
specified child component. The child asks the container if it should be invalidated by the
calling the method.
- Parameters:
c - the child component that wants to invalidate the container.- Returns:
true if the container should be invalidated by the child component;
false otherwise.
|