|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wings.SComponent
org.wings.SContainer
public class SContainer
Can hold several other SComponents.
SLayoutManager,
SComponent,
Serialized Form| Field Summary |
|---|
| Fields inherited from class org.wings.SComponent |
|---|
DONE_RENDERING, dynamicStyles, enabled, propertyChangeSupport, SELECTOR_ALL, START_RENDERING, visible, WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_FRAME |
| Constructor Summary | |
|---|---|
SContainer()
creates a new container with a Flowlayout as layout manager, like the Swing default. |
|
SContainer(SLayoutManager l)
creates a new container with the given layout |
|
| Method Summary | |
|---|---|
SComponent |
add(SComponent c)
Adds a component to the container with null constraint at the end of the internal list. |
SComponent |
add(SComponent c,
int index)
Adds a component to the container with null constraint at the given index. |
void |
add(SComponent c,
Object constraint)
Adds a component to the container with the given constraint at the end of the internal list. |
void |
add(SComponent c,
Object constraint,
int index)
Adds a component to the container with the given constraint at the given index. |
SComponent |
addComponent(SComponent c)
Adds a component to the container with null constraint at the end of the internal list. |
SComponent |
addComponent(SComponent c,
int index)
Adds a component to the container with the given constraint at the given index. |
SComponent |
addComponent(SComponent c,
Object constraint)
Adds a component to the container with the given constraint at the end of the internal list. |
SComponent |
addComponent(SComponent c,
Object constraint,
int index)
Adds a component to the container with the given constraint at the given index. |
void |
addContainerListener(SContainerListener l)
Adds the specified container listener to receive container events from this container. |
void |
addNotify()
Method called to notify this SComponent that it has a new parent component. |
Object |
clone()
CAVEAT this did not work yet... |
protected void |
fireContainerEvent(int type,
SComponent comp)
|
SComponent |
getComponent(int i)
returns the component at the given position |
int |
getComponentCount()
returns the number of components in this container |
protected ArrayList |
getComponentList()
|
SComponent[] |
getComponents()
|
Object |
getConstraintAt(int i)
returns the constraint for the given component position |
protected ArrayList |
getConstraintList()
|
SLayoutManager |
getLayout()
Returns the current layout |
void |
invite(ComponentVisitor visitor)
Invite a ComponentVisitor. |
void |
inviteEachComponent(ComponentVisitor visitor)
Calls the visitor on each SComponent this container has. |
protected boolean |
isShowingChildren()
Indicates if this container is actually showing it's children. |
protected void |
processContainerEvent(SContainerListener listener,
SContainerEvent e)
Processes container events occurring on this container by dispatching them to any registered ContainerListener objects. |
void |
remove(int index)
Removes the component at the given position from the container. |
void |
remove(SComponent c)
Removes the given component from the container. |
void |
removeAll()
Removes all components from the container. |
void |
removeContainerListener(SContainerListener l)
Removes the specified container listener so it no longer receives container events from this container. |
void |
removeNotify()
Method called to notify this SComponent that it has no longer a parent component. |
void |
setCG(ContainerCG cg)
|
void |
setLayout(SLayoutManager l)
Sets a new layout manager. |
protected void |
setParentFrame(SFrame f)
Sets the parent frame. |
void |
updateCG()
Notification from the CGFactory that the L&F has changed. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SContainer(SLayoutManager l)
l - the layout for this containerpublic SContainer()
| Method Detail |
|---|
public void updateCG()
SComponent
updateCG in class SComponentSComponent.updateCG()public void setLayout(SLayoutManager l)
l - new layout managerpublic SLayoutManager getLayout()
public void addContainerListener(SContainerListener l)
l - the container listenerpublic void removeContainerListener(SContainerListener l)
l - the container listener
protected void fireContainerEvent(int type,
SComponent comp)
protected void processContainerEvent(SContainerListener listener,
SContainerEvent e)
e - the container eventprotected ArrayList getComponentList()
protected ArrayList getConstraintList()
public int getComponentCount()
public SComponent getComponent(int i)
i - position
public SComponent[] getComponents()
public Object getConstraintAt(int i)
i - position
public void remove(SComponent c)
c - the component to removeremove(org.wings.SComponent)public void remove(int index)
index - remove the component at position index
from this containerpublic void removeAll()
public SComponent add(SComponent c)
c - the component to add
public void add(SComponent c,
Object constraint)
c - the component to addconstraint - the constraint for this component
public SComponent add(SComponent c,
int index)
c - the component to addindex - the index of the component
public void add(SComponent c,
Object constraint,
int index)
c - the component to addindex - the index of the componentpublic SComponent addComponent(SComponent c)
c - the component to add
public SComponent addComponent(SComponent c,
Object constraint)
c - the component to addconstraint - the constraint for this component
public SComponent addComponent(SComponent c,
int index)
c - the component to addindex - the index of the component
public SComponent addComponent(SComponent c,
Object constraint,
int index)
c - the component to addindex - the index of the component
protected void setParentFrame(SFrame f)
setParentFrame in class SComponentf - parent framepublic Object clone()
clone in class SComponentpublic void setCG(ContainerCG cg)
public void invite(ComponentVisitor visitor)
throws Exception
invite in class SComponentvisitor - the visitor to be invited
Exception
public void inviteEachComponent(ComponentVisitor visitor)
throws Exception
visitor - an implementation of the ComponentVisitor
interface.
Exceptionpublic void removeNotify()
SComponentSComponent that it has no longer a parent component.
This Method is called internal and should not be called directly, but can be overerloaded
to react on this event.
removeNotify in class SComponentpublic void addNotify()
SComponentSComponent that it has a new parent component.
This Method is called internal and should not be called directly, but can be overerloaded
to react on this event.
addNotify in class SComponentprotected boolean isShowingChildren()
true
true if getComponents() are rendered, false if i.e the container
hides them (i.e minimized MDI window).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||