android.TICO
Class textArea

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

public class textArea
extends Object

Defines a textArea and its attributes.

Version:
1.0 Sep, 2012
Author:
Eduardo Ferrer

Constructor Summary
textArea(int marginLeft, int marginTop, int width, int height, int frameSize, String id, Context context)
          Creates a new textArea.
 
Method Summary
 void addTo(RelativeLayout lay)
          Add the textArea to a RelativeLayout
 void alignText(int ha, int va)
          Set the alignment of the text inside the text Area
 String getId()
          Return the identifier of this textArea.
 void sendText(String newtext, int time)
          Change temporally the text shown in the text area.
 void setBackgroundColor(int backgroundColor, int gradient)
          Set the background color and the gradient
 void setBorderWidth(int frameSize)
          Set the border line with of the textArea
 void setFrameColor(int frameColor)
          Set the frame color of the text area
 void setText(String text)
          Set the text of the text area
 void setTextColor(int textColor)
          Set the color of the text
 void setTextSize(float textSize)
          Set the text size of the textArea.
 void setTypeface(Typeface typeface, int textStyle)
          Set the font and style of the text
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

textArea

public textArea(int marginLeft,
                int marginTop,
                int width,
                int height,
                int frameSize,
                String id,
                Context context)
Creates a new textArea.

Parameters:
marginLeft - The number marginLeft of pixels of the left margin
marginTop - The number marginTop of pixels of the top margin
height - The width in pixels of the textArea
width - The height in pixels of the textArea
frameSize - The size of the frame in pixels of the textArea
id - The id identificator of the textArea
context - The context that contains the textArea
Method Detail

setTextSize

public void setTextSize(float textSize)
Set the text size of the textArea.

Parameters:
textSize - The desired size of the text in the cell

setTextColor

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

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

setText

public void setText(String text)
Set the text of the text area

Parameters:
text -

setTypeface

public void setTypeface(Typeface typeface,
                        int textStyle)
Set the font and style of the text

Parameters:
typeface - The font of the text
textStyle - int whith the text style

alignText

public void alignText(int ha,
                      int va)
Set the alignment of the text inside the text Area

Parameters:
ha - the horizontal alignment. 0 center, 2 left, 4 right. Otherwise center.
va - the vertical alignment. 0 center, 1 top, 3 bottom. Otherwise center.

setFrameColor

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

Parameters:
color - The color of the text area frame

setBorderWidth

public void setBorderWidth(int frameSize)
Set the border line with of the textArea

Parameters:
frameSize - border with in pixels

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 textArea to a RelativeLayout

Parameters:
lay - Relative layout that will contain the textArea

sendText

public void sendText(String newtext,
                     int time)
Change temporally the text shown in the text area. While a sent text is shown we ignore the other sending text until the original text is restored

Parameters:
newtext - the new text to show.
time - Time to restore the original text of the text area.

getId

public String getId()
Return the identifier of this textArea. Is used to select the text area to send a text.

Returns:
the identifier of the textArea