public class SpreadsheetCell extends Object
Constructor and Description |
---|
SpreadsheetCell(SpreadsheetView table,
android.graphics.drawable.Drawable shape,
android.graphics.drawable.Drawable selectedShape,
android.graphics.Paint borderPaint,
android.graphics.Paint textPaint,
float horizontalBorderWidth,
float verticalBorderWidth) |
SpreadsheetCell(SpreadsheetView table,
android.graphics.Paint cellPaint,
android.graphics.Paint textPaint,
android.graphics.Paint borderPaint,
float horizontalBorderWidth,
float verticalBorderWidth) |
Modifier and Type | Method and Description |
---|---|
void |
draw(android.graphics.Canvas canvas,
String text,
float leftX,
float topY,
float cellWidth,
float cellHeight,
boolean selected) |
android.graphics.Paint |
getBorderPaint() |
android.graphics.Paint |
getCellPaint() |
android.graphics.drawable.Drawable |
getDrawable() |
float |
getHorizontalBorderWidth() |
android.graphics.Paint |
getSelectedBorderPaint() |
android.graphics.Paint |
getSelectedCellPaint() |
android.graphics.drawable.Drawable |
getSelectedDrawable() |
int |
getSelectedTextColor() |
android.graphics.Paint |
getSelectedTextPaint() |
float |
getSelectedTextSize() |
int |
getTextColor() |
android.graphics.Paint |
getTextPaint() |
android.graphics.Typeface |
getTypeface() |
float |
getVerticalBorderWidth() |
void |
setBorderPaint(android.graphics.Paint paint)
Set custom paint used as the border of eachc ell
|
void |
setCellPaint(android.graphics.Paint paint)
Set custom paint to each cell
|
void |
setDrawable(android.graphics.drawable.Drawable drawable)
Set custom drawable used for each cell
|
void |
setHorizontalBorderWidth(float width)
Set the horizontal border width for each cell
|
void |
setSelectedBorderPaint(android.graphics.Paint paint)
Sets a custom paint border to a selected cell
|
void |
setSelectedCellPaint(android.graphics.Paint paint)
Set custom paint to a cell used when selected
|
void |
setSelectedDrawable(android.graphics.drawable.Drawable drawable)
Set a custom drawable used when a cell is selected
|
void |
setSelectedTextColor(int color)
Set custom color to the selected text of each cell
|
void |
setSelectedTextPaint(android.graphics.Paint paint)
Set custom paint to the selected text of each cell
|
void |
setSelectedTextSize(float size)
Set the text size of the selected text of each cell
|
void |
setSelectedTypeface(android.graphics.Typeface typeface)
Sets time in seconds for how long after touch buttons fade out
|
void |
setTextColor(int color)
Sets cusotm color to the text of each cell
|
void |
setTextPaint(android.graphics.Paint paint)
Sets custom paint parameter to the text in each cell
|
void |
setTextSize(float size)
Set the text size for the cells
|
void |
setTypeface(android.graphics.Typeface typeface)
Seta custom typeface to the text
|
void |
setVerticalBorderWidth(float width)
Set the vertical border width for each cell
|
public SpreadsheetCell(SpreadsheetView table, android.graphics.Paint cellPaint, android.graphics.Paint textPaint, android.graphics.Paint borderPaint, float horizontalBorderWidth, float verticalBorderWidth)
public SpreadsheetCell(SpreadsheetView table, android.graphics.drawable.Drawable shape, android.graphics.drawable.Drawable selectedShape, android.graphics.Paint borderPaint, android.graphics.Paint textPaint, float horizontalBorderWidth, float verticalBorderWidth)
public void setTextSize(float size)
size
- size of textpublic android.graphics.Paint getTextPaint()
public void setTextPaint(android.graphics.Paint paint)
paint
- paint for textpublic void setTypeface(android.graphics.Typeface typeface)
typeface
- typeface for textpublic android.graphics.Typeface getTypeface()
public void setSelectedTypeface(android.graphics.Typeface typeface)
typeface
- typeface for textpublic void setTextColor(int color)
color
- color of textpublic int getTextColor()
public android.graphics.Paint getSelectedTextPaint()
public void setSelectedTextPaint(android.graphics.Paint paint)
paint
- paint for textpublic void setSelectedTextColor(int color)
color
- color of textpublic int getSelectedTextColor()
public void setSelectedTextSize(float size)
size
- size of textpublic float getSelectedTextSize()
public android.graphics.Paint getBorderPaint()
public void setBorderPaint(android.graphics.Paint paint)
paint
- paint for selected borderpublic android.graphics.Paint getSelectedBorderPaint()
public void setSelectedBorderPaint(android.graphics.Paint paint)
paint
- paint for borderpublic android.graphics.Paint getCellPaint()
public void setCellPaint(android.graphics.Paint paint)
paint
- paint for cellpublic android.graphics.Paint getSelectedCellPaint()
public void setSelectedCellPaint(android.graphics.Paint paint)
paint
- paint for textpublic android.graphics.drawable.Drawable getDrawable()
public void setDrawable(android.graphics.drawable.Drawable drawable)
drawable
- drawable for each cellpublic android.graphics.drawable.Drawable getSelectedDrawable()
public void setSelectedDrawable(android.graphics.drawable.Drawable drawable)
drawable
- drawable for each cellpublic void setHorizontalBorderWidth(float width)
width
- width of borderpublic float getHorizontalBorderWidth()
public void setVerticalBorderWidth(float width)
width
- width of borderpublic float getVerticalBorderWidth()
public void draw(android.graphics.Canvas canvas, String text, float leftX, float topY, float cellWidth, float cellHeight, boolean selected)
Copyright © 2011–2014. All rights reserved.