com.sibvisions.rad.ui.web.impl.container
Class WebToolBarPanel

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
              extended by com.sibvisions.rad.ui.web.impl.container.WebToolBarPanel
All Implemented Interfaces:
IToolBarPanel, IAlignmentConstants, IComponent, IContainer, IResource
Direct Known Subclasses:
AbstractWebWindow

public class WebToolBarPanel
extends WebContainer
implements IToolBarPanel

Web server implementation of IToolBarPanel.


Field Summary
protected  WebToolBar toolBarPanel
          The tool bar panel.
 
Fields inherited from class com.sibvisions.rad.ui.web.impl.WebContainer
components
 
Fields inherited from class com.sibvisions.rad.ui.web.impl.WebComponent
componentId
 
Fields inherited from interface javax.rad.ui.container.IToolBarPanel
AREA_BOTTOM, AREA_LEFT, AREA_RIGHT, AREA_TOP
 
Fields inherited from interface javax.rad.ui.IAlignmentConstants
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP
 
Constructor Summary
WebToolBarPanel()
          Creates a new instance of WebToolBarPanel.
 
Method Summary
 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.
protected  void addPanelIntern(WebContainer pWebContainer, Object pConstraints)
          Adds the tool bar panel.
 void addToolBar(IToolBar pToolBar)
          Adds a toolbar to this panel as last component.
 void addToolBar(IToolBar pToolBar, int pIndex)
          Adds a toolbar to this panel at a specified index.
 WebToolBar getToolBar(int pIndex)
          Gets the IToolBar from a specific index.
 int getToolBarArea()
          Gets the area where the toolbar(s) are added.
 int getToolBarCount()
          Gets the number of IToolBars in this panel.
 int indexOfToolBar(IToolBar pToolBar)
          Gets the nth position of an IToolBar in this panel.
 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.
 void removeAllToolBars()
          Removes all toolbars from this panel.
protected  void removePanelIntern(WebContainer pWebContainer)
          Removes the tool bar panel.
 void removeToolBar(int pIndex)
          Removes a toolbar from this panel.
 void removeToolBar(IToolBar pToolBar)
          Removes a toolbar from this panel.
 void setLayout(ILayout pLayout)
          Sets the layout manager for this container.
 void setToolBarArea(int pToolBarArea)
          Sets the display area where the toolbars will be added.
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.WebContainer
add, add, add, getComponent, getComponentCount, getLayout, indexOf, remove, removeAll
 
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.IContainer
add, add, add, getComponent, getComponentCount, getLayout, indexOf, remove, removeAll
 
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

toolBarPanel

protected WebToolBar toolBarPanel
The tool bar panel.

Constructor Detail

WebToolBarPanel

public WebToolBarPanel()
Creates a new instance of WebToolBarPanel.

See Also:
IToolBarPanel
Method Detail

setLayout

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

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

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
Overrides:
add in class WebContainer
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
Overrides:
remove in class WebContainer
Parameters:
pIndex - the index of the IComponent to be removed
See Also:
IContainer.add(javax.rad.ui.IComponent), IContainer.getComponentCount()

addPanelIntern

protected void addPanelIntern(WebContainer pWebContainer,
                              Object pConstraints)
Adds the tool bar panel.

Parameters:
pWebContainer - the tool bar panel.
pConstraints - the constraints.

removePanelIntern

protected void removePanelIntern(WebContainer pWebContainer)
Removes the tool bar panel.

Parameters:
pWebContainer - the tool bar panel.

addToolBar

public void addToolBar(IToolBar pToolBar)
Adds a toolbar to this panel as last component.

Specified by:
addToolBar in interface IToolBarPanel
Parameters:
pToolBar - the toolbar to be added

addToolBar

public void addToolBar(IToolBar pToolBar,
                       int pIndex)
Adds a toolbar to this panel at a specified index.

Specified by:
addToolBar in interface IToolBarPanel
Parameters:
pToolBar - the toolbar to be added
pIndex - the index for the toolbar

removeToolBar

public void removeToolBar(int pIndex)
Removes a toolbar from this panel.

Specified by:
removeToolBar in interface IToolBarPanel
Parameters:
pIndex - the index

removeToolBar

public void removeToolBar(IToolBar pToolBar)
Removes a toolbar from this panel.

Specified by:
removeToolBar in interface IToolBarPanel
Parameters:
pToolBar - the toolbar

removeAllToolBars

public void removeAllToolBars()
Removes all toolbars from this panel.

Specified by:
removeAllToolBars in interface IToolBarPanel

getToolBarCount

public int getToolBarCount()
Gets the number of IToolBars in this panel.

Specified by:
getToolBarCount in interface IToolBarPanel
Returns:
the number of toolbars

getToolBar

public WebToolBar getToolBar(int pIndex)
Gets the IToolBar from a specific index.

Specified by:
getToolBar in interface IToolBarPanel
Parameters:
pIndex - the index
Returns:
the toolbar at pIndex

indexOfToolBar

public int indexOfToolBar(IToolBar pToolBar)
Gets the nth position of an IToolBar in this panel.

Specified by:
indexOfToolBar in interface IToolBarPanel
Parameters:
pToolBar - the IToolBar to search
Returns:
the nth position of pToolBar in this panel or -1 if pToolBar is not added

setToolBarArea

public void setToolBarArea(int pToolBarArea)
Sets the display area where the toolbars will be added.

Specified by:
setToolBarArea in interface IToolBarPanel
Parameters:
pToolBarArea - an area constant IToolBarPanel.AREA_TOP, IToolBarPanel.AREA_LEFT, IToolBarPanel.AREA_BOTTOM, IToolBarPanel.AREA_RIGHT

getToolBarArea

public int getToolBarArea()
Gets the area where the toolbar(s) are added.

Specified by:
getToolBarArea in interface IToolBarPanel
Returns:
an area constant IToolBarPanel.AREA_TOP, IToolBarPanel.AREA_LEFT, IToolBarPanel.AREA_BOTTOM, IToolBarPanel.AREA_RIGHT


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.