-
- All Implemented Interfaces:
-
com.androidplot.ui.BoxModelable
,com.androidplot.ui.Resizable
public abstract class LegendWidget<ItemT extends LegendItem> extends Widget
Provides core functionality for displaying a legend widget within a com.androidplot.Plot.
-
-
Field Summary
Fields Modifier and Type Field Description private TableModel
tableModel
private Size
iconSize
private Paint
textPaint
private boolean
drawIconBackgroundEnabled
private boolean
drawIconBorderEnabled
private Comparator<ItemT>
legendItemComparator
-
Constructor Summary
Constructors Constructor Description LegendWidget(TableModel tableModel, LayoutManager layoutManager, Size size, Size iconSize)
-
Method Summary
Modifier and Type Method Description synchronized void
setTableModel(TableModel tableModel)
Size
getIconSize()
void
setIconSize(Size iconSize)
Paint
getTextPaint()
void
setTextPaint(Paint textPaint)
void
setDrawIconBackgroundEnabled(boolean drawIconBackgroundEnabled)
void
setDrawIconBorderEnabled(boolean drawIconBorderEnabled)
Comparator<ItemT>
getLegendItemComparator()
void
setLegendItemComparator(Comparator<ItemT> legendItemComparator)
Set a scheme for sorting the display order or legend items. boolean
isDrawIconBackgroundEnabled()
boolean
isDrawIconBorderEnabled()
-
Methods inherited from class com.androidplot.ui.widget.Widget
calculateCoordinates, containsPoint, draw, getAnchor, getAnchorCoordinates, getAnchorCoordinates, getAnchorOffset, getBackgroundPaint, getBorderPaint, getHeightMetric, getHeightPix, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMarginatedRect, getPaddedRect, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPositionMetrics, getRotation, getSize, getWidgetDimensions, getWidthMetric, getWidthPix, isClippingEnabled, isVisible, layout, onPostInit, position, position, refreshLayout, setAnchor, setBackgroundPaint, setBorderPaint, setClippingEnabled, setHeight, setHeight, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMargins, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPositionMetrics, setRotation, setSize, setVisible, setWidth, setWidth
-
Methods inherited from class com.androidplot.ui.BoxModelable
getMarginatedRect, getPaddedRect, setMarginBottom
-
Methods inherited from class com.androidplot.ui.Resizable
layout
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
LegendWidget
LegendWidget(TableModel tableModel, LayoutManager layoutManager, Size size, Size iconSize)
-
-
Method Detail
-
setTableModel
synchronized void setTableModel(TableModel tableModel)
-
getIconSize
Size getIconSize()
-
setIconSize
void setIconSize(Size iconSize)
-
getTextPaint
Paint getTextPaint()
-
setTextPaint
void setTextPaint(Paint textPaint)
-
setDrawIconBackgroundEnabled
void setDrawIconBackgroundEnabled(boolean drawIconBackgroundEnabled)
-
setDrawIconBorderEnabled
void setDrawIconBorderEnabled(boolean drawIconBorderEnabled)
-
getLegendItemComparator
Comparator<ItemT> getLegendItemComparator()
-
setLegendItemComparator
void setLegendItemComparator(Comparator<ItemT> legendItemComparator)
Set a scheme for sorting the display order or legend items. By default no sorting is appliedand com.androidplot.Series items typically appear in the order which the series wasadded to the com.androidplot.Plot.
-
isDrawIconBackgroundEnabled
boolean isDrawIconBackgroundEnabled()
-
isDrawIconBorderEnabled
boolean isDrawIconBorderEnabled()
-
-
-
-