public class FiremanKeyhole extends java.lang.Object implements EnvironmentSensor.EmergencyHardware, Drawable
| Modifier and Type | Class and Description |
|---|---|
static class |
FiremanKeyhole.KeyState
Represents the three possible states a Fireman Keyhole can be placed in and whether each state is indicative of
emergency operation: OFF, ON, HOLD_BYPASS
|
| Constructor and Description |
|---|
FiremanKeyhole(boolean onLanding)
Crates a basic Fireman Keyhole, set to the Off position
|
| Modifier and Type | Method and Description |
|---|---|
javafx.scene.image.ImageView |
getRepresentation()
Gets the reference to an object of type ImageView in which this Drawable stores its representation.
|
FiremanKeyhole.KeyState |
getState() |
boolean |
isAnEmergency() |
boolean |
isOnLanding() |
Drawable |
setImageView(javafx.scene.image.ImageView representation)
Sets the reference to an object of type ImageView into which this Drawable should store its representation.
|
FiremanKeyhole |
setState(FiremanKeyhole.KeyState state) |
FiremanKeyhole |
toggleState()
Toggles the state of the fire key
|
java.lang.String |
toString() |
void |
triggerEmergency() |
Drawable |
updateRepresentation()
Updates the stored reference with a representation that represents the state of this Drawable
|
public FiremanKeyhole(boolean onLanding)
onLanding - whether the keyhole is installed in the exterior of a landingpublic FiremanKeyhole.KeyState getState()
public FiremanKeyhole setState(FiremanKeyhole.KeyState state)
state - the state to setpublic FiremanKeyhole toggleState()
public boolean isOnLanding()
public boolean isAnEmergency()
isAnEmergency in interface EnvironmentSensor.EmergencyHardwarepublic Drawable setImageView(javafx.scene.image.ImageView representation)
DrawablesetImageView in interface Drawablerepresentation - The reference to the ImageView in which the representation of this Drawable should be placedpublic javafx.scene.image.ImageView getRepresentation()
DrawablegetRepresentation in interface Drawablepublic Drawable updateRepresentation()
DrawableupdateRepresentation in interface Drawablepublic void triggerEmergency()
triggerEmergency in interface EnvironmentSensor.EmergencyHardwarepublic java.lang.String toString()
toString in class java.lang.Object