Class TimeFrame

java.lang.Object
com.motivewave.platform.sdk.common.BaseInfo
com.motivewave.platform.sdk.common.TimeFrame
All Implemented Interfaces:
Cloneable

public class TimeFrame extends BaseInfo
Describes a time frame with an open and closing time.
  • Constructor Details

    • TimeFrame

      public TimeFrame()
    • TimeFrame

      public TimeFrame(int start, int end, boolean enabled)
  • Method Details

    • setEnabled

      public void setEnabled(boolean b)
      Overrides:
      setEnabled in class BaseInfo
    • getStartTime

      public int getStartTime()
      Gets the start time as seconds since midnight.
      Returns:
      start time as seconds since midnight
    • setStartTime

      public void setStartTime(int startTime)
      Sets the start time as seconds since midnight.
      Parameters:
      startTime - seconds since midnight
    • getEndTime

      public int getEndTime()
      Gets the end time as seconds since midnight.
      Returns:
      end time as seconds since midnight
    • setEndTime

      public void setEndTime(int endTime)
      Sets the end time as seconds since midnight.
      Parameters:
      endTime - as seconds since midnight
    • getStartColor

      public Color getStartColor()
      Gets the color of the start line (null for default line color).
      Returns:
      color of the start line
    • setStartColor

      public void setStartColor(Color c)
      Sets the color of the start line (null for default line color).
      Parameters:
      c - color of the start line
    • getStartDash

      public float[] getStartDash()
      Gets the dash type of the start line (null for solid line).
      Returns:
      dash type for the start line
    • setStartDash

      public void setStartDash(float[] dash)
      Sets the dash type of the start line (null for solid line).
      Parameters:
      dash - dash type
    • getStartWidth

      public float getStartWidth()
      Gets the width start line (in pixels).
      Returns:
      width of the start line
    • setStartWidth

      public void setStartWidth(float w)
      Sets the width start line (in pixels).
      Parameters:
      w - width of the start line
    • isShowStart

      public boolean isShowStart()
      Returns:
      true if the start line should be displayed.
    • setShowStart

      public void setShowStart(boolean b)
      Sets the attribute for displaying the start line.
      Parameters:
      b - true if the start line should be displayed
    • getEndColor

      public Color getEndColor()
      Gets the color of the end line (null for default line color).
      Returns:
      color of the end line
    • setEndColor

      public void setEndColor(Color c)
      Sets the color of the end line (null for default line color).
      Parameters:
      c - color of the end line
    • getEndDash

      public float[] getEndDash()
      Gets the dash type of the end line (null for solid line).
      Returns:
      dash type for the end line
    • setEndDash

      public void setEndDash(float[] dash)
      Sets the dash type of the end line (null for solid line).
      Parameters:
      dash - dash type for the end line
    • getEndWidth

      public float getEndWidth()
      Gets the width end line (in pixels).
      Returns:
      width of the end line
    • setEndWidth

      public void setEndWidth(float w)
      Sets the width end line (in pixels).
      Parameters:
      w - width of the end line
    • isShowEnd

      public boolean isShowEnd()
      Returns:
      true if the end line should be displayed.
    • setShowEnd

      public void setShowEnd(boolean b)
      Sets the attribute for displaying the end line.
      Parameters:
      b - true if the end line is displayed
    • getFillColor

      public Color getFillColor()
      Gets the color of the fill area (null for default fill color).
      Returns:
      fill color
    • setFillColor

      public void setFillColor(Color c)
      Sets the color of the fill area (null for default fill color).
      Parameters:
      c - fill color
    • isShowFill

      public boolean isShowFill()
      Returns:
      true if the fill area should be displayed.
    • setShowFill

      public void setShowFill(boolean b)
      Sets the attribute for displaying the fill area.
      Parameters:
      b - true if the fill should be displayed
    • getStartStroke

      public Stroke getStartStroke()
      Returns:
      stroke for the start line
    • getEndStroke

      public Stroke getEndStroke()
      Returns:
      stroke for the end line
    • copyFrom

      public void copyFrom(TimeFrame tf)
      Copies the settings from the given timeframe object into this object.
      Parameters:
      tf - timeframe
    • toString

      public String toString()
      Overrides:
      toString in class BaseInfo
    • clone

      public TimeFrame clone()
      Description copied from class: BaseInfo
      Creates a clone (copy) of this object.
      Overrides:
      clone in class BaseInfo
      Returns:
      clone of this object
    • toJson

      public Object toJson(BaseInfo def1)
      Specified by:
      toJson in class BaseInfo
    • fromJson

      public static TimeFrame fromJson(Object obj, TimeFrame def)