Package com.oorian.chartjs
Class CjAnimationConfig
java.lang.Object
com.oorian.chartjs.CjAnimationConfig
- All Implemented Interfaces:
com.oorian.json.Jsonable
Configuration for Chart.js animation settings.
Usage:
CjAnimationConfig animation = new CjAnimationConfig()
.setDuration(1000)
.setEasing("easeOutQuart");
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDelay()getLoop()booleanChecks if this configuration has any values set.voidinitFromJson(com.oorian.json.JsonValue json) setDelay(int milliseconds) Sets the animation delay.setDuration(int milliseconds) Sets the animation duration.Sets the easing function.setEnabled(boolean enabled) Sets whether animations are enabled.setLoop(boolean loop) Sets whether the animation should loop.com.oorian.json.JsonValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.oorian.json.Jsonable
initFromJson, initFromJson, toJsonString
-
Constructor Details
-
CjAnimationConfig
public CjAnimationConfig()Creates a new animation configuration.
-
-
Method Details
-
setEnabled
Sets whether animations are enabled.- Parameters:
enabled- True to enable animations- Returns:
- This instance for method chaining
-
setDuration
Sets the animation duration.- Parameters:
milliseconds- Duration in milliseconds- Returns:
- This instance for method chaining
-
setEasing
Sets the easing function.- Parameters:
easing- The easing function name (e.g., "linear", "easeOutQuart")- Returns:
- This instance for method chaining
-
setDelay
Sets the animation delay.- Parameters:
milliseconds- Delay in milliseconds- Returns:
- This instance for method chaining
-
setLoop
Sets whether the animation should loop.- Parameters:
loop- True to loop- Returns:
- This instance for method chaining
-
getEnabled
-
getDuration
-
getEasing
-
getDelay
-
getLoop
-
initFromJson
public void initFromJson(com.oorian.json.JsonValue json) - Specified by:
initFromJsonin interfacecom.oorian.json.Jsonable
-
toJsonValue
public com.oorian.json.JsonValue toJsonValue()- Specified by:
toJsonValuein interfacecom.oorian.json.Jsonable
-
hasValues
public boolean hasValues()Checks if this configuration has any values set.- Returns:
- True if any property is set
-