|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.piccolo.PNode
edu.umd.cs.piccolo.PRoot
public class PRoot
PRoot serves as the top node in Piccolo's runtime structure. The PRoot responsible for running the main UI loop that processes input from activities and external events.
Nested Class Summary | |
---|---|
static interface |
PRoot.InputSource
This interfaces is for advanced use only. |
Nested classes/interfaces inherited from class edu.umd.cs.piccolo.PNode |
---|
PNode.PSceneGraphDelegate |
Field Summary | |
---|---|
protected boolean |
processingInputs
|
protected boolean |
processInputsScheduled
|
static int |
PROPERTY_CODE_INPUT_SOURCES
|
static java.lang.String |
PROPERTY_INPUT_SOURCES
The property name that identifies a change in the set of this root's input sources (see InputSource ). |
Fields inherited from interface java.awt.print.Printable |
---|
NO_SUCH_PAGE, PAGE_EXISTS |
Constructor Summary | |
---|---|
PRoot()
Construct a new PRoot(). |
Method Summary | |
---|---|
boolean |
addActivity(PActivity activity)
Add an activity to the activity scheduler associated with this root. |
void |
addInputSource(PRoot.InputSource inputSource)
Advanced. |
javax.swing.Timer |
createTimer(int delay,
java.awt.event.ActionListener listener)
Returns a new timer. |
PActivityScheduler |
getActivityScheduler()
Get the activity scheduler associated with this root. |
PInputManager |
getDefaultInputManager()
Get the default input manager to be used when processing input events. |
long |
getGlobalTime()
Get the global Piccolo time. |
PRoot |
getRoot()
Return this. |
void |
processInputs()
This is the heartbeat of the Piccolo framework. |
void |
removeInputSource(PRoot.InputSource inputSource)
Advanced. |
void |
scheduleProcessInputsIfNeeded()
|
void |
setChildBoundsInvalid(boolean childLayoutInvalid)
Set the flag indicating that one of this node's descendents has invalid bounds. |
void |
setChildPaintInvalid(boolean childPaintInvalid)
Mark this node as having a child with invalid paint. |
void |
setFullBoundsInvalid(boolean fullLayoutInvalid)
Set the full bounds invalid flag. |
void |
setPaintInvalid(boolean paintInvalid)
Mark this node as having invalid paint. |
void |
waitForActivities()
Wait for all scheduled activities to finish before returning from this method. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_INPUT_SOURCES
InputSource
). In any property
change event the new value will be a reference to the list of this root's
input sources, but old value will always be null.
public static final int PROPERTY_CODE_INPUT_SOURCES
protected transient boolean processingInputs
protected transient boolean processInputsScheduled
Constructor Detail |
---|
public PRoot()
Method Detail |
---|
public boolean addActivity(PActivity activity)
processInputs
method. When the activity has finished
running it will automatically get removed.
addActivity
in class PNode
activity
- new activity to schedule
public PActivityScheduler getActivityScheduler()
public void waitForActivities()
public PRoot getRoot()
getRoot
in class PNode
public PInputManager getDefaultInputManager()
public void addInputSource(PRoot.InputSource inputSource)
public void removeInputSource(PRoot.InputSource inputSource)
public javax.swing.Timer createTimer(int delay, java.awt.event.ActionListener listener)
public long getGlobalTime()
processInputs
method. Activities
should usually use this global time instead of System.
currentTimeMillis() so that multiple activities will be synchronized.
public void processInputs()
public void setFullBoundsInvalid(boolean fullLayoutInvalid)
PNode
setFullBoundsInvalid
in class PNode
public void setChildBoundsInvalid(boolean childLayoutInvalid)
PNode
setChildBoundsInvalid
in class PNode
public void setPaintInvalid(boolean paintInvalid)
PNode
setPaintInvalid
in class PNode
paintInvalid
- true if this node should be repaintedpublic void setChildPaintInvalid(boolean childPaintInvalid)
PNode
setChildPaintInvalid
in class PNode
childPaintInvalid
- true if this node has a child with invalid paintpublic void scheduleProcessInputsIfNeeded()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |