org.formaria.swt
Class ToolBar

java.lang.Object
  extended by org.eclipse.swt.widgets.ToolBar
      extended by org.formaria.swt.ToolBar
All Implemented Interfaces:
Appender

public class ToolBar
extends org.eclipse.swt.widgets.ToolBar
implements Appender

Draws a toolbar

Copyright (c) Formaria Ltd., 2008

License: see license.txt $Revision: 2.18 $


Constructor Summary
ToolBar()
          Constructs a new toolbar for the shell
ToolBar(CoolBar 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
 java.lang.String getToolTip()
          Get the tooltip text
 void setAction(java.lang.Object action)
          Set an Action for the toolbar - does nothing
 void setBg(java.lang.String colorStr)
           
 void setDisplayAttributes()
          Set the display attributes
 void setName(java.lang.String name)
          Set the name of this object
 void setToolTip(java.lang.String text)
          Set the tooltip text
 void setup()
          Do any final setup needed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToolBar

public ToolBar()
Constructs a new toolbar for the shell


ToolBar

public ToolBar(CoolBar parent)
Constructs a new toolbar for a coolbar

Parameters:
parent - parent coolbar
Method Detail

checkSubclass

protected void checkSubclass()
Suppress the subclassing exception


setToolTip

public void setToolTip(java.lang.String text)
Set the tooltip text

Parameters:
text - the new text

getToolTip

public java.lang.String getToolTip()
Get the tooltip text

Returns:
the existing text if any

setBg

public void setBg(java.lang.String colorStr)

setAction

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

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

setup

public void setup()
Do any final setup needed

Specified by:
setup in interface Appender

append

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

Specified by:
append in interface Appender
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 Appender

getObject

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

Specified by:
getObject in interface Appender
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 Appender
Parameters:
name - the item name

setDisplayAttributes

public void setDisplayAttributes()
Set the display attributes