com.nchart3d.NChart.NChartLegend Class Reference

The NChartLegend class provides methods to display the legend of the chart. More...

Inheritance diagram for com.nchart3d.NChart.NChartLegend:
com.nchart3d.NChart.NChartPlaced com.nchart3d.NChart.NChartObject com.nchart3d.NChart.NChartScaleLegend

Public Member Functions

NChartFont getFont ()
 Font of the legend's text.
 
void setFont (NChartFont font)
 For details see getFont().
 
int getTextColor ()
 Color of the legend's text.
 
void setTextColor (int textColor)
 For details see getTextColor().
 
NChartLineBreakMode getLineBreakMode ()
 Line break mode of the legend's text.
 
NChartLabel getFooter ()
 Label that is placed on the bottom of the legend. More...
 
void setFooter (NChartLabel footer)
 For details see getFooter().
 
NChartLabel getHeader ()
 Label that is placed on the top of the legend. More...
 
void setHeader (NChartLabel header)
 For details see getHeader().
 
NChartLegendBlockAlignment getBlockAlignment ()
 Alignment of the legend. More...
 
void setBlockAlignment (NChartLegendBlockAlignment blockAlignment)
 For details see getBlockAlignment().
 
NChartLegendContentAlignment getContentAlignment ()
 Alignment of legend's content in legend's area. More...
 
void setContentAlignment (NChartLegendContentAlignment contentAlignment)
 For details see getContentAlignment().
 
int getColumnCount ()
 Number of columns in legend. More...
 
void setColumnCount (int columnCount)
 For details see getColumnCount().
 
boolean shouldAutodetectColumnCount ()
 Flag determining if columnCount should be detected automatically to ensure good-looking legend (true) or not (false). More...
 
void setShouldAutodetectColumnCount (boolean shouldAutodetectColumnCount)
 For details see shouldAutodetectColumnCount().
 
float getMaxSize ()
 Maximal size of legend in pixels. More...
 
void setMaxSize (float maxSize)
 For details see getMaxSize().
 
float getMinimalEntriesPadding ()
 Minimal padding between entries in pixels. More...
 
void setMinimalEntriesPadding (float minimalEntriesPadding)
 For details see getMinimalEntriesPadding().
 
NChartMargin getScrollerPadding ()
 Padding inside the scroller.
 
void setScrollerPadding (NChartMargin scrollerPadding)
 For details see getScrollerPadding().
 
NChartLegendOrientation getOrientation ()
 Orientation of the legend. More...
 
void setOrientation (NChartLegendOrientation orientation)
 For details see getOrientation().
 
PointF getOrigin ()
 Origin of the legend. More...
 
void setOrigin (PointF origin)
 For details see getOrigin().
 
int getScrollBarColor ()
 Color of the legend's scrollbar.
 
void setScrollBarColor (int scrollBarColor)
 For details see getScrollBarColor().
 
void setHandlerColors (int normal, int pushed)
 Set color for legend's handler. More...
 
void setHandlerImages (Bitmap normal, Bitmap pushed)
 Set images for legend's handler. More...
 
RectF getFrame ()
 Frame of the legend in the view's coordinate system. More...
 
int handlerNormalColor ()
 Get color of legend's handler normal state.
 
int handlerPushedColor ()
 Get color of legend's handler pushed state.
 
boolean isUserInteractionsEnabled ()
 Flag determining if user interactions in the legend (scrolling, etc.) are enabled (true) or disabled (false). More...
 
void setUserInteractionsEnabled (boolean userInteractionsEnabled)
 For details see isUserInteractionsEnabled().
 
NChartLegendLabelPosition getLabelPosition ()
 Position of the legend labels related to the legend markers. More...
 
void setLabelPosition (NChartLegendLabelPosition labelPosition)
 For details see getLabelPosition().
 
NChartLegendDelegate getDelegate ()
 Delegate of the legend.
 
void setDelegate (NChartLegendDelegate delegate)
 For details see getDelegate().
 
- Public Member Functions inherited from com.nchart3d.NChart.NChartPlaced
NChartBrush getBackground ()
 Brush filling the background of the text container. More...
 
void setBackground (NChartBrush background)
 For details see getBackground().
 
int getBorderColor ()
 Color of the border that is drawn around the text container.
 
void setBorderColor (int borderColor)
 For details see getBorderColor().
 
float getBorderRadius ()
 Corner rounding radius (in pixels) of the border that is drawn around the text container.
 
void setBorderRadius (float borderRadius)
 For details see getBorderRadius().
 
float getBorderThickness ()
 Thickness of the border (in pixels) that is drawn around the text container.
 
void setBorderThickness (float borderThickness)
 For details see getBorderThickness().
 
NChartMargin getMargin ()
 Margin of the text container in pixels (spacing from the bounds of the enclosing area).
 
void setMargin (NChartMargin margin)
 For details see getMargin().
 
NChartMargin getPadding ()
 Padding of the text container in pixels (spacing to sub-areas).
 
void setPadding (NChartMargin padding)
 For details see getPadding().
 
float getOpacity ()
 Opacity of the text container. More...
 
void setOpacity (float opacity)
 For details see getOpacity().
 
- Public Member Functions inherited from com.nchart3d.NChart.NChartObject
boolean isVisible ()
 Flag that determines if the object is visible or not. More...
 
void setVisible (boolean visible)
 For details see isVisible().
 
NChart getChart ()
 Chart the object belongs to. More...
 

Detailed Description

The NChartLegend class provides methods to display the legend of the chart.

Member Function Documentation

NChartLegendBlockAlignment com.nchart3d.NChart.NChartLegend.getBlockAlignment ( )
inline

Alignment of the legend.


Please note, that if alignment is NChartLegendBlockAlignment#Left, NChartLegendBlockAlignment#Right, NChartLegendBlockAlignment#Bottom or NChartLegendBlockAlignment#Top, the border radius is ignored (assumed to be 0).

See also
NChartLegendBlockAlignment
int com.nchart3d.NChart.NChartLegend.getColumnCount ( )
inline

Number of columns in legend.

If 0 or less than 0, entries are aligned in lines with no columns. The default value is 0.

NChartLegendContentAlignment com.nchart3d.NChart.NChartLegend.getContentAlignment ( )
inline

Alignment of legend's content in legend's area.

The default value is NChartLegendContentAlignment#Justified.

See also
NChartLegendContentAlignment
NChartLabel com.nchart3d.NChart.NChartLegend.getFooter ( )
inline

Label that is placed on the bottom of the legend.

It's null by default.

See also
NChartLabel
RectF com.nchart3d.NChart.NChartLegend.getFrame ( )
inline

Frame of the legend in the view's coordinate system.

The frame is a rect fully enclosing the entire legend. This rect is calculated during updateData call when the chat lays out its elements. This rect may change interactively when the legend is dragged by its handler.

NChartLabel com.nchart3d.NChart.NChartLegend.getHeader ( )
inline

Label that is placed on the top of the legend.

It's null by default.

See also
NChartLabel
NChartLegendLabelPosition com.nchart3d.NChart.NChartLegend.getLabelPosition ( )
inline

Position of the legend labels related to the legend markers.

The default value is NChartLegendLabelPosition.Right.

float com.nchart3d.NChart.NChartLegend.getMaxSize ( )
inline

Maximal size of legend in pixels.

The default value is 200. If the legend's block alignment is so that the legend grows vertically, it is interpreted as maximal height, if the legend grows horizontally – as maximal width.
To be more precise, the mapping works as follows

float com.nchart3d.NChart.NChartLegend.getMinimalEntriesPadding ( )
inline

Minimal padding between entries in pixels.

The default value is 10.

NChartLegendOrientation com.nchart3d.NChart.NChartLegend.getOrientation ( )
inline

Orientation of the legend.

See also
NChartLegendOrientation
PointF com.nchart3d.NChart.NChartLegend.getOrigin ( )
inline

Origin of the legend.

It's a starting point that has effect only with orientation set to one of "free"-kinds.

boolean com.nchart3d.NChart.NChartLegend.isUserInteractionsEnabled ( )
inline

Flag determining if user interactions in the legend (scrolling, etc.) are enabled (true) or disabled (false).

The default value is true.

void com.nchart3d.NChart.NChartLegend.setHandlerColors ( int  normal,
int  pushed 
)
inline

Set color for legend's handler.

Parameters
normal- color for normal state.
pushed- color for pushed state.
void com.nchart3d.NChart.NChartLegend.setHandlerImages ( Bitmap  normal,
Bitmap  pushed 
)
inline

Set images for legend's handler.

Parameters
normal- image for normal state.
pushed- image for pushed state.
boolean com.nchart3d.NChart.NChartLegend.shouldAutodetectColumnCount ( )
inline

Flag determining if columnCount should be detected automatically to ensure good-looking legend (true) or not (false).

If this property is true, the value set to columnCount takes no effect. The default value is false.

See also
getColumnCount()