public class ScreenPenOwner extends java.lang.Object implements PenOwner
PenClip for all the screen. Its PenManager is unpaused when the current application has an active window.PenOwner.PenManagerHandle| Modifier and Type | Method and Description |
|---|---|
boolean |
enforceSinglePenManager() |
java.lang.Object |
evalPenEventTag(PenEvent ev)
This method is called by the
PenManager's machinary when creating a PenEvent. |
static ScreenPenOwner |
getInstance() |
PenClip |
getPenClip() |
java.util.Collection<PenProvider.Constructor> |
getPenProviderConstructors()
Called once by the
PenManager.PenManager(PenOwner) constructor to get the available PenProvider.Constructors and use them to setup the PenProviders. |
boolean |
isDraggingOut()
Called by the
PenManager to avoid sending PLevelEvents to clients when the location is outside the PenClip and this method returns false. |
void |
setPenManagerHandle(PenOwner.PenManagerHandle penManagerHandle)
Called once by the
PenManager.PenManager(PenOwner) constructor to allow this PenOwner to access the PenManager through the given PenOwner.PenManagerHandle. |
public static ScreenPenOwner getInstance()
public java.util.Collection<PenProvider.Constructor> getPenProviderConstructors()
PenOwnerPenManager.PenManager(PenOwner) constructor to get the available PenProvider.Constructors and use them to setup the PenProviders.getPenProviderConstructors in interface PenOwnerpublic void setPenManagerHandle(PenOwner.PenManagerHandle penManagerHandle)
PenOwnerPenManager.PenManager(PenOwner) constructor to allow this PenOwner to access the PenManager through the given PenOwner.PenManagerHandle.setPenManagerHandle in interface PenOwnerpublic PenClip getPenClip()
getPenClip in interface PenOwnerpublic boolean isDraggingOut()
PenOwnerPenManager to avoid sending PLevelEvents to clients when the location is outside the PenClip and this method returns false. The PenManager calls this method holding the PenOwner.PenManagerHandle.getPenSchedulerLock() synchronization lock.isDraggingOut in interface PenOwnertrue if this PenOwner is currently in a drag-out operation.public java.lang.Object evalPenEventTag(PenEvent ev)
PenOwnerPenManager's machinary when creating a PenEvent. This method returns a tag to be stored on the given PenEvent or null if no tagging is needed (the PenManager machinary stores this tag on the private PenEvent's penOwnerTag field ). The tag can be later retrieved using PenOwner.PenManagerHandle.retrievePenEventTag(PenEvent).evalPenEventTag in interface PenOwnerpublic boolean enforceSinglePenManager()
enforceSinglePenManager in interface PenOwnertrue if you want to allow only one PenManager per JVM---attempting to create more than one PenManager instance will cause an IllegalStateException to be thrown by the PenManager's constructor.