org.nakedobjects.plugins.dnd.viewer.view.text
Class TitleText
java.lang.Object
org.nakedobjects.plugins.dnd.viewer.view.text.TitleText
- Direct Known Subclasses:
- ObjectTitleText
public abstract class TitleText
- extends java.lang.Object
TitleText draws the text derived from the subclass within a view. The text is properly truncated if longer
than the specified maximum width.
|
Method Summary |
void |
draw(Canvas canvas,
int x,
int baseline)
Draw this TitleText's text stating from the specified x coordination and on the specified baseline. |
void |
draw(Canvas canvas,
int x,
int baseline,
int maxWidth)
Draw this TitleText's text stating from the specified x coordination and on the specified baseline. |
Size |
getSize()
|
protected abstract java.lang.String |
title()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TitleText
public TitleText(View view,
Text style,
Color color)
draw
public void draw(Canvas canvas,
int x,
int baseline)
- Draw this TitleText's text stating from the specified x coordination and on the specified baseline.
draw
public void draw(Canvas canvas,
int x,
int baseline,
int maxWidth)
- Draw this TitleText's text stating from the specified x coordination and on the specified baseline. If
a maximum width is specified (ie it is positive) then the text drawn will not extend past that width.
- Parameters:
maxWidth - the maximum width to display the text within; if negative no limit is imposed
getSize
public Size getSize()
title
protected abstract java.lang.String title()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.