|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.keyboard.KeyStrokes
Stores a multi-KeyStroke.
This class basically stores an ArrayList of KeyStrokes. The different constructors should make it easy to convert a KeyStroke or a KeyEvent to a KeyStrokes
Constructor Summary | |
KeyStrokes()
|
|
KeyStrokes(int modifiers,
int keyCode)
|
|
KeyStrokes(int modifiers,
int keyCode1,
int keyCode2)
|
|
KeyStrokes(javax.swing.KeyStroke ks1)
|
|
KeyStrokes(javax.swing.KeyStroke ks1,
javax.swing.KeyStroke ks2)
|
|
KeyStrokes(KeyStrokes kss)
|
|
KeyStrokes(KeyStrokes kss,
int modifiers,
int keyCode)
|
Method Summary | |
void |
add(javax.swing.KeyStroke ks)
Adds a KeyStroke to the list. |
void |
clear()
Removes all the KeyStroke |
boolean |
equals(java.lang.Object obj)
|
java.util.ArrayList |
getData()
|
javax.swing.KeyStroke |
getKeyStroke(int nIndex)
Returns the KeyStroke at the secified index. |
javax.swing.KeyStroke |
getLast()
|
int |
getLength()
Returns the number of KeyStroke. |
int |
hashCode()
Improves performances when in a HashMap |
boolean |
isEmpty()
|
boolean |
isValid()
|
void |
removeLast()
Removes the last KeyStroke of the sequence |
void |
setData(java.util.ArrayList ks)
|
boolean |
startWith(KeyStrokes kss)
Checks if this KeyStrokes start with the same KeyStroke as in kss |
java.lang.String |
toString()
Returns a user readable version of the keystroke like "Ctrl+K, S" |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public KeyStrokes()
public KeyStrokes(javax.swing.KeyStroke ks1)
public KeyStrokes(javax.swing.KeyStroke ks1, javax.swing.KeyStroke ks2)
public KeyStrokes(int modifiers, int keyCode)
public KeyStrokes(int modifiers, int keyCode1, int keyCode2)
public KeyStrokes(KeyStrokes kss)
public KeyStrokes(KeyStrokes kss, int modifiers, int keyCode)
Method Detail |
public void add(javax.swing.KeyStroke ks)
public void removeLast()
public void clear()
public javax.swing.KeyStroke getLast()
public int getLength()
public javax.swing.KeyStroke getKeyStroke(int nIndex)
nIndex
- must be a valid index ( 0 <= nIndex < getLength() )public boolean isEmpty()
public boolean startWith(KeyStrokes kss)
For example, if this contains "Ctrl+S", the method returns true for kss="Ctrl+S", and "Ctrl+S, A". Note: returns true is kss is empty
public java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object obj)
public java.util.ArrayList getData()
public void setData(java.util.ArrayList ks)
public boolean isValid()
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.