public interface PenProvider
PenProvider contains and maintains a collection of PenDevices which access a pointer (pen tablet/mouse or similar) data source using an specific method (e.g. Wintab). Its main role is to feed pointer data using the following methods: PenManager.scheduleLevelEvent(PenDevice device, long deviceTime, Collection levels, boolean levelsOnScreen), PenManager.scheduleScrollEvent(PenDevice device, long deviceTime, PScroll scroll), and PenManager.scheduleButtonEvent(PenDevice device, long deviceTime, PButton button).
Each PenDevice has a PKind.Type. A tablet provider constructs typically three PenDevices, each one initialized with PKind.Type.ERASER for the eraser, PKind.Type.STYLUS for the stylus, and PKind.Type.CURSOR for the mouse.
The pointer creates its own thread (or uses native threads through JNI) to feed the data.
| Modifier and Type | Interface and Description |
|---|---|
static class |
PenProvider.ConstructionException
A condition which prevented the
PenProvider from being constructed on the PenProvider.Constructor.construct(PenManager) method call. |
static interface |
PenProvider.Constructor
Each
PenProvider is constructed using a Constructor. |
| Modifier and Type | Method and Description |
|---|---|
PenProvider.Constructor |
getConstructor() |
java.util.Collection<PenDevice> |
getDevices() |
boolean |
getUseRelativeLocationFilter() |
void |
penManagerPaused(boolean paused)
Called by the
PenManager to notify that all the PenDevices owned by this PenProvider must start/stop sending events. |
PenProvider.Constructor getConstructor()
Constructor which constructed this PenProvider.java.util.Collection<PenDevice> getDevices()
Collection of devices currently owned by this PenProvider. This Collection can change over the lifetime of this PenProvider. Each time the Collection changes, PenManager.firePenDeviceAdded(PenProvider.Constructor, PenDevice) or PenManager.firePenDeviceRemoved(PenProvider.Constructor, PenDevice) must be called to notify the change. Warning: For convenience, there is no need to call PenManager.firePenDeviceAdded(PenProvider.Constructor, PenDevice) when constructing the PenProvider inside the Constructor#construct(PenManager) method because in this case it is automatically called by the PenManager when calling the Constructor.void penManagerPaused(boolean paused)
PenManager to notify that all the PenDevices owned by this PenProvider must start/stop sending events.paused - If true then the devices must stop sending events. If false then the devices must start sending events.boolean getUseRelativeLocationFilter()
true if this provider needs a location filter to automatically detect if one of its devices is using mouse (relative) location mode and replace its movement levels values with mouse pointer location values.