DirectX Media for Animation Java Reference Previous
Previous
Classes
Classes
Index
Index
Next
Next

Miscellany Class

Methods , Fields

public class Miscellany extends java.lang.Object{
    // Fields
    public static DXMEvent   leftButtonDown;
    public static BooleanBvr leftButtonState;
    public static DXMEvent   leftButtonUp;
    public static Point2Bvr  mousePosition;
    public static DXMEvent   rightButtonDown;
    public static BooleanBvr rightButtonState;
    public static DXMEvent   rightButtonUp;
    
    //    Units
    public final static double cm;
    public final static double foot;
    public final static double inch;
    public final static double meter;
    public final static double mm;
    public final static double pixel;

    // Methods
    public static String getVersionString();
    public static DXMEvent keyDown(int keyCode);
    public static BooleanBvr keyState(int keyCode);
    public static DXMEvent keyUp(int keyCode);
    
}

This class holds methods and constants which don't fit neatly into other areas of the Direct Animation system. Specifically, these areas are:


Methods


getVersionString

public static String getVersionString();

Returns the version string in the form MM.NN.BBBB, where MM is the major version, NN is the minor version, and BBBB is the build number.

Return Value:

Returns the String object.


keyDown

public static DXMEvent keyDown(int keyCode);

Returns an DXMEvent when a specific key is pressed. This is a state-transition event.

Return Value:

Returns the DXMEvent object. This event produces no data.

ParameterDescription
keyCode Can either be quoted characters such as 'a' or specific Java keycode constants.


keyState

public static BooleanBvr keyState(int keyCode);

Creates a Boolean behavior that describes whether the key is up or down.

Return Value:

Returns the BooleanBvr object. The value is TRUE when the key is down and FALSE when the key is up.

ParameterDescription
keyCode Can either be quoted characters, such as 'a' or specific Java keycode constants.


keyUp

public static DXMEvent keyUp(int keyCode);

Returns an DXMEvent if a specific key is released. This is a state-transition event.

Return Value:

Returns the DXMEvent object. This event produces no data.

ParameterDescription
keyCode Can either be quoted characters, such as 'a' or specific Java keycode constants.


Fields

leftButtonDown
The DXMEvent object that occurs when the left mouse button is pressed. This is a state-transition event. It produces no data.
leftButtonState
The BooleanBvr object that is true if the left mouse button is down and false if it is up.
leftButtonUp
The DXMEvent object that occurs when the left mouse button is released. This is a state-transition event. It produces no data.
mousePosition
The Point2Bvr object that gives the mouse position in meters in the world-coordinate system (with the origin at the center of the window).
rightButtonDown
The DXMEvent object that occurs when the right mouse button is pressed. This is a state-transition event. It produces no data.
rightButtonState
The BooleanBvr object that is true if the right mouse button is down and false if it is up.
rightButtonUp
The DXMEvent object that occurs when the right mouse button is up. It produces no data.
cm
The centimeter unit.
foot
The foot unit.
inch
The inch unit.
meter
The meter unit.
mm
The millimeter unit.
pixel
The pixel unit.


Top© 1997 Microsoft Corporation. All rights reserved. Legal Notices.