public class ChartTooltipContentAdapter extends Object implements TooltipContentAdapter
Constructor and Description |
---|
ChartTooltipContentAdapter(Context context)
Creates a new instance of the
ChartTooltipContentAdapter class using a default tooltip resource. |
ChartTooltipContentAdapter(Context context,
int tooltipContentId)
Creates a new instance of the
ChartTooltipContentAdapter class. |
Modifier and Type | Method and Description |
---|---|
int |
getBackgroundColor()
Gets the current background color.
|
int |
getCategoryTextColor()
Gets the current category text color.
|
float |
getCategoryTextSize()
Gets the current category text size.
|
Function<Object,String> |
getCategoryToStringConverter()
Gets the category to string converter, which will be used when translating a data point's data context.
|
boolean |
getIsApplyDefaultStyles()
Gets a value determining whether to apply the default styles or not.
|
int |
getTooltipContent()
Gets the current tooltip content resource.
|
int |
getValueTextColor()
Gets the current value text color.
|
float |
getValueTextSize()
Gets the current value text size.
|
Function<Object,String> |
getValueToStringConverter()
Gets the value to string converter, which will be used when translating a data point's data context.
|
View |
getView(Object[] targets)
Gets the view according to the provided set of targets.
|
void |
setApplyDefaultStyles(boolean apply)
Sets a value determining whether to apply the default styles or not.
|
void |
setBackgroundColor(int color)
Sets the current background color.
|
void |
setCategoryTextColor(int color)
Sets the category text color.
|
void |
setCategoryTextSize(float size)
Sets the category text size.
|
void |
setCategoryToStringConverter(Function<Object,String> converter)
Sets the category to string converter, which will be used when translating a data point's data context.
|
void |
setPadding(int padding)
Sets the current padding.
|
void |
setPadding(int left,
int top,
int right,
int bottom)
Sets the current padding.
|
void |
setTooltipContent(int tooltipContentId)
Sets the current tooltip content resource.
|
void |
setValueTextColor(int color)
Sets the value text color.
|
void |
setValueTextSize(float size)
Sets the value text size.
|
void |
setValueToStringConverter(Function<Object,String> converter)
Sets the value to string converter, which will be used when translating a data point's data context.
|
public ChartTooltipContentAdapter(Context context)
ChartTooltipContentAdapter
class using a default tooltip resource.context
- the current context.public ChartTooltipContentAdapter(Context context, int tooltipContentId)
ChartTooltipContentAdapter
class.context
- the current context.tooltipContentId
- the resource id of a custom xml defining the content of the tooltip.public int getTooltipContent()
public void setTooltipContent(int tooltipContentId)
tooltipContentId
- the new resource id.public int getBackgroundColor()
public void setBackgroundColor(int color)
color
- the new background color.public void setPadding(int left, int top, int right, int bottom)
left
- the left padding.top
- the top padding.right
- the right padding.bottom
- the bottom padding.public void setPadding(int padding)
padding
- The new padding.public int getCategoryTextColor()
public void setCategoryTextColor(int color)
color
- the new category color.public int getValueTextColor()
public void setValueTextColor(int color)
color
- the new value text color.public float getCategoryTextSize()
public void setCategoryTextSize(float size)
size
- the new category size.public float getValueTextSize()
public void setValueTextSize(float size)
size
- the new value size.public boolean getIsApplyDefaultStyles()
TooltipContentAdapter
getIsApplyDefaultStyles
in interface TooltipContentAdapter
true
will result in application of the default styles, false
will prevent it.public void setApplyDefaultStyles(boolean apply)
TooltipContentAdapter
setApplyDefaultStyles
in interface TooltipContentAdapter
apply
- the determining value. true
will result in application of the default styles, false
will prevent it.public Function<Object,String> getValueToStringConverter()
TooltipContentAdapter
getValueToStringConverter
in interface TooltipContentAdapter
null
.public void setValueToStringConverter(Function<Object,String> converter)
TooltipContentAdapter
null
the default conversion will apply.setValueToStringConverter
in interface TooltipContentAdapter
converter
- the new value to string converter.public Function<Object,String> getCategoryToStringConverter()
TooltipContentAdapter
getCategoryToStringConverter
in interface TooltipContentAdapter
null
.public void setCategoryToStringConverter(Function<Object,String> converter)
TooltipContentAdapter
null
the default conversion will apply.setCategoryToStringConverter
in interface TooltipContentAdapter
converter
- the new category to string converter.public View getView(Object[] targets)
TooltipContentAdapter
getView
in interface TooltipContentAdapter
targets
- set of targets.