public abstract class

ChartLayoutElement

implements ILayout.IElement
com.artfulbits.aiCharts.Base.ChartLayoutElement
Known Direct Subclasses

Class Overview

Represents base class for all chart elements that intend to be docked or aligned to the chart.

Summary

Nested Classes
enum ChartLayoutElement.Alignment Represents chart element's alignment. 
enum ChartLayoutElement.Dock Represents chart element's dock. 
Public Constructors
ChartLayoutElement()
Sole constructor.
Public Methods
ChartLayoutElement.Alignment getAlignment()
Gets alignment for this element.
Rect getBounds()
Gets area occupied by this element.
ChartLayoutElement.Dock getDock()
Gets current dock mode for the legend.
int getMeasureWidth()
Gets width calculated during measure pass.
int getMeasuredHeight()
Gets height calculated during measure pass.
boolean isVisible()
Gets the visibility state for this element.
void layout(Rect inOutBounds)
Sets bounds for this element.
void measure(Point inOutSize)
Measures the element.
void setAlignment(ChartLayoutElement.Alignment alignment)
Sets alignment for this element.
void setBounds(int left, int top, int right, int bottom)
Sets element bounds.
void setBounds(Rect rect)
Sets bound for legend's background.
void setDock(ChartLayoutElement.Dock dock)
Sets docking mode for the legend.
void setVisible(boolean value)
Sets visibility of this element on parent ChartView.
[Expand]
Inherited Methods
From interface com.artfulbits.aiCharts.Base.ILayout.IElement

Public Constructors

public ChartLayoutElement ()

Sole constructor. (For invocation by subclass constructors, typically implicit.)

Public Methods

public ChartLayoutElement.Alignment getAlignment ()

Gets alignment for this element.

Returns
  • value of currently applied alignment.

public Rect getBounds ()

Gets area occupied by this element.

Returns
  • instance of Rect class representing current bounds.

public ChartLayoutElement.Dock getDock ()

Gets current dock mode for the legend.

Returns

public int getMeasureWidth ()

Gets width calculated during measure pass.

Returns
  • value of measured width.

public int getMeasuredHeight ()

Gets height calculated during measure pass.

Returns
  • value of measured height.

public boolean isVisible ()

Gets the visibility state for this element.

Returns
  • true if element is visible, otherwise false.

public void layout (Rect inOutBounds)

Sets bounds for this element.

Parameters
inOutBounds instance of Rect representing bounds for element.

public void measure (Point inOutSize)

Measures the element.

Parameters
inOutSize available size to contains the element. This parameter have to be used to return the desired size of element.

public void setAlignment (ChartLayoutElement.Alignment alignment)

Sets alignment for this element.

Parameters
alignment value of desired alignment.

public void setBounds (int left, int top, int right, int bottom)

Sets element bounds.

public void setBounds (Rect rect)

Sets bound for legend's background.

Parameters
rect bound of legend

public void setDock (ChartLayoutElement.Dock dock)

Sets docking mode for the legend.

Parameters
dock instance of ChartLayoutElement.Dock enumeration.

public void setVisible (boolean value)

Sets visibility of this element on parent ChartView.

Parameters
value true if element should be visible, otherwise false.