android.TICO
Class label

java.lang.Object
  extended by android.TICO.label

public class label
extends Object

Defines a label and its attributes.

Version:
1.0 Sep, 2012
Author:
Eduardo Ferrer

Field Summary
static int HORIZONTAL_FIT_TEXT_MARGIN
           
static int VERTICAL_FIT_TEXT_MARGIN
           
 
Constructor Summary
label(int marginLeft, int marginTop, int frameSize, String text, float textSize, Typeface typeface, int textStyle, Context context)
          Creates a new label.
 
Method Summary
 void addTo(RelativeLayout lay)
          Add the label to a RelativeLayout
 void setBackgroundColor(int backgroundColor, int gradient)
          Set the background color and the gradient
 void setFrameColor(int frameColor)
          Set the frame color of the label
 void setTextColor(int textColor)
          Set the color of the text
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HORIZONTAL_FIT_TEXT_MARGIN

public static final int HORIZONTAL_FIT_TEXT_MARGIN
See Also:
Constant Field Values

VERTICAL_FIT_TEXT_MARGIN

public static final int VERTICAL_FIT_TEXT_MARGIN
See Also:
Constant Field Values
Constructor Detail

label

public label(int marginLeft,
             int marginTop,
             int frameSize,
             String text,
             float textSize,
             Typeface typeface,
             int textStyle,
             Context context)
Creates a new label.

Parameters:
marginLeft - The number marginLeft of pixels of the left margin
marginTop - The number marginTop of pixels of the top margin
frameSize - The size of the frame in pixels of the label
text - The text of the label
textSize - The desired size of the text in the label
typeface - The font of the text
textStyle - The style of the text
context - The context that contains the textArea
Method Detail

setTextColor

public void setTextColor(int textColor)
Set the color of the text

Parameters:
color - The integer that defines the desired color for the text

setFrameColor

public void setFrameColor(int frameColor)
Set the frame color of the label

Parameters:
color - The color of the label frame

setBackgroundColor

public void setBackgroundColor(int backgroundColor,
                               int gradient)
Set the background color and the gradient

Parameters:
backgroundColor - The color of the background
gradient - The gradient color of the background

addTo

public void addTo(RelativeLayout lay)
Add the label to a RelativeLayout

Parameters:
lay - Relative layout that will contain the label