dsto.dfc.swt.commands
Class CommandKeyStrokeBinding

java.lang.Object
  extended by dsto.dfc.swt.commands.CommandKeyStrokeBinding
All Implemented Interfaces:
org.eclipse.swt.widgets.Listener

public class CommandKeyStrokeBinding
extends Object
implements org.eclipse.swt.widgets.Listener

Binds a widget key stroke listener to a Command. When the widget receives a keystroke the binding checks whether the keystroke conforms to the command's accelerator and whether the command is enabled, if so the binding calls the command's execute method.

Author:
David Karunaratne

Constructor Summary
CommandKeyStrokeBinding(org.eclipse.swt.widgets.Widget widget, Command command)
           
 
Method Summary
 void handleEvent(org.eclipse.swt.widgets.Event evt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandKeyStrokeBinding

public CommandKeyStrokeBinding(org.eclipse.swt.widgets.Widget widget,
                               Command command)
Method Detail

handleEvent

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


Copyright © 2008 Commonwealth of Australia