|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.omGraphics.OMAction
public class OMAction
The OMAction class provides a way to describe one or more actions that should be performed on an OMGraphic. Each digit of the internal integer represents an action, and the action masks are defined in OMGraphicsConstances. The class holds the action value, and can respond to queries to check if certain masks are set, or can also set certain masks on the internal value. There are also static methods provided as a convenience.
Field Summary | |
---|---|
protected int |
value
The internal value of the action, representing 0 or more actions to be performed on a graphic, depending on the bits set. |
Constructor Summary | |
---|---|
OMAction()
Create an OMAction that represents no action (No bits are set). |
|
OMAction(int value)
Create an OMAction with the provided actions. |
Method Summary | |
---|---|
int |
getValue()
|
boolean |
isMask(int mask)
Return whether a mask value is set in the internal value. |
static boolean |
isMask(int value,
int mask)
Check to see if a mask bit is set in an integer. |
static void |
main(java.lang.String[] argv)
|
int |
setMask(int mask)
Set a particular mask bit in the internal value. |
static int |
setMask(int value,
int mask)
Set a particular mask bit in the provided integer. |
void |
setValue(int value)
|
java.lang.String |
toString()
Provide a String that describes what the Action is all about. |
int |
unsetMask(int mask)
Unset a particular mask bit in the internal value. |
static int |
unsetMask(int value,
int mask)
Unset a particular mask bit in the provided integer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int value
Constructor Detail |
---|
public OMAction()
public OMAction(int value)
Method Detail |
---|
public void setValue(int value)
public int getValue()
public int setMask(int mask)
mask
- an OMGraphicConstant mask constant.
public int unsetMask(int mask)
mask
- an OMGraphicConstant mask constant.
public boolean isMask(int mask)
mask
- an OMGraphicConstant mask constant.
public static int setMask(int value, int mask)
value
- the integer to set the value(bit) on.mask
- an OMGraphicConstant mask constant.
public static int unsetMask(int value, int mask)
value
- the integer to unset the value(bit) on.mask
- an OMGraphicConstant mask constant.
public static boolean isMask(int value, int mask)
value
- the integer to check for the value(bit) on.mask
- an OMGraphicConstant mask constant.
public java.lang.String toString()
toString
in class java.lang.Object
public static final void main(java.lang.String[] argv)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |