Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


oracle.ide.keyboard
Class KeyStrokesConstraintFactory

java.lang.Object
  extended by oracle.ide.keyboard.KeyStrokesConstraintFactory

All Implemented Interfaces:
KeyStrokesConstraint

public final class KeyStrokesConstraintFactory
extends java.lang.Object
implements KeyStrokesConstraint

KeyStrokesConstraintFactory is a factory of KeyStrokeConstraint.
Since I only expect two KeyStrokeConstraint, this factory builds them. The first factory, TYPE_ALL, accepts any key. The second, TYPE_TEXT_EDITOR, Does not allow shortcuts that do not start with a modifier (Ctrl, Alt, ...) or with the Shift modifier (in clear, it refuses "A", "Shift+A",... but accepts "Ctrl+A", "Ctrl+A, A", "Ctrl+Shift+A", ...
This class implements KeyStrokesConstraint for internal reasons only.


Field Summary
static int TYPE_ALL
          KeyStrokesConstraint ID.
static int TYPE_TEXT_EDITOR
          KeyStrokesConstraint ID.

 

Method Summary
static KeyStrokesConstraint getConstraint(int nType)
           
 boolean isAcceptableKey(KeyStrokes kss, javax.swing.KeyStroke ksNew)
          Implements KeyStrokesConstraint

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

TYPE_ALL

public static final int TYPE_ALL
KeyStrokesConstraint ID.
See Also:
Constant Field Values

TYPE_TEXT_EDITOR

public static final int TYPE_TEXT_EDITOR
KeyStrokesConstraint ID.
See Also:
Constant Field Values

Method Detail

isAcceptableKey

public boolean isAcceptableKey(KeyStrokes kss,
                               javax.swing.KeyStroke ksNew)
Implements KeyStrokesConstraint
Specified by:
isAcceptableKey in interface KeyStrokesConstraint

getConstraint

public static KeyStrokesConstraint getConstraint(int nType)
Parameters:
nType - Valid values are TYPE_ALL and TYPE_TEXT_EDITOR
Returns:
a predefined KeyStrokesConstraint.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


Copyright © 1997, 2012, Oracle. All rights reserved.