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.Constructor s and use them to setup the PenProvider s. |
boolean |
isDraggingOut()
Called by the
PenManager to avoid sending PLevelEvent s 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()
PenOwner
PenManager.PenManager(PenOwner)
constructor to get the available PenProvider.Constructor
s and use them to setup the PenProvider
s.getPenProviderConstructors
in interface PenOwner
public void setPenManagerHandle(PenOwner.PenManagerHandle penManagerHandle)
PenOwner
PenManager.PenManager(PenOwner)
constructor to allow this PenOwner to access the PenManager through the given PenOwner.PenManagerHandle
.setPenManagerHandle
in interface PenOwner
public PenClip getPenClip()
getPenClip
in interface PenOwner
public boolean isDraggingOut()
PenOwner
PenManager
to avoid sending PLevelEvent
s 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 PenOwner
true
if this PenOwner is currently in a drag-out operation.public java.lang.Object evalPenEventTag(PenEvent ev)
PenOwner
PenManager
'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 PenOwner
public boolean enforceSinglePenManager()
enforceSinglePenManager
in interface PenOwner
true
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.