org.eclipse.epf.richtext
Class RichTextToolBar

java.lang.Object
  extended byorg.eclipse.swt.widgets.Widget
      extended byorg.eclipse.swt.widgets.Control
          extended byorg.eclipse.swt.widgets.Scrollable
              extended byorg.eclipse.swt.widgets.Composite
                  extended byorg.eclipse.epf.richtext.RichTextToolBar
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable, IRichTextToolBar

public class RichTextToolBar
extends org.eclipse.swt.widgets.Composite
implements IRichTextToolBar

The default rich text tool bar implementation.

Since:
1.0
Author:
Kelvin Low

Field Summary
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
RichTextToolBar(org.eclipse.swt.widgets.Composite parent, int style, IRichText richText)
          Creates a new instance.
 
Method Summary
 void addAction(IRichTextAction action)
          Adds a button action to the tool bar.
 void addAction(IRichTextComboAction action)
          Adds a combo action to the tool bar.
 void addSeparator()
          Adds a separator to the tool bar.
 void updateToolBar(boolean editable)
          Updates the toolbar state.
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, 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, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, setData, setData, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.epf.richtext.IRichTextToolBar
setEnabled
 

Constructor Detail

RichTextToolBar

public RichTextToolBar(org.eclipse.swt.widgets.Composite parent,
                       int style,
                       IRichText richText)
Creates a new instance.

Parameters:
parent - the parent composite
style - the tool bar style
richText - the parent rich text control
Method Detail

addAction

public void addAction(IRichTextAction action)
Adds a button action to the tool bar.

Specified by:
addAction in interface IRichTextToolBar
Parameters:
action - the action to add

addAction

public void addAction(IRichTextComboAction action)
Adds a combo action to the tool bar.

Specified by:
addAction in interface IRichTextToolBar
Parameters:
action - the action to add

addSeparator

public void addSeparator()
Adds a separator to the tool bar.

Specified by:
addSeparator in interface IRichTextToolBar

updateToolBar

public void updateToolBar(boolean editable)
Updates the toolbar state.

Enables/disables actions depending on the currently selected RichTextEditor tab (RichText vs. HTML)

Parameters:
editable - specifies whether to enable non-ReadOnly commands