public static class ControlPanel.FloorControlPanel extends ControlPanel<java.lang.Boolean> implements java.lang.Comparable<ControlPanel.FloorControlPanel>, Drawable
ControlPanel.CabinControlPanel, ControlPanel.FloorControlPanel, ControlPanel.MaintenanceControlPanel
Constructor and Description |
---|
FloorControlPanel(int floorNumber,
boolean up,
boolean down,
java.lang.Object floorChime)
Creates a basic landing control panel
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ControlPanel.FloorControlPanel other) |
java.util.List<java.lang.Object> |
flatten()
Flattens this object's components into a single list
|
EnvironmentSensor.AlignmentSensor |
getAlignmentSensor()
Reports whether a cabin is aligned with this floor
|
Buttons<java.lang.Boolean> |
getCallButtonDown()
Requests the cabin stop at this landing to travel down
|
Buttons<java.lang.Boolean> |
getCallButtonUp()
Requests the cabin stop at this landing to travel up
|
java.util.List<java.lang.Object> |
getComponents()
The stored list of components of this Component wrapper
|
Indicator.ArrivalIndicator |
getCurrDirDownIndicator()
If active, when cabin opens doors on a floor, represents that the cabin is traveling down
|
Indicator.ArrivalIndicator |
getCurrDirUpIndicator()
If active, when cabin opens doors on a floor, represents that the cabin is traveling up
|
EnvironmentSensor.FireSensor |
getFireSensor() |
int |
getFloorNumber()
The number of the floor on which this panel is installed
|
javafx.scene.image.ImageView |
getRepresentation()
Gets the reference to an object of type ImageView in which this Drawable stores its representation.
|
io.elevator.building.Component |
setComponents(java.util.List<java.lang.Object> components)
Sets the stored list of this Component wrapper's components to be the passed param
|
io.elevator.building.Component |
setComponents(java.lang.Object... components)
Sets the stored list of this Component wrapper's components to be the passed params
|
Drawable |
setImageView(javafx.scene.image.ImageView representation)
Sets the reference to an object of type ImageView into which this Drawable should store its representation.
|
java.lang.String |
toString() |
Drawable |
updateRepresentation()
Updates the stored reference with a representation that represents the state of this Drawable
|
Drawable |
updateRepresentation(boolean doorsOpen)
Allows the representation to be updated from the MCP
|
getFireKey, getMainButtonsOnPanel
public FloorControlPanel(int floorNumber, boolean up, boolean down, java.lang.Object floorChime)
floorNumber
- the floor number for this landingup
- whether there is an up button (for example, the top floor does not have one)down
- whether there is an down button (for example, the bottom floor does not have one)floorChime
- The chime (or chimes) to play when at a floorpublic final Indicator.ArrivalIndicator getCurrDirUpIndicator()
public final Indicator.ArrivalIndicator getCurrDirDownIndicator()
public final Buttons<java.lang.Boolean> getCallButtonUp()
public final Buttons<java.lang.Boolean> getCallButtonDown()
public final EnvironmentSensor.AlignmentSensor getAlignmentSensor()
public final EnvironmentSensor.FireSensor getFireSensor()
public final int getFloorNumber()
public int compareTo(ControlPanel.FloorControlPanel other)
compareTo
in interface java.lang.Comparable<ControlPanel.FloorControlPanel>
public Drawable setImageView(javafx.scene.image.ImageView representation)
Drawable
setImageView
in interface Drawable
representation
- The reference to the ImageView in which the representation of this Drawable should be placedpublic javafx.scene.image.ImageView getRepresentation()
Drawable
getRepresentation
in interface Drawable
public Drawable updateRepresentation()
Drawable
updateRepresentation
in interface Drawable
public Drawable updateRepresentation(boolean doorsOpen)
doorsOpen
- true if the doors are openpublic java.util.List<java.lang.Object> flatten()
flatten
in class ControlPanel<java.lang.Boolean>
public java.lang.String toString()
toString
in class ControlPanel<java.lang.Boolean>
public io.elevator.building.Component setComponents(java.lang.Object... components)
components
- The array of components to addpublic io.elevator.building.Component setComponents(java.util.List<java.lang.Object> components)
components
- The list of components to addpublic java.util.List<java.lang.Object> getComponents()