|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.control.ModifierMask
public class ModifierMask
A ModifierMask represents a pattern that tells what modifier keys
are currently pressed. Modifier keys are keys like ctrl, shift or alt.
This class will be used to check the result of InputEvent.getModifiersEx().
| Field Summary | |
|---|---|
static int |
KEY_MASK
all the masks for which a ModifierMask looks out |
| Constructor Summary | |
|---|---|
ModifierMask(int mask)
Creates a new mask which allows only modifiers that match exactly mask. |
|
ModifierMask(int on,
int off)
Creates a new mask. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
int |
getOffmask()
Gets the mask of the modifiers which must not be pressed. |
int |
getOnmask()
Gets the mask of modifiers which must be pressed in order to activate this. |
int |
hashCode()
|
boolean |
matches(int modifiers)
Tells whether this ModifierMask relates to modifiers
or not. |
java.lang.String |
onMaskToString()
Creates a string that represents the on-mask. |
void |
setOffmask(int offmask)
Sets the mask of the modifiers which must not be pressed in order to activate this mask. |
void |
setOnmask(int onmask)
Sets the mask of the modifiers which must be pressed in order to activate this mask. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int KEY_MASK
ModifierMask looks out
| Constructor Detail |
|---|
public ModifierMask(int mask)
mask.
mask - the mask to match
public ModifierMask(int on,
int off)
on - the keys that must be pressedoff - the keys that must not be pressed| Method Detail |
|---|
public java.lang.String onMaskToString()
public boolean matches(int modifiers)
ModifierMask relates to modifiers
or not. The modifiers have the same form as
InputEvent.getModifiersEx() would have.
modifiers - the modifiers from an InputEvent
true if this mask matches the modifierspublic void setOnmask(int onmask)
onmask - the modifiers that must be pressedpublic int getOnmask()
public void setOffmask(int offmask)
offmask - the modifiers that must not be pressedpublic int getOffmask()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||