|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.rad.genui.UIResource<C>
javax.rad.genui.UIComponent<C>
javax.rad.genui.UIContainer<C>
C - instance of IContainerpublic abstract class UIContainer<C extends IContainer>
Platform and technology independent Container. It is designed for use with AWT, Swing, SWT, JSP, JSF,... .
| Field Summary | |
|---|---|
protected java.util.List<UIComponent<?>> |
allComponents
List of subcomponents. |
protected java.util.List<UIComponent<?>> |
components
List of subcomponents. |
| Fields inherited from class javax.rad.genui.UIComponent |
|---|
bTranslate, lLastTranslationModified, parent, popupMenu |
| Fields inherited from class javax.rad.genui.UIResource |
|---|
uiResource |
| Constructor Summary | |
|---|---|
protected |
UIContainer(C pContainer)
Creates a new instance of UIContainer. |
| Method Summary | |
|---|---|
void |
add(IComponent pComponent)
Adds the specified IComponent to the end of this container. |
void |
add(IComponent pComponent,
int pIndex)
Adds the specified IComponent to this container at the specified index. |
void |
add(IComponent pComponent,
java.lang.Object pConstraints)
Adds the specified IComponent to the end of this container. |
void |
add(IComponent pComponent,
java.lang.Object pConstraints,
int pIndex)
Adds the specified IComponent to this container with the specified
constraints at the specified index. |
protected void |
addInternal(IContainer pParentUIResource,
int pParentUIResourceIndex,
UIComponent pComponent,
java.lang.Object pConstraints,
int pIndex)
Internal components are stored in a separate list to ensure translation works also for this components. |
void |
addNotify()
Makes this UIComponent displayable by adding it to an UIContainer. |
void |
beforeAddNotify(IComponent pParent)
Invoked before this component is added. |
protected void |
checkAdd(IComponent pComponent,
java.lang.Object pConstraints,
int pIndex)
Checks if it's allowed to add a specific component to this container. |
protected boolean |
contains(UIComponent<?> pComponent)
Gets true, if the allComponents contains the given component. |
UIComponent<?> |
getComponent(int pIndex)
Gets the nth IComponent in this container. |
int |
getComponentCount()
Gets the number of IComponents in this panel. |
IComponent[] |
getComponents()
Gets the added IComponents as array. |
IInsets |
getInsets()
Gets the insets due to different componentUIResource and uiResource. |
ILayout |
getLayout()
Gets the layout manager for this container. |
protected UIContainer<C> |
getUIResourceContainer()
Gets a new UIResource. |
int |
indexOf(IComponent pComponent)
Gets the nth position of an IComponent in this container. |
void |
remove(IComponent pComponent)
Removes the specified component from this container. |
void |
remove(int pIndex)
Removes the IComponent, specified by index,
from this container. |
void |
removeAll()
Removes all the components from this container. |
protected void |
removeInternal(UIComponent pComponent)
Internal components are stored in a separate list to ensure translation works also for this components. |
void |
removeNotify()
Makes this UIComponent undisplayable by removing it to an UIContainer. |
void |
setLayout(ILayout pLayout)
Sets the layout manager for this container. |
protected void |
setUIResourceContainer(UIContainer<C> pUIResourceContainer)
Sets a new UIResource. |
void |
setZOrder(UIComponent pComponent,
int pZOrder)
Sets the order of the given component. |
void |
updateTranslation()
Notification for updating the translation. |
| Methods inherited from class javax.rad.genui.UIResource |
|---|
eventResourceChanged, eventResourceChanged, fireResourceChanged, getObject, getObjectNames, getUIResource, hasResourceHandler, putObject, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.rad.ui.IResource |
|---|
getResource |
| Field Detail |
|---|
protected java.util.List<UIComponent<?>> components
protected java.util.List<UIComponent<?>> allComponents
| Constructor Detail |
|---|
protected UIContainer(C pContainer)
UIContainer.
pContainer - the Container.IContainer| Method Detail |
|---|
public ILayout getLayout()
getLayout in interface IContainerILayoutILayout,
IContainer.setLayout(javax.rad.ui.ILayout)public void setLayout(ILayout pLayout)
setLayout in interface IContainerpLayout - the specified layout managerILayout,
IContainer.getLayout()public void add(IComponent pComponent)
IComponent to the end of this container.
add in interface IContainerpComponent - the IComponent to be addedIComponent
public void add(IComponent pComponent,
java.lang.Object pConstraints)
IComponent to the end of this container.
Also notifies the layout manager to add the component to
this container's layout using the specified constraints object.
add in interface IContainerpComponent - the IComponent to be addedpConstraints - an object expressing
layout contraints for this componentIComponent
public void add(IComponent pComponent,
int pIndex)
IComponent to this container at the specified index. Also notifies the layout
manager to add the component to the this container's layout.
add in interface IContainerpComponent - the IComponent to be addedpIndex - the position in the container's list at which to insert
the IComponent; -1 means insert at the end
componentIComponent
public void add(IComponent pComponent,
java.lang.Object pConstraints,
int pIndex)
IComponent to this container with the specified
constraints at the specified index. Also notifies the layout
manager to add the component to the this container's layout using
the specified constraints object.
add in interface IContainerpComponent - the IComponent to be addedpConstraints - an object expressing layout contraints for thispIndex - the position in the container's list at which to insert
the IComponent; -1 means insert at the end
componentIComponentpublic void remove(int pIndex)
IComponent, specified by index,
from this container.
This method also notifies the layout manager to remove the
component from this container's layout via the
removeLayoutComponent method.
remove in interface IContainerpIndex - the index of the IComponent to be removedIContainer.add(javax.rad.ui.IComponent),
IContainer.getComponentCount()public void remove(IComponent pComponent)
remove in interface IContainerpComponent - the IComponent to be removedIContainer.add(javax.rad.ui.IComponent),
IContainer.remove(int)public void removeAll()
removeLayoutComponent method.
removeAll in interface IContainerIContainer.add(javax.rad.ui.IComponent),
IContainer.remove(int)public int getComponentCount()
IComponents in this panel.
getComponentCount in interface IContainerIContainer.getComponent(int)public UIComponent<?> getComponent(int pIndex)
IComponent in this container.
getComponent in interface IContainerpIndex - the index of the IComponent to get.
public int indexOf(IComponent pComponent)
IComponent in this container.
indexOf in interface IContainerpComponent - the IComponent to search
pComponent in this container or
-1 if pComponent is not addedpublic void updateTranslation()
UIComponent will be added to a displayable containment hierarchy,
when its containment hierarchy is made displayable or the translation table will
be changed.
updateTranslation in class UIComponent<C extends IContainer>UIComponent.setTranslation(TranslationMap),
UIComponent.addNotify()public void beforeAddNotify(IComponent pParent)
beforeAddNotify in class UIComponent<C extends IContainer>pParent - the parentpublic void addNotify()
UIComponent displayable by adding it to an UIContainer.
This method is called internally by the genui and should not be called directly.
addNotify in class UIComponent<C extends IContainer>UIComponent.removeNotify(),
UIComponent.isNotified()public void removeNotify()
UIComponent undisplayable by removing it to an UIContainer.
This method is called by the genui internally and should not be called directly.
Code overriding this method should call super.removeNotify as the first line
of the overriding method.
removeNotify in class UIComponent<C extends IContainer>UIComponent.addNotify(),
UIComponent.isNotified()public IInsets getInsets()
public IComponent[] getComponents()
IComponents as array.
The returned array is a copy, changing the array will have no effect
on the UIContainer. The returned array might be empty, but never
null.
IComponents as array.protected UIContainer<C> getUIResourceContainer()
protected void setUIResourceContainer(UIContainer<C> pUIResourceContainer)
pUIResourceContainer - the new ui resource.protected boolean contains(UIComponent<?> pComponent)
pComponent - the component to check.
protected void checkAdd(IComponent pComponent,
java.lang.Object pConstraints,
int pIndex)
pComponent - the component to be addedpConstraints - an object expressing layout constraintspIndex - the position in the container's list at which to insert the IComponent; -1 means insert at the end component
protected void addInternal(IContainer pParentUIResource,
int pParentUIResourceIndex,
UIComponent pComponent,
java.lang.Object pConstraints,
int pIndex)
pParentUIResource - the parent ui resource where to add the componentpParentUIResourceIndex - the index where to add the component.getUIResource inside the parent ui resourcepComponent - the component to addpConstraints - the constraintspIndex - the index where the component is added to this container.protected void removeInternal(UIComponent pComponent)
pComponent - the component to add
public void setZOrder(UIComponent pComponent,
int pZOrder)
pComponent - the componentpZOrder - the zOrder.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||