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
Background getBackground()
    
Gets the background used to draw the stripline.
Border getBorder()
    
Gets the border 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.
int 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.
int getTextColor()
    
Gets the color used to draw the stripline text.
Font getTextFont()
    
Gets Font object that will be used to draw the text.
int getVerticalAlignment()
    
Gets the vertical alignment for the text.
double getWidth()
    
Gets the width of stripline in axis dependent units.
void setAlignment(int horizontalAlignment, int verticalAlignment)
    
Sets both the vertical and horizontal alignment for the stripline text.
void setBackground(Background background)
    
Sets the background used to draw the stripline.
void setBorder(Border border)
    
Sets the border 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(int 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 setTextColor(int color)
    
Sets the color used to draw the stripline text.
void setTextFont(Font font)
    
Sets Font object that will be used to draw the text.
void setVerticalAlignment(int 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

 

 

 

getTextColor

 

public int getTextColor( )

 

Gets the color used to draw the stripline text.

 

Returns:
integer value of stripline color.

 

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

 

 

 

setTextColor

 

public void setTextColor( int color)

 

Sets the color used to draw the stripline text.

 

Parameters:
color-
integer value desired stripline color.

 

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

 

 

 

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(Background)

 

 

 

getBackground

 

public Background getBackground( )

 

Gets the background used to draw the stripline.

 

Returns:
instance of Background that participated in drawing stripline.

 

Since: 1.0
See also: getColor()

 

 

 

setBackground

 

public void setBackground( Background background)

 

Sets the background used to draw the stripline.

 

Parameters:
background-
instance of Background that will participate in drawing stripline.

 

Since: 1.0
See also: setColor(int)

 

 

 

getBorder

 

public Border getBorder( )

 

Gets the border used to draw the stripline.

 

Returns:
instance of Border that participated in drawing stripline.

 

Since: 1.0

 

 

 

setBorder

 

public void setBorder( Border border)

 

Sets the border used to draw the stripline.

 

Parameters:
border-
instance of Border that will participate in drawing stripline.

 

Since: 1.0

 

 

 

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

 

 

 

getTextFont

 

public Font getTextFont( )

 

Gets Font object that will be used to draw the text.

 

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

 

Since: 1.0
See also: setTextColor(int)

 

 

 

setTextFont

 

public void setTextFont( Font font)

 

Sets Font object that will be used to draw the text.

 

Parameters:
font-
instance of Font object that will be used to draw the text.

 

Since: 1.0
See also: setTextColor(int)

 

 

 

setAlignment

 

public void setAlignment( int horizontalAlignment,
int verticalAlignment)

 

Sets both the vertical and horizontal alignment for the stripline 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( int alignment)

 

Sets the vertical alignment for the text.

 

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

 

Since: 1.0

 

 

 

getVerticalAlignment

 

public int getVerticalAlignment( )

 

Gets the vertical alignment for the text.

 

Returns:
instance of Alignment enumeration containing current alignment value.

 

Since: 1.0

 

 

 

setHorizontalAlignment

 

public void setHorizontalAlignment( int alignment)

 

Sets the horizontal alignment for the text.

 

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

 

Since: 1.0

 

 

 

getHorizontalAlignment

 

public int 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.