dsto.dfc.swt.commands
Class AbstractCommandItemProvider

java.lang.Object
  extended by dsto.dfc.swt.commands.AbstractCommandItemProvider
All Implemented Interfaces:
PropertyChangeListener, EventListener, org.eclipse.swt.widgets.Listener
Direct Known Subclasses:
CommandMenuButtonProvider, CommandToolbarButtonProvider

public abstract class AbstractCommandItemProvider
extends Object
implements org.eclipse.swt.widgets.Listener, PropertyChangeListener

Abstract base class for command UI providers that represent a command with an SWT Item. Subclasses implement createItem(Widget, int) and may choose to override any of the update* () methods.

Version:
$Revision$
Author:
mpp

Field Summary
protected  Command command
           
protected  CommandView commandView
           
protected  org.eclipse.swt.widgets.Item item
           
protected  org.eclipse.swt.widgets.Widget parent
           
 
Constructor Summary
AbstractCommandItemProvider(CommandView commandView, Command command, org.eclipse.swt.widgets.Widget parent, int index)
           
 
Method Summary
protected abstract  org.eclipse.swt.widgets.Item createItem(org.eclipse.swt.widgets.Widget parentWidget, int index)
          Create the item for this provider.
 void dispose()
           
 int getItemCount()
           
 void handleEvent(org.eclipse.swt.widgets.Event e)
           
 void propertyChange(PropertyChangeEvent e)
           
protected  void updateAccelerator()
           
protected  void updateDescription()
           
protected  void updateDisplayName()
           
protected  void updateEnabled()
           
protected  void updateIcon()
           
protected  void updateProperty(String string)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected org.eclipse.swt.widgets.Widget parent

item

protected org.eclipse.swt.widgets.Item item

command

protected Command command

commandView

protected CommandView commandView
Constructor Detail

AbstractCommandItemProvider

public AbstractCommandItemProvider(CommandView commandView,
                                   Command command,
                                   org.eclipse.swt.widgets.Widget parent,
                                   int index)
Method Detail

createItem

protected abstract org.eclipse.swt.widgets.Item createItem(org.eclipse.swt.widgets.Widget parentWidget,
                                                           int index)
Create the item for this provider.


dispose

public void dispose()

getItemCount

public int getItemCount()

updateDisplayName

protected void updateDisplayName()

updateIcon

protected void updateIcon()

updateEnabled

protected void updateEnabled()

updateAccelerator

protected void updateAccelerator()

updateDescription

protected void updateDescription()

updateProperty

protected void updateProperty(String string)

propertyChange

public void propertyChange(PropertyChangeEvent e)
Specified by:
propertyChange in interface PropertyChangeListener

handleEvent

public void handleEvent(org.eclipse.swt.widgets.Event e)
Specified by:
handleEvent in interface org.eclipse.swt.widgets.Listener


Copyright © 2008 Commonwealth of Australia