dsto.dfc.swt.commands
Class CommandToolbarCheckboxProvider

java.lang.Object
  extended by dsto.dfc.swt.commands.AbstractCommandItemProvider
      extended by dsto.dfc.swt.commands.CommandToolbarButtonProvider
          extended by dsto.dfc.swt.commands.CommandToolbarCheckboxProvider
All Implemented Interfaces:
CommandToolbarItemProvider, PropertyChangeListener, EventListener, org.eclipse.swt.widgets.Listener

public class CommandToolbarCheckboxProvider
extends CommandToolbarButtonProvider

Command UI provider that generates a checkbox ToolItem for the command.

Version:
$Revision$
Author:
mpp

Field Summary
 
Fields inherited from class dsto.dfc.swt.commands.AbstractCommandItemProvider
command, commandView, item, parent
 
Constructor Summary
CommandToolbarCheckboxProvider(CommandView commandView, Command command, String valueProperty, org.eclipse.swt.widgets.ToolBar toolbar, int index)
           
 
Method Summary
protected  org.eclipse.swt.widgets.Item createItem(org.eclipse.swt.widgets.Widget toolbar, int index)
          Create the item for this provider.
protected  void updateProperty(String name)
           
 
Methods inherited from class dsto.dfc.swt.commands.CommandToolbarButtonProvider
updateDescription, updateDisplayName, updateEnabled, updateIcon
 
Methods inherited from class dsto.dfc.swt.commands.AbstractCommandItemProvider
dispose, getItemCount, handleEvent, propertyChange, updateAccelerator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface dsto.dfc.swt.commands.CommandToolbarItemProvider
dispose, getItemCount
 

Constructor Detail

CommandToolbarCheckboxProvider

public CommandToolbarCheckboxProvider(CommandView commandView,
                                      Command command,
                                      String valueProperty,
                                      org.eclipse.swt.widgets.ToolBar toolbar,
                                      int index)
Parameters:
commandView - The command view.
command - The command.
valueProperty - The name of the property on the command that represents the boolean value to sync with the item. The command must have a get method for this property.
toolbar - The toolbar.
index - The index.
Method Detail

createItem

protected org.eclipse.swt.widgets.Item createItem(org.eclipse.swt.widgets.Widget toolbar,
                                                  int index)
Description copied from class: AbstractCommandItemProvider
Create the item for this provider.

Overrides:
createItem in class CommandToolbarButtonProvider

updateProperty

protected void updateProperty(String name)
Overrides:
updateProperty in class AbstractCommandItemProvider


Copyright © 2008 Commonwealth of Australia