|
Eclipse Draw2d 3.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.draw2d.Figure
org.eclipse.draw2d.text.FlowFigure
org.eclipse.draw2d.text.InlineFlow
org.eclipse.draw2d.text.TextFlow
An inline flow that renders a sting of text across one or more lines. A TextFlow must
not have any children. It does not provide a FlowContext.
WARNING: This class is not intended to be subclassed by clients.
| Nested Class Summary |
| Nested classes inherited from class org.eclipse.draw2d.Figure |
Figure.FigureIterator, Figure.IdentitySearch |
| Nested classes inherited from class org.eclipse.draw2d.IFigure |
IFigure.NoInsets |
| Field Summary |
| Fields inherited from class org.eclipse.draw2d.Figure |
bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip |
| Fields inherited from interface org.eclipse.draw2d.IFigure |
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS |
| Constructor Summary | |
TextFlow()
Constructs a new TextFlow with the empty String. |
|
TextFlow(String s)
Constructs a new TextFlow with the specified String. |
|
| Method Summary | |
protected FlowFigureLayout |
createDefaultFlowLayout()
Creates the default layout manager |
Rectangle |
getCaretPlacement(int offset)
Returns the rectangular bounds for placing a Caret at the given offset. |
int |
getFirstOffsetForLine(int y)
Returns the first caret position which occupies the line at the given y location. |
int |
getLastOffsetForLine(int y)
Returns the last caret position which occupies the line at the given y location. |
int |
getNextOffset(Point p,
boolean down)
Returns the offset nearest the given point either up or down one line. |
int |
getOffset(Point p)
Returns the textual offset nearest the specified point. |
String |
getText()
|
boolean |
isTextTruncated()
Returns true if a portion if the text is truncated using ellipses ("..."). |
protected void |
paintFigure(Graphics g)
Paints this Figure's primary representation, or background. |
void |
setSelection(int begin,
int end)
Sets the extent of selection. |
void |
setText(String s)
Sets the string being displayed. |
| Methods inherited from class org.eclipse.draw2d.text.InlineFlow |
containsPoint, getFragments, postValidate |
| Methods inherited from class org.eclipse.draw2d.text.FlowFigure |
add, setBounds, setFlowContext |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TextFlow()
Object.Object()public TextFlow(String s)
s - the string| Method Detail |
protected FlowFigureLayout createDefaultFlowLayout()
FlowFigure
createDefaultFlowLayout in class InlineFlowInlineFlow.createDefaultFlowLayout()
public int getNextOffset(Point p,
boolean down)
p - a reference pointdown - true if the search is down
-1public Rectangle getCaretPlacement(int offset)
Caret at the given offset. The offset must be between 0 and the length of the String
being displayed.
offset - the location in this figures text
IllegalArgumentException - If the offset is not between 0 and the
length of the string inclusivelypublic int getFirstOffsetForLine(int y)
-1 is returned.
y - the baseline's y coordinate
public int getLastOffsetForLine(int y)
-1 is returned.
y - the baseline's y coordinate
public int getOffset(Point p)
-1 is returned.
Otherwise the offset will be between 0 and getText().length() inclusively.
p - a point relative to this figure
-1public String getText()
public boolean isTextTruncated()
true if a portion if the text is truncated using ellipses ("...").
true if the text is truncated with ellipsesprotected void paintFigure(Graphics g)
FigureFigure.paintClientArea(Graphics) and Figure.paintBorder(Graphics). Furthermore, it is safe
to call graphics.restoreState() within this method, and doing so will
restore the graphics to its original state upon entry.
paintFigure in class FlowFigureFigure.paintFigure(Graphics)
public void setSelection(int begin,
int end)
begin - the begin offsetend - the end offsetpublic void setText(String s)
revalidate() to occur.
s - The new String. It cannot be null.
|
Eclipse Draw2d 3.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||