net.xoetrope.swt
Class XToolBar

java.lang.Object
  extended by org.eclipse.swt.widgets.Widget
      extended by org.eclipse.swt.widgets.Control
          extended by org.eclipse.swt.widgets.Scrollable
              extended by org.eclipse.swt.widgets.Composite
                  extended by org.eclipse.swt.widgets.ToolBar
                      extended by net.xoetrope.swt.XToolBar
All Implemented Interfaces:
XAppender, XAttributedComponent, org.eclipse.swt.graphics.Drawable

public class XToolBar
extends org.eclipse.swt.widgets.ToolBar
implements XAppender, XAttributedComponent

Draws a toolbar

Copyright (c) Xoetrope Ltd., 1998-2003

License: see license.txt $Revision: 2.18 $


Field Summary
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
XToolBar()
          Constructs a new toolbar for the shell
XToolBar(XCoolBar parent)
          Constructs a new toolbar for a coolbar
 
Method Summary
 void addSeparator()
          Adds a separator to this item.
 void append(java.lang.Object o, java.lang.String name)
          Appends the object o to this item
protected  void checkSubclass()
          Suppress the subclassing exception
 java.lang.Object getObject(java.lang.String name)
          Get a child object by name
 void setAction(java.lang.Object action)
          Set an Action for the toolbar - does nothing
 int setAttribute(java.lang.String attribName, java.lang.Object attribValue)
          Set one or more attributes of the component.
 void setDisplayAttributes()
          Set the display attributes
 void setName(java.lang.String name)
          Set the name of this object
 void setup()
          Do any final setup needed
 
Methods inherited from class org.eclipse.swt.widgets.ToolBar
computeSize, computeTrim, getItem, getItem, getItemCount, getItems, getRowCount, indexOf, setFont, setParent, setRedraw
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
getClientArea, getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XToolBar

public XToolBar()
Constructs a new toolbar for the shell


XToolBar

public XToolBar(XCoolBar parent)
Constructs a new toolbar for a coolbar

Parameters:
parent - parent coolbar
Method Detail

checkSubclass

protected void checkSubclass()
Suppress the subclassing exception

Overrides:
checkSubclass in class org.eclipse.swt.widgets.ToolBar

setAttribute

public int setAttribute(java.lang.String attribName,
                        java.lang.Object attribValue)
Set one or more attributes of the component.

Specified by:
setAttribute in interface XAttributedComponent
Parameters:
attribName - the name of the attribute
attribValue - the value of the attribute
Returns:
0 for success, non zero for failure or to require some further action

setAction

public void setAction(java.lang.Object action)
Set an Action for the toolbar - does nothing

Specified by:
setAction in interface XAppender
Parameters:
action - the action object

setup

public void setup()
Do any final setup needed

Specified by:
setup in interface XAppender

append

public void append(java.lang.Object o,
                   java.lang.String name)
Appends the object o to this item

Specified by:
append in interface XAppender
Parameters:
o - the appended item
name - the name of the toolbar

addSeparator

public void addSeparator()
Adds a separator to this item.

Specified by:
addSeparator in interface XAppender

getObject

public java.lang.Object getObject(java.lang.String name)
Get a child object by name

Specified by:
getObject in interface XAppender
Parameters:
name - the item name
Returns:
the child item

setName

public void setName(java.lang.String name)
Set the name of this object

Specified by:
setName in interface XAppender
Parameters:
name - the item name

setDisplayAttributes

public void setDisplayAttributes()
Set the display attributes