com.sibvisions.rad.ui.web.impl
Class WebContainer

java.lang.Object
  extended by com.sibvisions.rad.ui.web.impl.WebResource
      extended by com.sibvisions.rad.ui.web.impl.WebComponent
          extended by com.sibvisions.rad.ui.web.impl.WebContainer
All Implemented Interfaces:
IAlignmentConstants, IComponent, IContainer, IResource
Direct Known Subclasses:
WebCustomContainer, WebDesktopPanel, WebGroupPanel, WebMenu, WebMenuBar, WebPanel, WebPopupMenu, WebSplitPanel, WebTabsetPanel, WebToolBar, WebToolBarPanel

public abstract class WebContainer
extends WebComponent
implements IContainer

Web server implementation of IContainer.


Field Summary
protected  List<WebComponent> components
          List of subcomponents.
 
Fields inherited from class com.sibvisions.rad.ui.web.impl.WebComponent
componentId
 
Fields inherited from interface javax.rad.ui.IAlignmentConstants
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP
 
Constructor Summary
protected WebContainer()
          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, Object pConstraints)
          Adds the specified IComponent to the end of this container.
 void add(IComponent pComponent, Object pConstraints, int pIndex)
          Adds the specified IComponent to this container with the specified constraints at the specified index.
 WebComponent getComponent(int pIndex)
          Gets the nth IComponent in this container.
 int getComponentCount()
          Gets the number of IComponents in this panel.
 WebLayout getLayout()
          Gets the layout manager for this container.
 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.
 void setLayout(ILayout pLayout)
          Sets the layout manager for this container.
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.WebComponent
capture, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, finalize, getAsString, getBackground, getBounds, getChangedProperties, getComponentId, getComponentName, getConstraints, getCursor, getFactory, getFont, getForeground, getHorizontalAlignment, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getProperty, getSize, getToolTipText, getVerticalAlignment, isBackgroundSet, isChanged, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setComponentId, setConstraints, setCursor, setEnabled, setFactory, setFocusable, setFont, setForeground, setHorizontalAlignment, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setProperty, setProperty, setSize, setToolTipText, setVerticalAlignment, setVisible
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.WebResource
getNullableAsString, getResource, setAsString, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.rad.ui.IComponent
capture, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getFactory, getFont, getForeground, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFocusable, setFont, setForeground, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Field Detail

components

protected List<WebComponent> components
List of subcomponents.

Constructor Detail

WebContainer

protected WebContainer()
Creates a new instance of UIContainer.

See Also:
IContainer
Method Detail

getLayout

public WebLayout getLayout()
Gets the layout manager for this container.

Specified by:
getLayout in interface IContainer
Returns:
the ILayout
See Also:
ILayout, IContainer.setLayout(javax.rad.ui.ILayout)

setLayout

public void setLayout(ILayout pLayout)
Sets the layout manager for this container.

Specified by:
setLayout in interface IContainer
Parameters:
pLayout - the specified layout manager
See Also:
ILayout, IContainer.getLayout()

add

public void add(IComponent pComponent)
Adds the specified IComponent to the end of this container.

Specified by:
add in interface IContainer
Parameters:
pComponent - the IComponent to be added
See Also:
IComponent

add

public void add(IComponent pComponent,
                Object pConstraints)
Adds the specified 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.

Specified by:
add in interface IContainer
Parameters:
pComponent - the IComponent to be added
pConstraints - an object expressing layout contraints for this component
See Also:
IComponent

add

public void add(IComponent pComponent,
                int pIndex)
Adds the specified IComponent to this container at the specified index. Also notifies the layout manager to add the component to the this container's layout.

Specified by:
add in interface IContainer
Parameters:
pComponent - the IComponent to be added
pIndex - the position in the container's list at which to insert the IComponent; -1 means insert at the end component
See Also:
IComponent

add

public void add(IComponent pComponent,
                Object pConstraints,
                int pIndex)
Adds the specified 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.

Specified by:
add in interface IContainer
Parameters:
pComponent - the IComponent to be added
pConstraints - an object expressing layout contraints for this
pIndex - the position in the container's list at which to insert the IComponent; -1 means insert at the end component
See Also:
IComponent

remove

public void remove(int pIndex)
Removes the 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.

Specified by:
remove in interface IContainer
Parameters:
pIndex - the index of the IComponent to be removed
See Also:
IContainer.add(javax.rad.ui.IComponent), IContainer.getComponentCount()

remove

public void remove(IComponent pComponent)
Removes the specified component from this container.

Specified by:
remove in interface IContainer
Parameters:
pComponent - the IComponent to be removed
See Also:
IContainer.add(javax.rad.ui.IComponent), IContainer.remove(int)

removeAll

public void removeAll()
Removes all the components from this container. This method also notifies the layout manager to remove the components from this container's layout via the removeLayoutComponent method.

Specified by:
removeAll in interface IContainer
See Also:
IContainer.add(javax.rad.ui.IComponent), IContainer.remove(int)

getComponentCount

public int getComponentCount()
Gets the number of IComponents in this panel.

Specified by:
getComponentCount in interface IContainer
Returns:
the number of components in this panel.
See Also:
IContainer.getComponent(int)

getComponent

public WebComponent getComponent(int pIndex)
Gets the nth IComponent in this container.

Specified by:
getComponent in interface IContainer
Parameters:
pIndex - the index of the IComponent to get.
Returns:
the nth component in this container.

indexOf

public int indexOf(IComponent pComponent)
Gets the nth position of an IComponent in this container.

Specified by:
indexOf in interface IContainer
Parameters:
pComponent - the IComponent to search
Returns:
the nth position of pComponent in this container or -1 if pComponent is not added


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.