Class Interaction
- java.lang.Object
-
- org.pepstock.charba.client.configuration.Interaction
-
public class Interaction extends Object
Definitions about how the user can interact with chart elements.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Interaction(ConfigurationOptions options)
Builds the object storing the root options element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InteractionOptions
create()
Creates anInteractionOptions
using the configuration defined in this interaction.InteractionAxis
getAxis()
Returns which directions are used in calculating distances.IsChart
getChart()
Returns the chart instanceprotected ExtendedOptions
getConfiguration()
Returns the configuration element.IsInteractionMode
getMode()
Returns which elements appear in the interaction.protected ConfigurationOptions
getOptions()
Returns the configuration options.boolean
isIncludeInvisible()
If true, the invisible points that are outside of the chart area will also be included when evaluating interactions.boolean
isIntersect()
if true, the mode only applies when the mouse position intersects an item on the chart.void
setAxis(InteractionAxis axis)
Sets which directions are used in calculating distances.void
setIncludeInvisible(boolean includeInvisible)
If true, the invisible points that are outside of the chart area will also be included when evaluating interactions.void
setIntersect(boolean intersect)
if true, the mode only applies when the mouse position intersects an item on the chart.void
setMode(String mode)
Sets which elements appear in the interaction.void
setMode(IsInteractionMode mode)
Sets which elements appear in the interaction.
-
-
-
Constructor Detail
-
Interaction
protected Interaction(ConfigurationOptions options)
Builds the object storing the root options element.- Parameters:
options
- root options element.
-
-
Method Detail
-
setMode
public void setMode(String mode)
Sets which elements appear in the interaction.- Parameters:
mode
- which elements appear in the interaction.
-
setMode
public void setMode(IsInteractionMode mode)
Sets which elements appear in the interaction.- Parameters:
mode
- which elements appear in the interaction.
-
getMode
public IsInteractionMode getMode()
Returns which elements appear in the interaction.- Returns:
- which elements appear in the interaction.
-
setIntersect
public void setIntersect(boolean intersect)
if true, the mode only applies when the mouse position intersects an item on the chart.- Parameters:
intersect
- if true, the mode only applies when the mouse position intersects an item on the chart.
-
isIntersect
public boolean isIntersect()
if true, the mode only applies when the mouse position intersects an item on the chart.- Returns:
- if true, the mode only applies when the mouse position intersects an item on the chart.
-
setAxis
public void setAxis(InteractionAxis axis)
Sets which directions are used in calculating distances.- Parameters:
axis
- define which directions are used in calculating distances.
-
getAxis
public InteractionAxis getAxis()
Returns which directions are used in calculating distances.- Returns:
- define which directions are used in calculating distances.
-
setIncludeInvisible
public void setIncludeInvisible(boolean includeInvisible)
If true, the invisible points that are outside of the chart area will also be included when evaluating interactions.- Parameters:
includeInvisible
- if true, the invisible points that are outside of the chart area will also be included when evaluating interactions.
-
isIncludeInvisible
public boolean isIncludeInvisible()
If true, the invisible points that are outside of the chart area will also be included when evaluating interactions.- Returns:
- if true, the invisible points that are outside of the chart area will also be included when evaluating interactions.
-
create
public final InteractionOptions create()
Creates anInteractionOptions
using the configuration defined in this interaction.- Returns:
- an
InteractionOptions
using the configuration defined in this interaction
-
getOptions
protected final ConfigurationOptions getOptions()
Returns the configuration options.- Returns:
- the configuration options.
-
getConfiguration
protected final ExtendedOptions getConfiguration()
Returns the configuration element.- Returns:
- the configuration element.
-
getChart
public final IsChart getChart()
Returns the chart instance- Returns:
- the chart
-
-