Class Alarm

java.lang.Object
eu.hansolo.medusa.Alarm

public class Alarm extends Object
Created by hansolo on 28.01.16.
  • Property Details

  • Field Details

  • Constructor Details

  • Method Details

    • 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 ZonedDateTime getTime()
      Returns the time of the alarm.
      Returns:
      the time of the alarm
    • setTime

      public void setTime(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 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(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 String toString()
      Overrides:
      toString in class Object
    • onMarkerPressedProperty

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

      public final void setOnMarkerPressed(javafx.event.EventHandler<Alarm.AlarmMarkerEvent> value)
      Sets the value of the property onMarkerPressed.
      Property description:
    • getOnMarkerPressed

      public final javafx.event.EventHandler<Alarm.AlarmMarkerEvent> getOnMarkerPressed()
      Gets the value of the property onMarkerPressed.
      Property description:
    • onMarkerReleasedProperty

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

      public final void setOnMarkerReleased(javafx.event.EventHandler<Alarm.AlarmMarkerEvent> value)
      Sets the value of the property onMarkerReleased.
      Property description:
    • getOnMarkerReleased

      public final javafx.event.EventHandler<Alarm.AlarmMarkerEvent> getOnMarkerReleased()
      Gets the value of the property onMarkerReleased.
      Property description:
    • fireAlarmMarkerEvent

      public void fireAlarmMarkerEvent(Alarm.AlarmMarkerEvent EVENT)