com.tensegrity.gui.swt
Class SwtKeyStrokeProvider

java.lang.Object
  extended bycom.tensegrity.gui.KeyStrokeProvider
      extended bycom.tensegrity.gui.swt.SwtKeyStrokeProvider

public class SwtKeyStrokeProvider
extends KeyStrokeProvider

This is a SWT based subclass of the KeyStrokeProvider abstract class.

Version:
$Id: SwtKeyStrokeProvider.java,v 1.9 2006/03/02 11:42:01 BurkhardWick Exp $
Author:
S�bastien Guyon

Field Summary
protected  SwtKeyStrokeBuilder keyStrokeBuilderInstance
          This is the local instance of SwtKeyStrokeBuilder
 
Fields inherited from class com.tensegrity.gui.KeyStrokeProvider
KEYCODE_VS_MODIFIERS_SEPARATOR, KEYSTROKE_DEFINITION_SUFFIX, map, uiManager
 
Constructor Summary
protected SwtKeyStrokeProvider(UIManager uiManager)
           This constructor initializes the local Map associating command Ids and KeyStrokes.
 
Method Summary
static SwtKeyStrokeProvider getInstance(UIManager uiManager)
          Returns the singleton instance
protected  KeyStrokeBuilder getKeyStrokeBuilderInstance()
          Returns the local instance of SwtKeyStrokeBuilder.
 SwtKeyStroke getSwtKeyStroke(java.lang.String commandId)
           Returns the SwtKeyStrokeassociated with the passed command Id.
protected  void initKeyStrokesFromPropertyFile()
           This method tries to overwrite all the command Id/KeyStroke associations programmatically set up in the constructor with other associations potentially defined into the property files.
protected  void initSubclassKeyStrokesFromPropertyFile()
           Subclasses of SwtKeyStrokeProvider should implement this method and call it at the end of their constructor in order to allow the keystrokes to be changed through property files.
 
Methods inherited from class com.tensegrity.gui.KeyStrokeProvider
addToMap, dumpKeyStrokes, getCommandIds, getKeyStroke, initSingleKeyStroke, loadFromDescription, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

keyStrokeBuilderInstance

protected SwtKeyStrokeBuilder keyStrokeBuilderInstance
This is the local instance of SwtKeyStrokeBuilder

Constructor Detail

SwtKeyStrokeProvider

protected SwtKeyStrokeProvider(UIManager uiManager)

This constructor initializes the local Map associating command Ids and KeyStrokes.

Parameters:
uiManager - this is the application UIManager
Method Detail

getKeyStrokeBuilderInstance

protected KeyStrokeBuilder getKeyStrokeBuilderInstance()
Returns the local instance of SwtKeyStrokeBuilder.

Specified by:
getKeyStrokeBuilderInstance in class KeyStrokeProvider
Returns:
Returns the SwtKeyStrokeBuilder instance.

initKeyStrokesFromPropertyFile

protected final void initKeyStrokesFromPropertyFile()

This method tries to overwrite all the command Id/KeyStroke associations programmatically set up in the constructor with other associations potentially defined into the property files.

Specified by:
initKeyStrokesFromPropertyFile in class KeyStrokeProvider

initSubclassKeyStrokesFromPropertyFile

protected void initSubclassKeyStrokesFromPropertyFile()

Subclasses of SwtKeyStrokeProvider should implement this method and call it at the end of their constructor in order to allow the keystrokes to be changed through property files. Typically, for each keystroke programmatically defined in the constructor, a call to KeyStrokeProvider.initSingleKeyStroke(String) should be made in this method.

Specified by:
initSubclassKeyStrokesFromPropertyFile in class KeyStrokeProvider

getSwtKeyStroke

public SwtKeyStroke getSwtKeyStroke(java.lang.String commandId)

Returns the SwtKeyStrokeassociated with the passed command Id.

Parameters:
commandId - this is a command unique identifier.
Returns:
SwtKeyStrokeassociated with the passed command Id

getInstance

public static SwtKeyStrokeProvider getInstance(UIManager uiManager)
Returns the singleton instance

Parameters:
uiManager - this is the application's UIManager.
Returns:
the SwtKeyStrokeProvider instance.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.