public class ChartTooltipBehavior extends ChartPopupBehavior
Modifier and Type | Field and Description |
---|---|
static int |
BACKGROUND_PROPERTY_KEY |
static int |
CATEGORY_COLOR_PROPERTY_KEY |
static int |
CATEGORY_SIZE_PROPERTY_KEY |
static int |
PADDING_PROPERTY_KEY |
static int |
VALUE_COLOR_PROPERTY_KEY |
static int |
VALUE_SIZE_PROPERTY_KEY |
Constructor and Description |
---|
ChartTooltipBehavior(Context context)
Creates a new instance of the
ChartTooltipBehavior class. |
Modifier and Type | Method and Description |
---|---|
TooltipContentAdapter |
contentAdapter()
Provides a content adapter for the current tooltip instance.
|
int |
getBackgroundColor() |
int |
getCategoryTextColor() |
float |
getCategoryTextSize() |
int |
getPadding() |
TooltipTriggerMode |
getTriggerMode()
Gets the current mode that triggers the tooltip.
|
int |
getValueTextColor() |
float |
getValueTextSize() |
boolean |
onDoubleTap(MotionEvent e)
Invoked when a double tap gesture occurs on the owner chart.
|
boolean |
onDrag(MotionEvent event,
MotionEvent event2,
RadSize distance,
boolean isInHold)
Invoked when a drag gesture occurs on the owner chart.
|
boolean |
onHold(MotionEvent e)
Invoked when a hold gesture occurs on the owner chart.
|
boolean |
onPinch(ChartScaleGestureDetector detector,
MotionEvent pinchEvent)
Invoked when a pinch gesture occurs on the owner chart.
|
boolean |
onTap(MotionEvent e)
Invoked when a tap gesture occurs on the owner chart.
|
void |
reset()
Resets the behavior.
|
void |
setBackgroundColor(int color) |
void |
setCategoryTextColor(int value) |
void |
setCategoryTextSize(float value) |
void |
setContentAdapter(TooltipContentAdapter adapter) |
void |
setPadding(int value) |
void |
setTriggerMode(TooltipTriggerMode triggerMode)
Sets the current mode that triggers the tooltip.
|
void |
setValueTextColor(int color) |
void |
setValueTextSize(float value) |
alignTooltipVertically, availableLayoutSlot, close, extractTooltipContext, extractTooltipContext, getApplyDefaultStyles, getContextNeededListener, getLastChartContext, getMaxTouchDistanceTolerance, getPlotAreaClip, getPopupPresenter, getTooltipData, isTooltipDisplayed, open, open, rawOffset, setApplyDefaultStyles, setMaxTouchDistanceTolerance, setPopupPresenter, setTooltipContextNeededListener
attach, chart, detach, onDown, onPinchComplete, onUp
getValue, resetPropertyValue, setValue, setValue
public static final int BACKGROUND_PROPERTY_KEY
public static final int PADDING_PROPERTY_KEY
public static final int CATEGORY_COLOR_PROPERTY_KEY
public static final int VALUE_COLOR_PROPERTY_KEY
public static final int CATEGORY_SIZE_PROPERTY_KEY
public static final int VALUE_SIZE_PROPERTY_KEY
public ChartTooltipBehavior(Context context)
ChartTooltipBehavior
class.context
- the current context.public TooltipTriggerMode getTriggerMode()
public void setTriggerMode(TooltipTriggerMode triggerMode)
triggerMode
- the new trigger mode.public boolean onDrag(MotionEvent event, MotionEvent event2, RadSize distance, boolean isInHold)
ChartBehavior
onDrag
in class ChartBehavior
event
- Information for the event that started the gesture.event2
- Information for the event that caused the current drag gesturedistance
- The distance travelled since the previous gesture. This is NOT the distance between initialEvent and currentEvent.public boolean onTap(MotionEvent e)
ChartBehavior
onTap
in class ChartBehavior
e
- An object that contains gesture information.public boolean onPinch(ChartScaleGestureDetector detector, MotionEvent pinchEvent)
ChartBehavior
onPinch
in class ChartBehavior
detector
- The scale detector that detected this gesture.pinchEvent
- The MotionEvent that represents this pinch gesture.public boolean onHold(MotionEvent e)
ChartBehavior
onHold
in class ChartBehavior
e
- An object that contains gesture information.public boolean onDoubleTap(MotionEvent e)
ChartBehavior
onDoubleTap
in class ChartBehavior
e
- An object that contains gesture information.public TooltipContentAdapter contentAdapter()
TooltipAdapter
TooltipContentAdapter
public void setContentAdapter(TooltipContentAdapter adapter)
public void reset()
ChartBehavior
reset
in class ChartBehavior
public int getBackgroundColor()
public void setBackgroundColor(int color)
public int getPadding()
public void setPadding(int value)
public int getCategoryTextColor()
public void setCategoryTextColor(int value)
public float getCategoryTextSize()
public void setCategoryTextSize(float value)
public float getValueTextSize()
public void setValueTextSize(float value)
public int getValueTextColor()
public void setValueTextColor(int color)