public class Pen extends PenState
PenState.Levels| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_FREQUENCY |
PenState |
lastScheduledState |
PLevelEmulator |
levelEmulator |
PenManager |
penManager |
serialVersionUID| Modifier and Type | Method and Description |
|---|---|
void |
addListener(PenListener l)
Adds a
PenListener for PenEvents fired by this pen. |
boolean |
getFirePenTockOnSwing() |
int |
getFrequency() |
int |
getPeriodMillis() |
java.lang.Exception |
getThreadException() |
void |
removeListener(PenListener l)
Removes a
PenListener previously added using addListener(PenListener). |
void |
setFirePenTockOnSwing(boolean firePenTockOnSwing) |
void |
setFrequencyLater(int frequency)
Changes the event firing frequency.
|
getButtonValue, getButtonValue, getKind, getLevelValue, getLevelValue, getPressedButtonsCount, hasPressedButtonspublic static final int DEFAULT_FREQUENCY
public final PenManager penManager
public final PenState lastScheduledState
public final PLevelEmulator levelEmulator
public boolean getFirePenTockOnSwing()
public void setFirePenTockOnSwing(boolean firePenTockOnSwing)
firePenTockOnSwing - If true then PenListener.penTock(long) is called from the event dispatch thread. false by default.public void setFrequencyLater(int frequency)
PenEvents at this frequency.This method returns immediately, the change of frequency will happen after all the pending events are processed.
public int getFrequency()
public int getPeriodMillis()
public java.lang.Exception getThreadException()
public void addListener(PenListener l)
PenListener for PenEvents fired by this pen.public void removeListener(PenListener l)
PenListener previously added using addListener(PenListener).