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

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

Declaration: public abstract class ChartPointAttributes extends Object
Direct Subclasses: ChartPoint, ChartSeries

 

Represents attributes class.
XML Attributes
backgroundDefines background resource
filterDefines whether color filter is enabled
markerDefines marker resource
markersizeDefines marker size
showlabelDefines whether labels is shown
colorDefines background color
borderDefines border color
linewidthDefines line/border width
halignDefines labels horizontal alignment
valignDefines labels vertical alignment

 

Since: 1.0

 

 

Constructors Summary
ChartPointAttributes()
    

 

 

Methods Summary
<TValue> TValue getAttribute(ChartCustomAttribute<TValue> attribute)
    
Gets the attribute.
int getBackColor()
    
Gets color.
android.graphics.drawable.Drawable getBackDrawable()
    
Sets the drawable used to draw this element.
int getBorderColor()
    
Gets the color of element's border.
Alignment getHLabelAlignment()
    
Gets the horizontal alignment for this element's label.
java.lang.String getLabel()
    
Gets the string representation of label.
android.graphics.drawable.Drawable getLabelBackground()
    
Gets android.graphics.drawable.Drawable used to draw background of label of point.
java.lang.String getLabelFormat()
    
Gets label formatting string.
java.lang.Integer getLabelPadding()
    
Gets padding for label of this element.
int getLineWidth()
    
Gets the line width.
android.graphics.drawable.Drawable getMarkerDrawable()
    
Gets drawable that is used to draw the marker of this element.
android.graphics.Point getMarkerSize()
    
Gets size of marker for this element.
android.graphics.PathEffect getPathEffect()
    
Gets the line path effect.
boolean getShowLabel()
    
Gets value indicating whether label should be shown for this element.
java.lang.Object getTag()
    
Gets the tag.
android.graphics.Paint getTextPaint()
    
Gets instance of android.graphics.Paint object used to draw text.
Alignment getVLabelAlignment()
    
Gets the vertical alignment for element's label.
boolean isBackFilterEnabled()
    
Gets value indicating whether point's color is to be drawn on top of specified point's drawbale.
void reset()
    
Clear values of all attributes.
<TValue> void setAttribute(ChartCustomAttribute<TValue> attribute, TValue value)
    
Sets the attribute.
void setBackColor(java.lang.Integer color)
    
Sets the color.
void setBackDrawable(android.graphics.drawable.Drawable drawable)
    
Gets the drawable that is used to draw this element.
void setBackFilterEnabled(java.lang.Boolean value)
    
Sets value indicating whether point's color is to be drawn on top of specified point's drawbale.
void setBorderColor(java.lang.Integer color)
    
Sets the color of element's border.
void setHLabelAlignment(Alignment alignment)
    
Sets the horizontal alignment for element's label.
void setLabel(java.lang.String label)
    
Sets the string representation of label.
void setLabelBackground(android.graphics.drawable.Drawable drawable)
    
Sets android.graphics.drawable.Drawable used to draw background of label of point.
void setLabelFormat(java.lang.String pattern)
    
Sets the advanced label formatting string for the data point.
void setLabelPadding(java.lang.Integer padding)
    
Sets padding for label of this element.
void setLineWidth(java.lang.Integer width)
    
Sets the line width.
void setMarkerDrawable(android.graphics.drawable.Drawable drawable)
    
Gets drawable that is used to draw the marker of this element.
void setMarkerPaint(android.graphics.Paint paint)
    
Sets instance of android.graphics.Paint object used to draw text.
void setMarkerSize(android.graphics.Point size)
    
Gets the size of marker for this element.
void setPathEffect(android.graphics.PathEffect effect)
    
Sets the line path effect.
void setShowLabel(java.lang.Boolean value)
    
Gets value indicating whether label should be shown for this element.
void setTag(java.lang.Object tag)
    
Sets the tag.
void setVLabelAlignment(Alignment alignment)
    
Sets the vertical alignment for element's label.

 

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

 

 

 

 

ChartPointAttributes

 

public ChartPointAttributes( )

 

 

 

 

setAttribute

 

public <TValue> void setAttribute( ChartCustomAttribute<TValue> attribute,
TValue value)

 

Sets the attribute.

 

Parameters:
attribute-
instance of ChartCustomAttribute class.
value-
value of attribute.

 

Since: 1.0
See also: getAttribute(ChartCustomAttribute)

 

 

 

getAttribute

 

public <TValue> TValue getAttribute( ChartCustomAttribute<TValue> attribute)

 

Gets the attribute.

 

Parameters:
attribute-
instance of previously set attribute.
Returns:
value of attribute.

 

Since: 1.0
See also: setAttribute(ChartCustomAttribute,TValue)

 

 

 

getBackColor

 

public int getBackColor( )

 

Gets color.

 

Returns:
value of color

 

Since: 1.0
See also: setBackColor(Integer)

 

 

 

setBackColor

 

public void setBackColor( java.lang.Integer color)

 

Sets the color.

 

Parameters:
color-
color to draw point.

 

Since: 1.0
See also: getBackColor()

 

 

 

setTag

 

public void setTag( java.lang.Object tag)

 

Sets the tag.

 

Parameters:
tag-
value of tag.

 

Since: 1.0
See also: getTag()

 

 

 

getTag

 

public java.lang.Object getTag( )

 

Gets the tag.

 

Returns:
value of tag.

 

Since: 1.0
See also: setTag(Object)

 

 

 

getBackDrawable

 

public android.graphics.drawable.Drawable getBackDrawable( )

 

Sets the drawable used to draw this element.

 

Returns:
instance of android.graphics.drawable.Drawable used to draw this element.

 

Since: 1.0
See also: setBackDrawable(Drawable)

 

 

 

setBackDrawable

 

public void setBackDrawable( android.graphics.drawable.Drawable drawable)

 

Gets the drawable that is used to draw this element.

 

Parameters:
drawable-
instance of android.graphics.drawable.Drawable used to draw this element.

 

Since: 1.0
See also: getBackDrawable()

 

 

 

getLabelBackground

 

public android.graphics.drawable.Drawable getLabelBackground( )

 

Gets android.graphics.drawable.Drawable used to draw background of label of point.

 

Since: 1.0

 

 

 

setLabelBackground

 

public void setLabelBackground( android.graphics.drawable.Drawable drawable)

 

Sets android.graphics.drawable.Drawable used to draw background of label of point.

 

Parameters:
drawable-
instance of android.graphics.drawable.Drawable class that should be used to draw background of label of point.

 

Since: 1.0

 

 

 

getLabelPadding

 

public java.lang.Integer getLabelPadding( )

 

Gets padding for label of this element.

 

Returns:
value of padding.

 

Since: 1.0
See also: setLabelPadding(Integer)

 

 

 

setLabelPadding

 

public void setLabelPadding( java.lang.Integer padding)

 

Sets padding for label of this element.

 

Parameters:
padding-
value of padding.

 

Since: 1.0
See also: getLabelPadding()

 

 

 

setMarkerPaint

 

public void setMarkerPaint( android.graphics.Paint paint)

 

Sets instance of android.graphics.Paint object used to draw text.

 

Parameters:
paint-
of android.graphics.Paint object used to draw text.

 

Since: 1.0

 

 

 

getTextPaint

 

public android.graphics.Paint getTextPaint( )

 

Gets instance of android.graphics.Paint object used to draw text.

 

Returns:
instance of android.graphics.Paint object used to draw text.

 

Since: 1.0

 

 

 

getMarkerDrawable

 

public android.graphics.drawable.Drawable getMarkerDrawable( )

 

Gets drawable that is used to draw the marker of this element.

 

Returns:
instance of android.graphics.drawable.Drawable.

 

Since: 1.0
See also: setMarkerDrawable(Drawable)

 

 

 

setMarkerDrawable

 

public void setMarkerDrawable( android.graphics.drawable.Drawable drawable)

 

Gets drawable that is used to draw the marker of this element.

 

Parameters:
drawable-
instance of android.graphics.drawable.Drawable.

 

Since: 1.0
See also: getMarkerDrawable()

 

 

 

getMarkerSize

 

public android.graphics.Point getMarkerSize( )

 

Gets size of marker for this element.

 

Returns:
instance of android.graphics.Point representing marker size.

 

Since: 1.0
See also: getMarkerSize()

 

 

 

setMarkerSize

 

public void setMarkerSize( android.graphics.Point size)

 

Gets the size of marker for this element.

 

Parameters:
size-
instance of android.graphics.Point representing marker size.

 

Since: 1.0
See also: getMarkerSize()

 

 

 

getHLabelAlignment

 

public Alignment getHLabelAlignment( )

 

Gets the horizontal alignment for this element's label.

 

Returns:
instance of current alignment.

 

Since: 1.0
See also: setHLabelAlignment(Alignment)

 

 

 

setHLabelAlignment

 

public void setHLabelAlignment( Alignment alignment)

 

Sets the horizontal alignment for element's label.

 

Parameters:
alignment-
instance of desired alignment.

 

Since: 1.0
See also: getHLabelAlignment()

 

 

 

getVLabelAlignment

 

public Alignment getVLabelAlignment( )

 

Gets the vertical alignment for element's label.

 

Returns:
instance of current alignment.

 

Since: 1.0
See also: setVLabelAlignment(Alignment)

 

 

 

setVLabelAlignment

 

public void setVLabelAlignment( Alignment alignment)

 

Sets the vertical alignment for element's label.

 

Parameters:
alignment-
instance of Alignment enumeration that represents the alignment.

 

Since: 1.0
See also: getVLabelAlignment()

 

 

 

getBorderColor

 

public int getBorderColor( )

 

Gets the color of element's border.

 

Returns:
value of color.

 

Since: 1.0
See also: setBackColor(Integer)

 

 

 

setBorderColor

 

public void setBorderColor( java.lang.Integer color)

 

Sets the color of element's border.

 

Parameters:
color-
value of color for border.

 

Since: 1.0
See also: getBackColor()

 

 

 

getLineWidth

 

public int getLineWidth( )

 

Gets the line width.

 

Returns:
current width of line.

 

Since: 1.0
See also: setLineWidth(Integer)

 

 

 

setLineWidth

 

public void setLineWidth( java.lang.Integer width)

 

Sets the line width.

 

Parameters:
width-
value of desired width.

 

Since: 1.0
See also: getLineWidth()

 

 

 

setPathEffect

 

public void setPathEffect( android.graphics.PathEffect effect)

 

Sets the line path effect.

 

Parameters:
effect-
android.graphics.PathEffect instance.

 

Since: 1.5.0.2

 

 

 

getPathEffect

 

public android.graphics.PathEffect getPathEffect( )

 

Gets the line path effect.

 

Returns:
current android.graphics.PathEffect instance.

 

Since: 1.5.0.2

 

 

 

getShowLabel

 

public boolean getShowLabel( )

 

Gets value indicating whether label should be shown for this element.

 

Returns:
true if label should be shown for point, otherwise false.

 

Since: 1.0
See also: setShowLabel(Boolean)

 

 

 

setShowLabel

 

public void setShowLabel( java.lang.Boolean value)

 

Gets value indicating whether label should be shown for this element.

 

Parameters:
value-
true if label should be shown for point, otherwise false.

 

Since: 1.0
See also: getShowLabel()

 

 

 

getLabel

 

public java.lang.String getLabel( )

 

Gets the string representation of label.

 

Returns:
java.lang.String value of label.

 

Since: 1.0
See also: setLabel(String)

 

 

 

setLabel

 

public void setLabel( java.lang.String label)

 

Sets the string representation of label.

 

Parameters:
label-
java.lang.String label value.

 

Since: 1.0
See also: getLabel()

 

 

 

getLabelFormat

 

public java.lang.String getLabelFormat( )

 

Gets label formatting string.

 

Returns:
instance of java.lang.String that is used to format labels.

 

Since: 1.0

 

 

 

setLabelFormat

 

public void setLabelFormat( java.lang.String pattern)

 

Sets the advanced label formatting string for the data point. aiCharts analyzes passed string for formatting keywords.

 

Parameters:
pattern-
- string analyzed for occurrence keyword substrings.
Keyword format: {PERCENT0,#.##}
"{","}" - identifies start and end of keyword.
"PERCENT" - keyword name. See table below for available keywords.
"0" - optional index of Y value (0 if not specified).
"#.##" - formatting part applied to double values (optional).
"," - identifies that "#.##" format is used.
Available keywords
keyworddescriptionsupports indicesvalue format
LABELlabel of point--
XVALUEX value of point-decimal format
XDATEX date value of point-date format
YVALUEY value of point+decimal format
SERIESNAMEname of series--
INDEXindex of point--
AXISLABELaxis label of point--
PERCENTpercentage of the Y point value+decimal format

 

Since: 1.0

 

 

 

isBackFilterEnabled

 

public boolean isBackFilterEnabled( )

 

Gets value indicating whether point's color is to be drawn on top of specified point's drawbale.

 

Returns:
true if point's color is to be drawn on top of specified point's drawbale, otherwise false.

 

Since: 1.0

 

 

 

setBackFilterEnabled

 

public void setBackFilterEnabled( java.lang.Boolean value)

 

Sets value indicating whether point's color is to be drawn on top of specified point's drawbale.

 

Parameters:
value-

 

Since: 1.0

 

 

 

reset

 

public void reset( )

 

Clear values of all attributes.

 

Since: 1.0

 

 

© 2005 - 2010 ArtfulBits. All rights reserved.