Class Alarm


  • public class Alarm
    extends java.lang.Object
    Created by hansolo on 19.12.16.
    • Constructor Detail

      • Alarm

        public Alarm()
        Represents a point in time where something should be triggered.
      • Alarm

        public Alarm​(java.time.ZonedDateTime TIME)
      • Alarm

        public Alarm​(java.time.ZonedDateTime TIME,
                     javafx.scene.paint.Color COLOR)
      • Alarm

        public Alarm​(Alarm.Repetition REPETITION,
                     java.time.ZonedDateTime TIME)
      • Alarm

        public Alarm​(Alarm.Repetition REPETITION,
                     java.time.ZonedDateTime TIME,
                     javafx.scene.paint.Color COLOR)
      • Alarm

        public Alarm​(Alarm.Repetition REPETITION,
                     java.time.ZonedDateTime TIME,
                     boolean ARMED)
      • Alarm

        public Alarm​(Alarm.Repetition REPETITION,
                     java.time.ZonedDateTime TIME,
                     boolean ARMED,
                     java.lang.String TEXT)
      • Alarm

        public Alarm​(Alarm.Repetition REPETITION,
                     java.time.ZonedDateTime TIME,
                     boolean ARMED,
                     java.lang.String TEXT,
                     Command COMMAND)
      • Alarm

        public Alarm​(Alarm.Repetition REPETITION,
                     java.time.ZonedDateTime TIME,
                     boolean ARMED,
                     java.lang.String TEXT,
                     Command COMMAND,
                     javafx.scene.paint.Color COLOR)
    • Method Detail

      • getRepetition

        public Alarm.Repetition 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

        public void setRepetition​(Alarm.Repetition REPETITION)
        Defines the repetition rate of the alarm. The values are ONCE, HALF_HOURLY, HOURLY, DAILY, WEEKLY
        Parameters:
        REPETITION -
      • getTime

        public java.time.ZonedDateTime getTime()
        Returns the time of the alarm.
        Returns:
        the time of the alarm
      • setTime

        public void setTime​(java.time.ZonedDateTime TIME)
        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

        public java.lang.String 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

        public void setText​(java.lang.String TEXT)
        Defines a text for the alarm. The text will be shown in tooltips.
        Parameters:
        TEXT -
      • getCommand

        public Command 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

        public void setCommand​(Command COMMAND)
        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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • onMarkerPressedProperty

        public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Alarm.AlarmMarkerEvent>> onMarkerPressedProperty()
      • setOnMarkerPressed

        public final void setOnMarkerPressed​(javafx.event.EventHandler<Alarm.AlarmMarkerEvent> value)
      • onMarkerReleasedProperty

        public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Alarm.AlarmMarkerEvent>> onMarkerReleasedProperty()
      • setOnMarkerReleased

        public final void setOnMarkerReleased​(javafx.event.EventHandler<Alarm.AlarmMarkerEvent> value)