android.TICO
Class cell

java.lang.Object
  extended by RelativeLayout
      extended by android.TICO.cell

public class cell
extends RelativeLayout

Defines a cell and its attributes.

Version:
1.0 Jan, 2012
Author:
Eduardo Ferrer

Constructor Summary
cell(Context context, int marginLeft, int marginTop, int height, int width, int imageURL, String texto, int marcoSize)
          Creates a new TCell for control options.
cell(Context context, int marginLeft, int marginTop, int height, int width, String imageURL, String texto, int marcoSize)
          Creates a new TCell.
 
Method Summary
 boolean getAccumulate()
          Get if the cell accumulates on click
 int getDestiny()
          Get the destiny board position.
 boolean getOrdered()
          Get if the cell is ordered for the automatic scan
 String getSendText()
          Get the text that the cell will send to a text area
 String getSendTextArea()
          Get the id of the textArea to send text
 int getSendTextTimer()
          Set the time the sent text will be visible before get back to the original textArea text.
 String getSound()
          get the URL of the sound
 String getSoundAlternate()
          Get the URL of the alternative sound
 String getVideo()
          Get the URL of the video
 void setAccumulate(boolean bool)
          Set if the cell accumulates on click
 void setAlternateFrameSize(int size)
          Set the alternate frame size
 void setBackgroundDrawable(GradientDrawable color)
          Set the background frame gradient color
 void setColorFrame(int color)
          Set the main frame color
 void setColorFrameAlternate(int color)
          Set the alternative frame color
 void setDestiny(int position)
          Set the destiny board or -1 if there is no destiny.
 void setImageAlternate(String url)
          Set the URL of the alternative image
 void setInteriorBackgroundColor(int color)
          Set the background frame color
 void setOrdered(boolean ordered)
          Set if the cell is ordered for the automatic scan
 void setSendText(String text)
          Set the text that the cell will send to a text area
 void setSendTextArea(String idTextArea)
          Set the id of the textArea to send text
 void setSendTextTimer(int time)
          Set the time the sent text will be visible before get back to the original textArea text.
 void setSound(String url)
          Set the URL of the sound
 void setSoundAlternate(String url)
          Set the URL of the alternative sound
 void setTextColor(int color)
          Set the color of the text
 void setTextFont(int font)
          Set the style font of the text
 void setTextSize(float size)
          Set the text size of the cell.
 void setVideo(String url)
          Set the URL of the video
 void showAlternateCell()
          Set the visible cell to the alternative color frame, alternative frame size and alternative image
 void showMainCell()
          Set the visible cell to the main color frame, main frame size, and main image
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

cell

public cell(Context context,
            int marginLeft,
            int marginTop,
            int height,
            int width,
            String imageURL,
            String texto,
            int marcoSize)
Creates a new TCell.

Parameters:
context - The context that contains the cell data
marginLeft - The number marginLeft of pixels of the left margin
marginTop - The number marginTop of pixels of the top margin
height - The height in pixels of the cell cell
width - The width in pixels of the cell cell
imageURL - The URL imageURL of the image in the cell
texto - The text texto of the cell cell
marcoSize - The size of the frame cell cell

cell

public cell(Context context,
            int marginLeft,
            int marginTop,
            int height,
            int width,
            int imageURL,
            String texto,
            int marcoSize)
Creates a new TCell for control options.

Parameters:
context - The context that contains the cell data
marginLeft - The number marginLeft of pixels of the left margin
marginTop - The number marginTop of pixels of the top margin
height - The height in pixels of the cell cell
width - The width in pixels of the cell cell
imageURL - The int identificator in R.id of the image in the cell
texto - The text texto of the cell cell
marcoSize - The size of the frame cell cell
Method Detail

setTextSize

public void setTextSize(float size)
Set the text size of the cell. If the the text doesn't fit in the cell width the text size will be reduced to fit.

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

setColorFrame

public void setColorFrame(int color)
Set the main frame color

Parameters:
color - The color of the main frame color

setColorFrameAlternate

public void setColorFrameAlternate(int color)
Set the alternative frame color

Parameters:
color - The color of the alternative frame color

setImageAlternate

public void setImageAlternate(String url)
Set the URL of the alternative image

Parameters:
url - The url of the alternative image

setSound

public void setSound(String url)
Set the URL of the sound

Parameters:
url - The url of the sound

setSoundAlternate

public void setSoundAlternate(String url)
Set the URL of the alternative sound

Parameters:
url - The url of the alternative sound

setVideo

public void setVideo(String url)
Set the URL of the video

Parameters:
url - The url url of the video

setAccumulate

public void setAccumulate(boolean bool)
Set if the cell accumulates on click

Parameters:
bool - boolean true if accumulates, otherwise false.

getSound

public String getSound()
get the URL of the sound

Returns:
The url of the sound

getSoundAlternate

public String getSoundAlternate()
Get the URL of the alternative sound

Returns:
The url of the alternative sound

getVideo

public String getVideo()
Get the URL of the video

Returns:
The url of the video

getAccumulate

public boolean getAccumulate()
Get if the cell accumulates on click

Returns:
boolean true if accumulates, otherwise false.

setDestiny

public void setDestiny(int position)
Set the destiny board or -1 if there is no destiny.

Parameters:
position - integer of the destiny board position.

getDestiny

public int getDestiny()
Get the destiny board position.

Returns:
integer of the destiny board, -1 if there is no destiny.

showMainCell

public void showMainCell()
Set the visible cell to the main color frame, main frame size, and main image


showAlternateCell

public void showAlternateCell()
Set the visible cell to the alternative color frame, alternative frame size and alternative image


setTextColor

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

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

setInteriorBackgroundColor

public void setInteriorBackgroundColor(int color)
Set the background frame color

Parameters:
color - The color of the background

setBackgroundDrawable

public void setBackgroundDrawable(GradientDrawable color)
Set the background frame gradient color

Parameters:
color - The gradient color of the background

setTextFont

public void setTextFont(int font)
Set the style font of the text

Parameters:
font - The style of the text

setAlternateFrameSize

public void setAlternateFrameSize(int size)
Set the alternate frame size

Parameters:
size - The size of the alternate frame

setOrdered

public void setOrdered(boolean ordered)
Set if the cell is ordered for the automatic scan

Parameters:
ordered - boolean true if is orderer

getOrdered

public boolean getOrdered()
Get if the cell is ordered for the automatic scan

Returns:
boolean true if is orderer

setSendText

public void setSendText(String text)
Set the text that the cell will send to a text area

Parameters:
text - The text to send

setSendTextArea

public void setSendTextArea(String idTextArea)
Set the id of the textArea to send text

Parameters:
idTextArea - the id of the textArea

setSendTextTimer

public void setSendTextTimer(int time)
Set the time the sent text will be visible before get back to the original textArea text.

Parameters:
time - the time in miliseconds

getSendText

public String getSendText()
Get the text that the cell will send to a text area

Returns:
The text to send

getSendTextArea

public String getSendTextArea()
Get the id of the textArea to send text

Returns:
The id of the textArea

getSendTextTimer

public int getSendTextTimer()
Set the time the sent text will be visible before get back to the original textArea text.

Returns:
the time in miliseconds