public abstract class DifferenceLight<D extends LightableDifference> extends Object implements Light<PositionSensor>
Modifier and Type | Class and Description |
---|---|
static interface |
DifferenceLight.Actuator_DL
An actuator for the difference light.
|
Modifier and Type | Field and Description |
---|---|
static String |
BODY_ANCHOR
The style class "voLiDi-anchor" assigned to the document body when a scene difference is set and is currently lighted from
the vantage of the anchoring author.
|
static String |
BODY_SCENE
The style class "voLiDi-scene" assigned to the document body when a scene difference is set and is currently lighted.
|
static int |
MAX_DIFFS
The maximum number of differences (42) that can exist in the vote track.
|
Modifier | Constructor and Description |
---|---|
protected |
DifferenceLight(VoteTrack _voteTrack)
Partially creates a DifferenceLight for init to finish.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addStageRelClasses()
|
DifferenceLight.Actuator_DL |
assignActuator(PositionSensor sensor)
Returns a light actuator for the specified sensor, or null if the light is to be
unaffected by the sensor.
|
protected DifferenceLight.Actuator_DL |
baseActuator()
The actuator for the sensor defined by the current actor and poll, which engages whenever the user
is not pointing to a particular position sensor.
|
protected abstract D |
differenceFor(String personName,
String pollName)
Returns the lightable difference for the specified person and poll, or null if
there is none.
|
static void |
forceInitClass()
Does nothing itself but the call forces static initialization of this class.
|
protected abstract boolean |
hasDiffLooks()
Answers whether the lightable differences of this light are also difference looks and thus able to be directly staged.
|
protected void |
init(Stage stage)
Completes the creation of this DifferenceLight.
|
protected LightableDifference |
redirect()
Redirects the light according to the current light actuator.
|
void |
removeStageRelClasses()
|
protected abstract void |
run(LightableDifference.Runner<D> runner)
Passes all lightable differences through the specified runner.
|
static String |
sceneName()
The name of the other author of the scene difference as opposed to the anchor; or
null if no scene difference is set.
|
static char |
sceneRel()
The style symbol for the cast relation of the
other author of the scene difference as regarded by the anchor, e.g.
|
static void |
setScene(String _sceneName,
String _sceneRel)
Specifies a difference that is displayed in the scene.
|
PositionSensor |
tryCast(Sensor sensor)
Returns the sensor cast to the type covered by this light, or null if the sensor is of
some other type.
|
protected VoteTrack |
voteTrack()
The staged instance of the vote track.
|
public static final String BODY_ANCHOR
public static final String BODY_SCENE
public static final int MAX_DIFFS
protected DifferenceLight(VoteTrack _voteTrack)
voteTrack()
public static void forceInitClass()
protected void init(Stage stage)
protected final void addStageRelClasses()
#StageV-top
element. This method is called during initialization.public final void removeStageRelClasses()
protected final DifferenceLight.Actuator_DL baseActuator()
protected abstract D differenceFor(String personName, String pollName)
protected abstract boolean hasDiffLooks()
protected LightableDifference redirect()
protected abstract void run(LightableDifference.Runner<D> runner)
public static String sceneName()
setScene(String,String)
public static char sceneRel()
setScene(String,String)
@GWTConfigCallback public static void setScene(String _sceneName, String _sceneRel)
s_gwt_stage_vote_DifferenceLight_setScene( 'Frank-FlippityNet' ); // default is null, which lights no default differenceA default actor and difference should also be set on stage. If those are set, then the scene difference will be lighted and style class "voLiDi-scene" assigned to the document body whenever either of the two authors is on stage, while at other times the class will be removed.
sceneName()
,
sceneRel()
public DifferenceLight.Actuator_DL assignActuator(PositionSensor sensor)
Light
assignActuator
in interface Light<PositionSensor>
public final PositionSensor tryCast(Sensor sensor)
Light
tryCast
in interface Light<PositionSensor>