javax.rad.genui.container
Class UIToolBar

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

public class UIToolBar
extends UIContainer<IToolBar>
implements IToolBar

Platform and technology independent TabSetPanel. 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.IToolBar
HORIZONTAL, VERTICAL
 
Constructor Summary
  UIToolBar()
          Creates a new instance of UIToolBar.
protected UIToolBar(IToolBar pToolBar)
          Creates a new instance of UIToolBar with the given toolbar.
 
Method Summary
 IInsets getMargins()
          Returns the margin between the tool bar's border and its buttons.
 int getOrientation()
          Returns the current orientation of the tool bar.
 boolean isMovable()
          Returns whether the toolbar is movable.
 void setMargins(IInsets pMargins)
          Sets the margin between the tool bar's border and its buttons.
 void setMargins(int pTop, int pLeft, int pBottom, int pRight)
          Sets the insets with primitive types.
 void setMovable(boolean pMovable)
          Sets whether the toolbar is movable.
 void setOrientation(int pOrientation)
          Sets the orientation of the tool bar.
 void setParent(IContainer pParent)
          Sets the parent of this component.
 
Methods inherited from class javax.rad.genui.UIContainer
add, add, add, add, addNotify, beforeAddNotify, checkAdd, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, removeNotify, setLayout, setZOrder, updateTranslation
 
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, 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, setPreferredSize, setSize, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Constructor Detail

UIToolBar

public UIToolBar()
Creates a new instance of UIToolBar.

See Also:
IToolBar

UIToolBar

protected UIToolBar(IToolBar pToolBar)
Creates a new instance of UIToolBar with the given toolbar.

Parameters:
pToolBar - the toolbar
See Also:
IToolBar
Method Detail

getOrientation

public int getOrientation()
Returns the current orientation of the tool bar. The value is either HORIZONTAL or VERTICAL.

Specified by:
getOrientation in interface IToolBar
Returns:
an integer representing the current orientation -- either HORIZONTAL or VERTICAL
See Also:
IToolBar.setOrientation(int)

setOrientation

public void setOrientation(int pOrientation)
Sets the orientation of the tool bar. The orientation must have either the value HORIZONTAL or VERTICAL. If orientation is an invalid value, an exception will be thrown.

Specified by:
setOrientation in interface IToolBar
Parameters:
pOrientation - the new orientation -- either HORIZONTAL or VERTICAL
See Also:
IToolBar.getOrientation()

getMargins

public IInsets getMargins()
Returns the margin between the tool bar's border and its buttons.

Specified by:
getMargins in interface IToolBar
Returns:
an Insets object containing the margin values

setMargins

public void setMargins(IInsets pMargins)
Sets the margin between the tool bar's border and its buttons. Setting to null causes the tool bar to use the default margins. The tool bar's default Border object uses this value to create the proper margin. However, if a non-default border is set on the tool bar, it is that Border object's responsibility to create the appropriate margin space (otherwise this property will effectively be ignored).

Specified by:
setMargins in interface IToolBar
Parameters:
pMargins - an Insets object that defines the space between the border and the buttons

setMargins

public void setMargins(int pTop,
                       int pLeft,
                       int pBottom,
                       int pRight)
Sets the insets with primitive types.

Parameters:
pTop - the top insets.
pLeft - the left insets.
pBottom - the bottom insets.
pRight - the right insets.

setMovable

public void setMovable(boolean pMovable)
Sets whether the toolbar is movable. Typically, a movable tool bar can be dragged into a different position within the same container or out into its own window.

Specified by:
setMovable in interface IToolBar
Parameters:
pMovable - true if the toolbar is movable, false otherwise

isMovable

public boolean isMovable()
Returns whether the toolbar is movable.

Specified by:
isMovable in interface IToolBar
Returns:
true if the toolbar is movable

setParent

public void setParent(IContainer pParent)
Sets the parent of this component.

Specified by:
setParent in interface IComponent
Overrides:
setParent in class UIComponent<IToolBar>
Parameters:
pParent - the parent container of this component


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.