Summ:  Constr. Methods    Details:  Constr. Methods      Class:  Prev Next
com.artfulbits.aiCharts.Base
Class ChartAxisStripLine

java.lang.Object com.artfulbits.aiCharts.Base.ChartAxisStripLine

Declaration: public final class ChartAxisStripLine extends Object

 

Represents axis strip line class. Strip lining allows easily apply horizontal or vertical bands behind data spaced at periodic intervals. Striplines give user an additional visual cue that adds to their understanding of the information the chart presents.

Since stripline is connected to ChartAxis, it should be added to axis strilpines collection:
 //Creating stripline 0.5 units width that is repeated each 1 unit.
 ChartAxisStripLine stripline = new ChartAxisStripLine(0.5, 1);
 // Adding stripline to striplines collection.
 area.getDefaultXAxis().getStripLines().add(stripline);
 

 

Since: 1.0

 

 

Constructors Summary
ChartAxisStripLine()
    
Initializes new instance of ChartAxisStripLine.
ChartAxisStripLine(double width, double period)
    
Initializes new instance of ChartAxisStripLine with specified parameters.

 

 

Methods Summary
android.graphics.drawable.Drawable getBackground()
    
Gets the background used to draw the stripline.
int getColor()
    
Gets the color used to draw the stripline.
double getEnd()
    
Gets the axis dependent value indicating ending position of stripline.
Alignment getHorizontalAlignment()
    
Gets the horizontal alignment for the text.
double getPeriod()
    
Gets the period used to repeat stripline for parent ChartAxis.
double getStart()
    
Gets the axis dependent value indicating starting position of stripline.
java.lang.String getText()
    
Gets the stripline text.
android.graphics.Paint getTextPaint()
    
Gets android.text.TextPaint object that will be used to draw the text.
Alignment getVerticalAlignment()
    
Gets the vertical alignment for the text.
double getWidth()
    
Gets the width of stripline in axis dependent units.
void setAlignment(Alignment horizontalAlignment, Alignment verticalAlignment)
    
Sets both the vertical and horizontal alignment for the text.
void setBackground(android.graphics.drawable.Drawable background)
    
Sets the background used to draw the stripline.
void setColor(int color)
    
Sets the color used to draw the stripline.
void setEnd(double end)
    
Sets the axis dependent value indicating ending position of stripline.
void setHorizontalAlignment(Alignment alignment)
    
Sets the horizontal alignment for the text.
void setPeriod(double period)
    
Gets the period used to repeat stripline for parent ChartAxis.
void setStart(double start)
    
Sets the axis dependent value indicating starting position of stripline.
void setText(java.lang.String text)
    
Sets the stripline text.
void setVerticalAlignment(Alignment alignment)
    
Sets the vertical alignment for the text.
void setWidth(double width)
    
Sets the width of stripline in axis dependent units.

 

Methods inherited from class: java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

 

 

 

ChartAxisStripLine

 

public ChartAxisStripLine( )

 

Initializes new instance of ChartAxisStripLine. Strip line should be added to chart axis in order to participate in rendering process.

 

Since: 1.0

 

 

 

ChartAxisStripLine

 

public ChartAxisStripLine( double width,
double period)

 

Initializes new instance of ChartAxisStripLine with specified parameters. Strip line should be added to chart axis in order to participate in rendering process.

 

Parameters:
width-
width of stripline in axis depended units.
period-
period value that is used to repeat striplines.

 

Since: 1.0

 

 

 

 

getStart

 

public double getStart( )

 

Gets the axis dependent value indicating starting position of stripline.

 

Returns:
value starting position.

 

Since: 1.0
See also: setStart(double)

 

 

 

setStart

 

public void setStart( double start)

 

Sets the axis dependent value indicating starting position of stripline.

 

Parameters:
start-
staring position of stripline.

 

Since: 1.0

 

 

 

getEnd

 

public double getEnd( )

 

Gets the axis dependent value indicating ending position of stripline.

 

Returns:
stripline ending value position.

 

Since: 1.0

 

 

 

setEnd

 

public void setEnd( double end)

 

Sets the axis dependent value indicating ending position of stripline.

 

Parameters:
end-
stripline ending value position.

 

Since: 1.0
See also: getEnd()

 

 

 

getWidth

 

public double getWidth( )

 

Gets the width of stripline in axis dependent units.

 

Returns:
width of stripline.

 

Since: 1.0
See also: setWidth(double)

 

 

 

setWidth

 

public void setWidth( double width)

 

Sets the width of stripline in axis dependent units.

 

Parameters:
width-
value of stripline width.

 

Since: 1.0
See also: getWidth()

 

 

 

getPeriod

 

public double getPeriod( )

 

Gets the period used to repeat stripline for parent ChartAxis.

 

Returns:
value of current period used to draw the stripline.

 

Since: 1.0
See also: setPeriod(double)

 

 

 

setPeriod

 

public void setPeriod( double period)

 

Gets the period used to repeat stripline for parent ChartAxis.

 

Parameters:
period-
value of desired period used to repeat the stripline.

 

Since: 1.0

 

 

 

getColor

 

public int getColor( )

 

Gets the color used to draw the stripline.

 

Returns:
integer value of stripline color.

 

Since: 1.0
See also: setColor(int)getBackground()

 

 

 

setColor

 

public void setColor( int color)

 

Sets the color used to draw the stripline.

 

Parameters:
color-
integer value desired stripline color.

 

Since: 1.0
See also: getColor()setBackground(Drawable)

 

 

 

getBackground

 

public android.graphics.drawable.Drawable getBackground( )

 

Gets the background used to draw the stripline.

 

Returns:
instance of android.graphics.drawable.Drawable that participated in drawing stripline.

 

Since: 1.0
See also: getColor()

 

 

 

setBackground

 

public void setBackground( android.graphics.drawable.Drawable background)

 

Sets the background used to draw the stripline.

 

Parameters:
background-
instance of android.graphics.drawable.Drawable that will participate in drawing stripline.

 

Since: 1.0
See also: setColor(int)

 

 

 

setText

 

public void setText( java.lang.String text)

 

Sets the stripline text.

 

Parameters:
text-
text for this stripline.

 

Since: 1.0

 

 

 

getText

 

public java.lang.String getText( )

 

Gets the stripline text.

 

Returns:
value of stripline text.

 

Since: 1.0

 

 

 

getTextPaint

 

public android.graphics.Paint getTextPaint( )

 

Gets android.text.TextPaint object that will be used to draw the text.

 

Returns:
instance of android.text.TextPaint object that will be used to draw the text.

 

Since: 1.0

 

 

 

setAlignment

 

public void setAlignment( Alignment horizontalAlignment,
Alignment verticalAlignment)

 

Sets both the vertical and horizontal alignment for the text.

 

Parameters:
horizontalAlignment-
instance of Alignment enumeration containing desired alignment value.
verticalAlignment-
instance of Alignment enumeration containing desired alignment value.

 

Since: 1.0

 

 

 

setVerticalAlignment

 

public void setVerticalAlignment( Alignment alignment)

 

Sets the vertical alignment for the text.

 

Parameters:
alignment-
instance of Alignment enumeration containing desired alignment value.

 

Since: 1.0

 

 

 

getVerticalAlignment

 

public Alignment getVerticalAlignment( )

 

Gets the vertical alignment for the text.

 

Returns:
instance of Alignment enumeration containing current alignment value.

 

Since: 1.0

 

 

 

setHorizontalAlignment

 

public void setHorizontalAlignment( Alignment alignment)

 

Sets the horizontal alignment for the text.

 

Parameters:
alignment-
instance of Alignment enumeration containing desired alignment value.

 

Since: 1.0

 

 

 

getHorizontalAlignment

 

public Alignment getHorizontalAlignment( )

 

Gets the horizontal alignment for the text.

 

Returns:
instance of Alignment enumeration containing current alignment value.

 

Since: 1.0

 

 

© 2005 - 2010 ArtfulBits. All rights reserved.