public final class Property extends Object implements Graph.Dependent
| Modifier and Type | Class and Description |
|---|---|
static class |
Property.Animator
Provides keyframe animation support for Property.
|
| Constructor and Description |
|---|
Property() |
| Modifier and Type | Method and Description |
|---|---|
Property.Animator |
animator()
Return the Animator for the Property, creating it if necessary.
|
void |
attach(Graph graph)
Optional hook called when attached to the Graph.
|
Property |
clearLinks()
Clear all Linkables from the Property.
|
void |
detach(Graph graph)
Optional hook to be informed when removed from the graph.
|
double |
get()
Return the current value.
|
boolean |
isAnimating()
Return whether the property is currently animating.
|
Property |
link(DoubleConsumer consumer)
Call the provided consumer with the double value whenever the value
changes.
|
Property |
set(double value)
Set the value of this property.
|
Property.Animator |
to(double... to)
Animate the property value to the provided values.
|
void |
update()
Called before every new buffer is processed.
|
Linkable.Double |
values()
Return a new
Linkable.Double for observing changing values. |
public Property set(double value)
value - public double get()
public Property link(DoubleConsumer consumer)
values().link(consumer);. The
double value will be as if calling #getDouble().consumer - double consumerpublic Linkable.Double values()
Linkable.Double for observing changing values. The
double value will be as if calling get().public Property clearLinks()
public Property.Animator animator()
public Property.Animator to(double... to)
animator().to(...).
This method returns the animator so that you can chain calls, eg.
prop.to(1, 0).in(1, 0.25).easeInOut();
public void attach(Graph graph)
Graph.Dependentattach in interface Graph.Dependentgraph - the Graph being added topublic void detach(Graph graph)
Graph.Dependentdetach in interface Graph.Dependentgraph - the Graph being removed frompublic void update()
Graph.Dependentupdate in interface Graph.Dependentpublic boolean isAnimating()
Copyright © 2020. All rights reserved.