public final class PenManager extends java.lang.Object
PenManager
to start using JPen, AwtPenToolkit
contains one ready to be used.Constructor and Description |
---|
PenManager(java.awt.Component component)
Creates an
AwtPenOwner and calls the PenManager(PenOwner) constructor. |
PenManager(PenOwner penOwner) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(PenManagerListener l) |
void |
firePenDeviceAdded(PenProvider.Constructor constructor,
PenDevice device) |
void |
firePenDeviceRemoved(PenProvider.Constructor constructor,
PenDevice device) |
java.util.Set<PenProvider.Constructor> |
getConstructors()
Deprecated.
replacement: #getProviderConstructors().
|
PenDevice |
getDevice(byte deviceId) |
java.util.Collection<PenDevice> |
getDevices() |
static java.lang.String |
getJPenFullVersion() |
boolean |
getPaused() |
<T extends PenProvider> |
getProvider(java.lang.Class<T> providerClass)
Uses reflection to get the first provider of the given class.
|
java.util.Set<PenProvider.Constructor> |
getProviderConstructors() |
PenProvider |
getSystemMouseProvider() |
boolean |
isSystemMouseDevice(PenDevice device) |
void |
removeListener(PenManagerListener l) |
void |
scheduleButtonEvent(PenDevice device,
long deviceTime,
PButton button)
Schedules button events.
|
boolean |
scheduleLevelEvent(PenDevice device,
long deviceTime,
java.util.Collection<PLevel> levels) |
boolean |
scheduleLevelEvent(PenDevice device,
long deviceTime,
java.util.Collection<PLevel> levels,
boolean levelsOnScreen)
Schedules level events.
|
void |
scheduleScrollEvent(PenDevice device,
long deviceTime,
PScroll scroll)
Schedules scroll events.
|
public PenManager(java.awt.Component component)
AwtPenOwner
and calls the PenManager(PenOwner)
constructor. Warning: see AwtPenOwner.AwtPenOwner(Component)
.public PenManager(PenOwner penOwner)
public static java.lang.String getJPenFullVersion()
public PenProvider getSystemMouseProvider()
null
if no mouse provider has been added.addProvider(PenProvider.Constructor)
public boolean isSystemMouseDevice(PenDevice device)
public void addListener(PenManagerListener l)
public void removeListener(PenManagerListener l)
public void firePenDeviceAdded(PenProvider.Constructor constructor, PenDevice device)
public void firePenDeviceRemoved(PenProvider.Constructor constructor, PenDevice device)
public java.util.Collection<PenDevice> getDevices()
@Deprecated public java.util.Set<PenProvider.Constructor> getConstructors()
public java.util.Set<PenProvider.Constructor> getProviderConstructors()
public boolean getPaused()
public void scheduleButtonEvent(PenDevice device, long deviceTime, PButton button)
PButton
each time you call this method (do not reuse).public void scheduleScrollEvent(PenDevice device, long deviceTime, PScroll scroll)
PScroll
each time you call this method (do not reuse).public boolean scheduleLevelEvent(PenDevice device, long deviceTime, java.util.Collection<PLevel> levels)
public boolean scheduleLevelEvent(PenDevice device, long deviceTime, java.util.Collection<PLevel> levels, boolean levelsOnScreen)
Collection
but you must construct new PLevel
s each time you call this method.public <T extends PenProvider> T getProvider(java.lang.Class<T> providerClass)