JTablet 1.2.0 API

cello.jtablet
Class TabletDevice

java.lang.Object
  extended by cello.jtablet.TabletDevice
All Implemented Interfaces:
Serializable

public abstract class TabletDevice
extends Object
implements Serializable

Represents a physical input device. TabletDevice objects are referenced in TabletEvents and constructed by the JTablet library itself.

Author:
marcello
See Also:
Serialized Form

Nested Class Summary
static class TabletDevice.Support
          Support result returned by various getSupport() methods
static class TabletDevice.Type
          Tablet devices
 
Constructor Summary
protected TabletDevice()
          TabletDevice objects may only be constructed by JTablet itself.
 
Method Summary
 TabletDevice.Support getButtonSupport()
          Returns whether this device supports buttons.
 TabletDevice.Support getFloatSupport()
          Returns whether this device supports floating point coordinates.
 String getName()
          Returns the device's name
 TabletDevice.Support getPressureSupport()
          Returns whether this device supports pressure sensitivity.
 TabletDevice.Support getRotationSupport()
          Returns whether this device supports axis rotation.
 TabletDevice.Support getSidePressureSupport()
          Returns whether this device supports side pressure.
 TabletDevice.Support getTiltSupport()
          Returns whether this device supports tilt orientation.
abstract  TabletDevice.Type getType()
          Returns this device's type (such as stylus pen tip, stylus eraser, mouse cursor, or other).
 String getUniqueId()
          Returns the unique physical device ID.
 TabletDevice.Support getUniqueIdSupport()
          Returns whether this device supports unique IDs.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TabletDevice

protected TabletDevice()
TabletDevice objects may only be constructed by JTablet itself. Typically one would obtain a reference to a TabletDevice object though a TabletEvent. TabletManager objects will typically contain concrete subclasses of TabletDevice that they can construct on demand in response to the detection of a tablet.

Method Detail

getType

public abstract TabletDevice.Type getType()
Returns this device's type (such as stylus pen tip, stylus eraser, mouse cursor, or other).

Returns:
the device's type

getFloatSupport

public TabletDevice.Support getFloatSupport()
Returns whether this device supports floating point coordinates.

Returns:
floating point support
See Also:
TabletEvent.getFloatX(), TabletEvent.getFloatY(), TabletEvent.getPoint2D()

getButtonSupport

public TabletDevice.Support getButtonSupport()
Returns whether this device supports buttons.

Returns:
button support
See Also:
TabletEvent.getRawTabletButtonMask(), InputEvent.getModifiersEx()

getUniqueIdSupport

public TabletDevice.Support getUniqueIdSupport()
Returns whether this device supports unique IDs.

Returns:
unique ID support
See Also:
getUniqueIdSupport()

getPressureSupport

public TabletDevice.Support getPressureSupport()
Returns whether this device supports pressure sensitivity.

Returns:
pressure sensitivity support
See Also:
TabletEvent.getPressure()

getTiltSupport

public TabletDevice.Support getTiltSupport()
Returns whether this device supports tilt orientation.

Returns:
tilt (from the vertical axis) support
See Also:
TabletEvent.getTiltX(), TabletEvent.getTiltY()

getSidePressureSupport

public TabletDevice.Support getSidePressureSupport()
Returns whether this device supports side pressure. (E.g. the side wheel on a Wacom airbrush tool.)

Returns:
side pressure support
See Also:
TabletEvent.getSidePressure()

getRotationSupport

public TabletDevice.Support getRotationSupport()
Returns whether this device supports axis rotation.

Returns:
rotation (around the axis of the stylus) support
See Also:
TabletEvent.getRotation()

getName

public String getName()
Returns the device's name

Returns:
the name of this device

getUniqueId

public String getUniqueId()
Returns the unique physical device ID. This can be used to uniquely identify a physical stylus on tablets that support it (see getUniqueIdSupport(), otherwise a non-unique id may be returned.

When supported, this id for a pen will be consistent across sessions, and even tablets/computers.

Returns:
the unique id
See Also:
getUniqueIdSupport()

toString

public String toString()
Overrides:
toString in class Object

JTablet 1.2.0 API