Eclipse Draw2d
2.1

org.eclipse.draw2d.text
Class TextFlow

java.lang.Object
  |
  +--org.eclipse.draw2d.Figure
        |
        +--org.eclipse.draw2d.text.FlowFigure
              |
              +--org.eclipse.draw2d.text.InlineFlow
                    |
                    +--org.eclipse.draw2d.text.TextFlow
All Implemented Interfaces:
IFigure

public class TextFlow
extends InlineFlow

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.

Since:
2.1

Nested Class Summary
 
Nested classes inherited from class org.eclipse.draw2d.Figure
Figure.FigureIterator
 
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
 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 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 org.eclipse.draw2d.Figure
add, add, add, addAncestorListener, addFigureListener, addFocusListener, addKeyListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocalBackgroundColor, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isEnabled, isFocusTraversable, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, paint, paintBorder, paintChildren, paintClientArea, primTranslate, remove, removeAll, removeAncestorListener, removeFigureListener, removeFocusListener, removeKeyListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setConstraint, setCursor, setEnabled, setFlag, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, useLocalCoordinates, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextFlow

public TextFlow()
Constructs a new TextFlow with the empty String.

See Also:
Object.Object()

TextFlow

public TextFlow(String s)
Constructs a new TextFlow with the specified String.

Parameters:
s - the string
Method Detail

createDefaultFlowLayout

protected FlowFigureLayout createDefaultFlowLayout()
Description copied from class: FlowFigure
Creates the default layout manager

Overrides:
createDefaultFlowLayout in class InlineFlow
See Also:
InlineFlow.createDefaultFlowLayout()

getText

public String getText()
Returns:
the String being displayed

isTextTruncated

public boolean isTextTruncated()
Returns true if a portion if the text is truncated using ellipses ("...").

Returns:
true if the text is truncated with ellipses

paintFigure

protected void paintFigure(Graphics g)
Description copied from class: Figure
Paints this Figure's primary representation, or background. Changes made to the graphics to the graphics current state will not affect the subsequent calls to Figure.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.

Overrides:
paintFigure in class FlowFigure
See Also:
Figure.paintFigure(Graphics)

setText

public void setText(String s)
Sets the string being displayed. Causes a revalidate() to occur.

Parameters:
s - The new String. It cannot be null.

Eclipse Draw2d
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.