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 SummaryConstructors Modifier Constructor Description protectedInteraction(ConfigurationOptions options)Builds the object storing the root options element.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description InteractionOptionscreate()Creates anInteractionOptionsusing the configuration defined in this interaction.InteractionAxisgetAxis()Returns which directions are used in calculating distances.IsChartgetChart()Returns the chart instanceprotected ExtendedOptionsgetConfiguration()Returns the configuration element.IsInteractionModegetMode()Returns which elements appear in the interaction.protected ConfigurationOptionsgetOptions()Returns the configuration options.booleanisIncludeInvisible()If true, the invisible points that are outside of the chart area will also be included when evaluating interactions.booleanisIntersect()if true, the mode only applies when the mouse position intersects an item on the chart.voidsetAxis(InteractionAxis axis)Sets which directions are used in calculating distances.voidsetIncludeInvisible(boolean includeInvisible)If true, the invisible points that are outside of the chart area will also be included when evaluating interactions.voidsetIntersect(boolean intersect)if true, the mode only applies when the mouse position intersects an item on the chart.voidsetMode(String mode)Sets which elements appear in the interaction.voidsetMode(IsInteractionMode mode)Sets which elements appear in the interaction.
 
- 
- 
- 
Constructor Detail- 
Interactionprotected Interaction(ConfigurationOptions options) Builds the object storing the root options element.- Parameters:
- options- root options element.
 
 
- 
 - 
Method Detail- 
setModepublic void setMode(String mode) Sets which elements appear in the interaction.- Parameters:
- mode- which elements appear in the interaction.
 
 - 
setModepublic void setMode(IsInteractionMode mode) Sets which elements appear in the interaction.- Parameters:
- mode- which elements appear in the interaction.
 
 - 
getModepublic IsInteractionMode getMode() Returns which elements appear in the interaction.- Returns:
- which elements appear in the interaction.
 
 - 
setIntersectpublic 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.
 
 - 
isIntersectpublic 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.
 
 - 
setAxispublic void setAxis(InteractionAxis axis) Sets which directions are used in calculating distances.- Parameters:
- axis- define which directions are used in calculating distances.
 
 - 
getAxispublic InteractionAxis getAxis() Returns which directions are used in calculating distances.- Returns:
- define which directions are used in calculating distances.
 
 - 
setIncludeInvisiblepublic 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.
 
 - 
isIncludeInvisiblepublic 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.
 
 - 
createpublic final InteractionOptions create() Creates anInteractionOptionsusing the configuration defined in this interaction.- Returns:
- an InteractionOptionsusing the configuration defined in this interaction
 
 - 
getOptionsprotected final ConfigurationOptions getOptions() Returns the configuration options.- Returns:
- the configuration options.
 
 - 
getConfigurationprotected final ExtendedOptions getConfiguration() Returns the configuration element.- Returns:
- the configuration element.
 
 - 
getChartpublic final IsChart getChart() Returns the chart instance- Returns:
- the chart
 
 
- 
 
-