public abstract class AbstractPointsAndLevelHandler extends NodeImpl implements ExecutionPhaseListener, PointsAndLevelHandler
PointsAndLevelHandler.LevelListener, PointsAndLevelHandler.PointAdaptor
Modifier and Type | Field and Description |
---|---|
int |
startLevel |
int |
startMaxPoints |
int |
startMinPoints |
int |
startPoints |
protected static int |
ZERO_POINTS |
Constructor and Description |
---|
AbstractPointsAndLevelHandler() |
AbstractPointsAndLevelHandler(String id) |
Modifier and Type | Method and Description |
---|---|
protected abstract int |
checkLevelChange(ExecutionContext context,
int currentLevel)
Overwrite to implement a different level/points logic.
|
String |
getDescription() |
protected void |
informLevelChangeListeners(ExecutionContext context)
Informs all listeners in the execution stack about a level change.
|
protected abstract void |
initializeHandler(ExecutionContext context) |
void |
processExecutionPhase(ExecutionContext context)
Called by the Executor to signal a new phase in the execution
|
protected void |
processLevel(ExecutionContext context)
Checks for level changes.
|
protected void |
processPoints(ExecutionContext context)
Processes the points set by the executable element.
|
void |
setDescription(String description) |
protected void |
updateStatusRegion(ExecutionContext context)
Updates the level status panel.
|
protected void |
updateTotals(ExecutionContext context) |
assignParent, assignParent, assignParents, getId, getLocalId, getParent, setBeanName, setId, setLocalId, setParent
clearProperties, getKeys, getProperty, removeProperty, setProperty
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clearProperties, getId, getKeys, getProperty, removeProperty, setProperty
protected static final int ZERO_POINTS
public int startLevel
public int startMinPoints
public int startMaxPoints
public int startPoints
public AbstractPointsAndLevelHandler()
public AbstractPointsAndLevelHandler(String id)
public String getDescription()
public void setDescription(String description)
public void processExecutionPhase(ExecutionContext context)
processExecutionPhase
in interface ExecutionPhaseListener
context
- protected void updateStatusRegion(ExecutionContext context)
protected void processPoints(ExecutionContext context)
protected void updateTotals(ExecutionContext context)
protected void processLevel(ExecutionContext context)
protected void informLevelChangeListeners(ExecutionContext context)
protected abstract int checkLevelChange(ExecutionContext context, int currentLevel)
protected abstract void initializeHandler(ExecutionContext context)
Copyright © 2013. All Rights Reserved.