public class CalendarTextElement extends CalendarElement
BOTTOM, CENTER, CENTER_HORIZONTAL, CENTER_VERTICAL, LEFT, RIGHT, TOP
Constructor and Description |
---|
CalendarTextElement(RadCalendarView owner)
Creates a new instance of the
CalendarTextElement class. |
Modifier and Type | Method and Description |
---|---|
void |
arrange(int left,
int top,
int right,
int bottom)
Used to arrange the current element instance according to the given dimensions.
|
String |
getText()
Gets the current text.
|
int |
getTextColor()
Gets the current text color.
|
int |
getTextColorDisabled()
Gets the color to be used when the element is disabled.
|
int |
getTextColorEnabled()
Gets the color to be used when the element is enabled.
|
Paint |
getTextPaint()
Gets the current paint.
|
int |
getTextPosition()
Gets the current position of the text.
|
float |
getTextSize()
Gets the current text size.
|
Typeface |
getTypeface()
Gets the current typeface.
|
void |
render(Canvas canvas)
This method is called at onDraw() call from the main calendar view instance and is used for drawing all custom elements building the calendar structure.
|
void |
setEnabled(boolean enabled)
Sets a value determining whether the current element is enabled.
|
void |
setPadding(int left,
int top,
int right,
int bottom)
Sets the padding for the current element.
|
void |
setText(String text)
Sets the current text.
|
void |
setTextColor(int color)
Sets the current text color.
|
void |
setTextColor(int colorEnabled,
int colorDisabled)
Sets the current text color for both the enabled and the disabled states.
|
void |
setTextColorDisabled(int color)
Sets the color to be used when the element is disabled.
|
void |
setTextColorEnabled(int color)
Sets the color to be used when the element is enabled.
|
void |
setTextPaint(Paint paint)
Sets the current paint.
|
void |
setTextPosition(int textPosition)
Sets the current position of the text.
|
void |
setTextSize(float textSize)
Sets the current text size.
|
void |
setTypeface(Typeface typeface)
Sets the current typeface.
|
int |
textPositionX() |
int |
textPositionY() |
calcBorderRect, getAlpha, getBackgroundColorDisabled, getBackgroundColorEnabled, getBitmap, getBitmapPosition, getBottom, getHeight, getLeft, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getRight, getTop, getVirtualOffsetX, getVirtualOffsetY, getVisibility, getWidth, isEnabled, pointIsInsideElement, postRender, setAlpha, setBackgroundColor, setBackgroundColorDisabled, setBackgroundColorEnabled, setBitmap, setBitmapPosition, setPaddingHorizontal, setPaddingVertical, setParent, setVirtualOffsets, setVirtualOffsetX, setVirtualOffsetY, setVisibility, translate, virtualBottom, virtualLeft, virtualRight, virtualTop, virtualTranslate
public CalendarTextElement(RadCalendarView owner)
CalendarTextElement
class.owner
- the current calendar instance owning the element.public int textPositionX()
public int textPositionY()
public int getTextColorEnabled()
public void setTextColorEnabled(int color)
color
- the new enabled color.public int getTextColorDisabled()
public void setTextColorDisabled(int color)
color
- the new disabled color.public int getTextPosition()
public void setTextPosition(int textPosition)
textPosition
- the new position.public int getTextColor()
public void setTextColor(int color)
color
- the new text color.public void setPadding(int left, int top, int right, int bottom)
CalendarElement
setPadding
in class CalendarElement
left
- the new left padding.top
- the new top padding.right
- the new right padding.bottom
- the new bottom padding.public void setTextColor(int colorEnabled, int colorDisabled)
colorEnabled
- the text color enabled.colorDisabled
- the text color disabled.public float getTextSize()
public void setTextSize(float textSize)
textSize
- the new text size.public Typeface getTypeface()
public void setTypeface(Typeface typeface)
typeface
- the new typeface.public String getText()
public void setText(String text)
text
- the new text.public Paint getTextPaint()
public void setTextPaint(Paint paint)
paint
- the new paint.public void setEnabled(boolean enabled)
CalendarElement
setEnabled
in class CalendarElement
enabled
- the new enabled state.public void arrange(int left, int top, int right, int bottom)
CalendarElement
arrange
in class CalendarElement
left
- the left border.top
- the top border.right
- the right border.bottom
- the bottom border.public void render(Canvas canvas)
CalendarElement
render
in class CalendarElement
canvas
- the canvas of the main calendar view instance.