moka.io
Class Gray

java.lang.Object
  extended bymoka.lang.Object
      extended bymoka.io.Gray

public final class Gray
extends Object

Gray class encapsulates grayscale levels.

Since:
MDK2.1

Field Summary
static short BLACK
          Draw in black.
static short DARK_GRAY
          Draw in dark gray.
static short DARK_PLANE
          The dark grayscale plane.
static short LIGHT_GRAY
          Draw in light gray.
static short LIGHT_PLANE
          The light grayscale plane.
static short OFF
          Draw in black.
 
Method Summary
static boolean checkRunning()
          Checks whether grayscale mode is active.
static void off()
          Deactivates grayscale mode.
static boolean on()
          Activates grayscale mode with four shades of gray.
static void setAMSPlane(short plane)
          Forces graphics routines to use selected plane.
 
Methods inherited from class moka.lang.Object
equals, finalize, getClassName, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OFF

public static final short OFF
Draw in black.

See Also:
Constant Field Values

BLACK

public static final short BLACK
Draw in black.

See Also:
Constant Field Values

LIGHT_GRAY

public static final short LIGHT_GRAY
Draw in light gray.

See Also:
Constant Field Values

DARK_GRAY

public static final short DARK_GRAY
Draw in dark gray.

See Also:
Constant Field Values

LIGHT_PLANE

public static final short LIGHT_PLANE
The light grayscale plane.

See Also:
Constant Field Values

DARK_PLANE

public static final short DARK_PLANE
The dark grayscale plane.

See Also:
Constant Field Values
Method Detail

setAMSPlane

public static void setAMSPlane(short plane)
Forces graphics routines to use selected plane. GraySetAMSPlane forces all graphics routines (from moka.io.Graph class) to draw into the grayscale plane plane (valid values are Gray.LIGHT_PLANE and Gray.DARK_PLANE).

Parameters:
plane - The grayscale plane

off

public static void off()
Deactivates grayscale mode. GrayOff deactivates grayscale mode. If grayscale mode is not activated, this method does nothing.


on

public static boolean on()
Activates grayscale mode with four shades of gray. GrayOn activates grayscale mode.

Returns:
false if there was an error in switching to grayscale mode, otherwise false.

checkRunning

public static boolean checkRunning()
Checks whether grayscale mode is active.

Returns:
true if grayscale mode is active, otherwise FALSE