com.sibvisions.rad.ui.qt.impl.container
Class QtToolBar

java.lang.Object
  extended by com.sibvisions.rad.ui.qt.impl.QtResource<C>
      extended by com.sibvisions.rad.ui.qt.impl.QtComponentBase<C>
          extended by com.sibvisions.rad.ui.qt.impl.QtComponent<C>
              extended by com.sibvisions.rad.ui.qt.impl.QtContainer<QFrame>
                  extended by com.sibvisions.rad.ui.qt.impl.container.QtToolBar
All Implemented Interfaces:
IToolBar, IAlignmentConstants, IComponent, IContainer, IResource

public class QtToolBar
extends QtContainer<QFrame>
implements IToolBar

The QtToolBar is the IToolBar implementation for QT.

See Also:
QToolBar, IToolBar

Field Summary
 
Fields inherited from class com.sibvisions.rad.ui.qt.impl.QtComponent
parent
 
Fields inherited from class com.sibvisions.rad.ui.qt.impl.QtComponentBase
factory
 
Fields inherited from class com.sibvisions.rad.ui.qt.impl.QtResource
resource
 
Fields inherited from interface javax.rad.ui.container.IToolBar
HORIZONTAL, VERTICAL
 
Fields inherited from interface javax.rad.ui.IAlignmentConstants
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP
 
Constructor Summary
QtToolBar()
          Creates a new instance of QtToolBar.
 
Method Summary
protected  void addIntern(IComponent pComponent, Object pConstraints, int pIndex)
          Internal function, for adding physical component and supporting layers.
 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.
protected  void removeIntern(IComponent pComponent)
          Internal function, for adding physical component and supporting layers.
 void setMargins(IInsets pMargin)
          Sets the margin between the tool bar's border and its buttons.
 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.
 void setVisible(boolean pVisible)
          Shows or hides this component depending on the value of parameter b.
 
Methods inherited from class com.sibvisions.rad.ui.qt.impl.QtContainer
add, add, add, add, checkAdd, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout, setLayoutIntern
 
Methods inherited from class com.sibvisions.rad.ui.qt.impl.QtComponent
addStyle, capture, getBackground, getBounds, getCursor, getFont, getForeground, getHorizontalAlignment, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getStyleSheet, getToolTipText, getVerticalAlignment, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFocusable, setFont, setForeground, setHorizontalAlignment, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setResourceVisible, setSize, setToolTipText, setVerticalAlignment
 
Methods inherited from class com.sibvisions.rad.ui.qt.impl.QtComponentBase
eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getFactory, isVisible, setFactory
 
Methods inherited from class com.sibvisions.rad.ui.qt.impl.QtResource
equals, getResource, 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, 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, setPreferredSize, setSize, setToolTipText
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Constructor Detail

QtToolBar

public QtToolBar()
Creates a new instance of QtToolBar.

Method Detail

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()

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)

setMargins

public void setMargins(IInsets pMargin)
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:
pMargin - an Insets object that defines the space between the border and the buttons

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

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 QtComponent<QFrame>
Parameters:
pParent - the parent container of this component

setVisible

public void setVisible(boolean pVisible)
Shows or hides this component depending on the value of parameter b.

Specified by:
setVisible in interface IComponent
Overrides:
setVisible in class QtComponentBase<QFrame>
Parameters:
pVisible - if true, shows this component; otherwise, hides this component
See Also:
IComponent.isVisible()

addIntern

protected void addIntern(IComponent pComponent,
                         Object pConstraints,
                         int pIndex)
Internal function, for adding physical component and supporting layers.

Overrides:
addIntern in class QtContainer<QFrame>
Parameters:
pComponent - the Component to be added
pConstraints - an object expressing layout contraints for this
pIndex - the position in the container's list at which to insert the Component; -1 means insert at the end component
See Also:
QtContainer.add(IComponent, Object, int)

removeIntern

protected void removeIntern(IComponent pComponent)
Internal function, for adding physical component and supporting layers.

Overrides:
removeIntern in class QtContainer<QFrame>
Parameters:
pComponent - the Component to be removed
See Also:
QtContainer.remove(int)


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.