javax.rad.genui.container
Class UIToolBarPanel

java.lang.Object
  extended by javax.rad.genui.UIResource<C>
      extended by javax.rad.genui.UIComponent<C>
          extended by javax.rad.genui.UIContainer<IToolBarPanel>
              extended by javax.rad.genui.container.UIToolBarPanel
All Implemented Interfaces:
ITranslatable, IToolBarPanel, IComponent, IContainer, IResource, INamedObject

public class UIToolBarPanel
extends UIContainer<IToolBarPanel>
implements IToolBarPanel

Platform and technology independent toolbar panel. It is designed for use with AWT, Swing, SWT, JSP, JSF,... .


Field Summary
 
Fields inherited from class javax.rad.genui.UIContainer
components
 
Fields inherited from class javax.rad.genui.UIComponent
lLastTranslationModified, parent
 
Fields inherited from class javax.rad.genui.UIResource
uiResource
 
Fields inherited from interface javax.rad.ui.container.IToolBarPanel
AREA_BOTTOM, AREA_LEFT, AREA_RIGHT, AREA_TOP
 
Constructor Summary
  UIToolBarPanel()
          Creates a new instance of UIToolBarPanel.
protected UIToolBarPanel(IToolBarPanel pPanel)
          Creates a new instance of UIToolBarPanel with the given toolbar panel.
 
Method Summary
 void addNotify()
          Makes this UIComponent displayable by adding it to an UIContainer.
 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.
 void beforeAddNotify(IComponent pParent)
          Invoked before this component is added.
 IToolBar 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.
 boolean isToolBarMovable()
          Gets whether the toolbars are movable.
 void removeAllToolBars()
          Removes all toolbars from this panel.
 void removeNotify()
          Makes this UIComponent undisplayable by removing it to an UIContainer.
 void removeToolBar(int pIndex)
          Removes a toolbar from this panel.
 void removeToolBar(IToolBar pToolBar)
          Removes a toolbar from this panel.
 void setToolBarArea(int pArea)
          Sets the display area where the toolbars will be added.
 void setToolBarMovable(boolean pMovable)
          Sets all toolbars movable or fixed.
 void updateTranslation()
          Notification for updating the translation.
 
Methods inherited from class javax.rad.genui.UIContainer
add, add, add, add, checkAdd, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout, setZOrder
 
Methods inherited from class javax.rad.genui.UIComponent
capture, createCellFormatter, createNodeFormatter, debug, error, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getComponentUIResource, getCurrentTranslation, getCursor, getEventSource, getFactory, getFont, getForeground, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getResource, getSize, getToolTipText, getTranslation, info, invokeAndWait, invokeAndWait, invokeInThread, invokeInThread, invokeLater, invokeLater, isBackgroundSet, isBeforeNotified, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isNotified, isPreferredSizeSet, isTranslationChanged, isTranslationEnabled, isVisible, requestFocus, setBackground, setBounds, setBounds, setCursor, setEnabled, setEventSource, setFocusable, setFont, setForeground, setLocation, setLocation, setLocationRelativeTo, setMaximumSize, setMaximumSize, setMinimumSize, setMinimumSize, setName, setParent, setPreferredSize, setPreferredSize, setSize, setSize, setToolTipText, setTranslation, setTranslationEnabled, setVisible, translate
 
Methods inherited from class javax.rad.genui.UIResource
equals, getUIResource, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.rad.ui.IContainer
add, add, add, add, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout
 
Methods inherited from interface javax.rad.ui.IComponent
capture, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getEventSource, getFactory, getFont, getForeground, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setEventSource, setFocusable, setFont, setForeground, setLocation, setLocationRelativeTo, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Constructor Detail

UIToolBarPanel

public UIToolBarPanel()
Creates a new instance of UIToolBarPanel.

See Also:
IToolBarPanel

UIToolBarPanel

protected UIToolBarPanel(IToolBarPanel pPanel)
Creates a new instance of UIToolBarPanel with the given toolbar panel.

Parameters:
pPanel - the toolbar panel
See Also:
IToolBarPanel
Method Detail

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(IToolBar pToolBar)
Removes a toolbar from this panel.

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

removeToolBar

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

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

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 IToolBar 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 pArea)
Sets the display area where the toolbars will be added.

Specified by:
setToolBarArea in interface IToolBarPanel
Parameters:
pArea - 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

updateTranslation

public void updateTranslation()
Notification for updating the translation. This method will be called when the UIComponent will be added to a displayable containment hierarchy, when its containment hierarchy is made displayable or the translation table will be changed.

Overrides:
updateTranslation in class UIContainer<IToolBarPanel>
See Also:
UIComponent.setTranslation(TranslationMap), UIComponent.addNotify()

beforeAddNotify

public void beforeAddNotify(IComponent pParent)
Invoked before this component is added.

Overrides:
beforeAddNotify in class UIContainer<IToolBarPanel>
Parameters:
pParent - the parent

addNotify

public void addNotify()
Makes this UIComponent displayable by adding it to an UIContainer. This method is called internally by the genui and should not be called directly.

Overrides:
addNotify in class UIContainer<IToolBarPanel>
See Also:
UIComponent.removeNotify(), UIComponent.isNotified()

removeNotify

public void removeNotify()
Makes this 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.

Overrides:
removeNotify in class UIContainer<IToolBarPanel>
See Also:
UIComponent.addNotify(), UIComponent.isNotified()

setToolBarMovable

public void setToolBarMovable(boolean pMovable)
Sets all toolbars movable or fixed.

Parameters:
pMovable - true to move the toolbars, false otherwise

isToolBarMovable

public boolean isToolBarMovable()
Gets whether the toolbars are movable.

Returns:
true if the toolbars are movable, false otherwise


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.