Class TimeFrame
java.lang.Object
com.motivewave.platform.sdk.common.BaseInfo
com.motivewave.platform.sdk.common.TimeFrame
- All Implemented Interfaces:
Cloneable
Describes a time frame with an open and closing time.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates a clone (copy) of this object.void
Copies the settings from the given timeframe object into this object.static TimeFrame
Gets the color of the end line (null for default line color).float[]
Gets the dash type of the end line (null for solid line).int
Gets the end time as seconds since midnight.float
Gets the width end line (in pixels).Gets the color of the fill area (null for default fill color).Gets the color of the start line (null for default line color).float[]
Gets the dash type of the start line (null for solid line).int
Gets the start time as seconds since midnight.float
Gets the width start line (in pixels).boolean
boolean
boolean
void
setEnabled
(boolean b) void
setEndColor
(Color c) Sets the color of the end line (null for default line color).void
setEndDash
(float[] dash) Sets the dash type of the end line (null for solid line).void
setEndTime
(int endTime) Sets the end time as seconds since midnight.void
setEndWidth
(float w) Sets the width end line (in pixels).void
Sets the color of the fill area (null for default fill color).void
setShowEnd
(boolean b) Sets the attribute for displaying the end line.void
setShowFill
(boolean b) Sets the attribute for displaying the fill area.void
setShowStart
(boolean b) Sets the attribute for displaying the start line.void
Sets the color of the start line (null for default line color).void
setStartDash
(float[] dash) Sets the dash type of the start line (null for solid line).void
setStartTime
(int startTime) Sets the start time as seconds since midnight.void
setStartWidth
(float w) Sets the width start line (in pixels).toString()
-
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 classBaseInfo
-
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
Gets the color of the start line (null for default line color).- Returns:
- color of the start line
-
setStartColor
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
Gets the color of the end line (null for default line color).- Returns:
- color of the end line
-
setEndColor
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
Gets the color of the fill area (null for default fill color).- Returns:
- fill color
-
setFillColor
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
- Returns:
- stroke for the start line
-
getEndStroke
- Returns:
- stroke for the end line
-
copyFrom
Copies the settings from the given timeframe object into this object.- Parameters:
tf
- timeframe
-
toString
-
clone
Description copied from class:BaseInfo
Creates a clone (copy) of this object. -
toJson
-
fromJson
-