java.lang.Object
eu.hansolo.medusa.Alarm
Created by hansolo on 28.01.16.
-
Property Summary
PropertiesTypePropertyDescriptionfinal javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Alarm.AlarmMarkerEvent>>final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Alarm.AlarmMarkerEvent>> -
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Alarm.AlarmMarkerEventfinal Alarm.AlarmMarkerEventstatic final booleanstatic final boolean -
Constructor Summary
ConstructorsConstructorDescriptionAlarm()Represents a point in time where something should be triggered.Alarm(Alarm.Repetition REPETITION, ZonedDateTime TIME) Alarm(Alarm.Repetition REPETITION, ZonedDateTime TIME, boolean ARMED) Alarm(Alarm.Repetition REPETITION, ZonedDateTime TIME, boolean ARMED, String TEXT) Alarm(Alarm.Repetition REPETITION, ZonedDateTime TIME, boolean ARMED, String TEXT, Command COMMAND) Alarm(Alarm.Repetition REPETITION, ZonedDateTime TIME, boolean ARMED, String TEXT, Command COMMAND, javafx.scene.paint.Color COLOR) Alarm(Alarm.Repetition REPETITION, ZonedDateTime TIME, javafx.scene.paint.Color COLOR) Alarm(ZonedDateTime TIME) Alarm(ZonedDateTime TIME, javafx.scene.paint.Color COLOR) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidjavafx.scene.paint.ColorgetColor()Returns the color that will be used to colorize the alarm in a clock.Returns an instance of a class that implements the Command interface.final javafx.event.EventHandler<Alarm.AlarmMarkerEvent>Gets the value of the property onMarkerPressed.final javafx.event.EventHandler<Alarm.AlarmMarkerEvent>Gets the value of the property onMarkerReleased.Returns the repetition rate of the alarm.getText()Returns the text that was defined for the alarm.getTime()Returns the time of the alarm.booleanisArmed()Returns true if the alarm is activated.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Alarm.AlarmMarkerEvent>>final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Alarm.AlarmMarkerEvent>>voidsetArmed(boolean ARMED) Defines if the alarm is activated.voidsetColor(javafx.scene.paint.Color COLOR) Defines the color that will be used to colorize the alarmvoidsetCommand(Command COMMAND) Defines a class that implements the Command interface and which execute() method will be called when the alarm is triggered.final voidsetOnMarkerPressed(javafx.event.EventHandler<Alarm.AlarmMarkerEvent> value) Sets the value of the property onMarkerPressed.final voidsetOnMarkerReleased(javafx.event.EventHandler<Alarm.AlarmMarkerEvent> value) Sets the value of the property onMarkerReleased.voidsetRepetition(Alarm.Repetition REPETITION) Defines the repetition rate of the alarm.voidDefines a text for the alarm.voidsetTime(ZonedDateTime TIME) Defines the time of the alarm.toString()
-
Property Details
-
onMarkerPressed
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Alarm.AlarmMarkerEvent>> onMarkerPressedProperty -
onMarkerReleased
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Alarm.AlarmMarkerEvent>> onMarkerReleasedProperty
-
-
Field Details
-
ARMED
public static final boolean ARMED- See Also:
-
UNARMED
public static final boolean UNARMED- See Also:
-
ALARM_MARKER_PRESSED_EVENT
-
ALARM_MARKER_RELEASED_EVENT
-
-
Constructor Details
-
Alarm
public Alarm()Represents a point in time where something should be triggered. -
Alarm
-
Alarm
-
Alarm
-
Alarm
-
Alarm
-
Alarm
-
Alarm
public Alarm(Alarm.Repetition REPETITION, ZonedDateTime TIME, boolean ARMED, String TEXT, Command COMMAND) -
Alarm
public Alarm(Alarm.Repetition REPETITION, ZonedDateTime TIME, boolean ARMED, String TEXT, Command COMMAND, javafx.scene.paint.Color COLOR)
-
-
Method Details
-
getRepetition
Returns the repetition rate of the alarm. The values are ONCE, HALF_HOURLY, HOURLY, DAILY, WEEKLY- Returns:
- the repetition rate of the alarm
-
setRepetition
Defines the repetition rate of the alarm. The values are ONCE, HALF_HOURLY, HOURLY, DAILY, WEEKLY- Parameters:
REPETITION-
-
getTime
Returns the time of the alarm.- Returns:
- the time of the alarm
-
setTime
Defines the time of the alarm.- Parameters:
TIME-
-
isArmed
public boolean isArmed()Returns true if the alarm is activated. If an alarm is not armed it will be drawn gray translucent.- Returns:
- true if the alarm is activated
-
setArmed
public void setArmed(boolean ARMED) Defines if the alarm is activated. If an alarm is not armed it will be drawn gray translucent.- Parameters:
ARMED-
-
getText
Returns the text that was defined for the alarm. The text will be shown in tooltips.- Returns:
- the text that was defined for the alarm
-
setText
Defines a text for the alarm. The text will be shown in tooltips.- Parameters:
TEXT-
-
getCommand
Returns an instance of a class that implements the Command interface. This interface only contains one method execute() which will be called when the alarm is triggered. With this one could execute specific tasks defined in separate classes.- Returns:
- an instance of a class that implements the Command interface
-
setCommand
Defines a class that implements the Command interface and which execute() method will be called when the alarm is triggered.- Parameters:
COMMAND-
-
executeCommand
public void executeCommand() -
getColor
public javafx.scene.paint.Color getColor()Returns the color that will be used to colorize the alarm in a clock.- Returns:
- the color that will be used to colorize the alarm
-
setColor
public void setColor(javafx.scene.paint.Color COLOR) Defines the color that will be used to colorize the alarm- Parameters:
COLOR-
-
toString
-
onMarkerPressedProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Alarm.AlarmMarkerEvent>> onMarkerPressedProperty() -
setOnMarkerPressed
Sets the value of the property onMarkerPressed.- Property description:
-
getOnMarkerPressed
Gets the value of the property onMarkerPressed.- Property description:
-
onMarkerReleasedProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Alarm.AlarmMarkerEvent>> onMarkerReleasedProperty() -
setOnMarkerReleased
Sets the value of the property onMarkerReleased.- Property description:
-
getOnMarkerReleased
Gets the value of the property onMarkerReleased.- Property description:
-
fireAlarmMarkerEvent
-