Package org.eclipse.draw2d.text
Class InlineFlow
java.lang.Object
org.eclipse.draw2d.Figure
org.eclipse.draw2d.text.FlowFigure
org.eclipse.draw2d.text.InlineFlow
- All Implemented Interfaces:
IFigure
- Direct Known Subclasses:
TextFlow
A
FlowFigure
represented by multiple LineBox
fragments. An InlineFlow
's parent must be either a
BlockFlow
or another InlineFlow.
An InlineFlow may contain other InlineFlow figures.
WARNING: This class is not intended to be subclassed by clients.
- Since:
- 2.0
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.draw2d.Figure
Figure.FigureIterator, Figure.IdentitySearch, Figure.ReverseFigureChildrenIterator
Nested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure
IFigure.NoInsets
-
Field Summary
Fields inherited from class org.eclipse.draw2d.text.FlowFigure
selectionStart
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
addLeadingWordRequirements
(int[] width) Iterates over the children to find the width before a line-break is encountered.boolean
containsPoint
(int x, int y) Extended to return false if the point is not also contained by at least one fragment.protected FlowFigureLayout
Creates the default layout managerReturns theFlowBox
fragments contained in this InlineFlow.protected void
paintBorder
(Graphics graphics) Overridden to paint aFlowBorder
if present, and draw selection.protected void
paintSelection
(Graphics graphics) Renders the XOR selection rectangles to the graphics.void
Called after validate has occurred.void
Overridden to assert that onlyFlowBorder
is used.Methods inherited from class org.eclipse.draw2d.text.FlowFigure
add, contributeBidi, remove, revalidateBidi, setBidiInfo, setBounds, setFlowContext, setSelection
Methods inherited from class org.eclipse.draw2d.Figure
add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getChildrenRevIterable, getClientArea, getClientArea, getClippingStrategy, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getListenersIterable, getLocalBackgroundColor, getLocalFont, 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, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, optimizeClip, paint, paintChildren, paintClientArea, paintFigure, primTranslate, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setClippingStrategy, 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
-
Constructor Details
-
InlineFlow
public InlineFlow()
-
-
Method Details
-
addLeadingWordRequirements
public boolean addLeadingWordRequirements(int[] width) Iterates over the children to find the width before a line-break is encountered.- Overrides:
addLeadingWordRequirements
in classFlowFigure
- Parameters:
width
- the width before the next line-break (if one's found; all the width, otherwise) will be added on to the first int in the given array- Returns:
- boolean indicating whether or not a line-break was found
- See Also:
-
containsPoint
public boolean containsPoint(int x, int y) Extended to return false if the point is not also contained by at least one fragment.- Specified by:
containsPoint
in interfaceIFigure
- Overrides:
containsPoint
in classFigure
- Parameters:
x
- the relative x coordinatey
- the relative y coordinate- Returns:
true
if a fragment contains the given point- See Also:
-
createDefaultFlowLayout
Description copied from class:FlowFigure
Creates the default layout manager- Specified by:
createDefaultFlowLayout
in classFlowFigure
- Returns:
- The default layout
- See Also:
-
getFragments
Returns theFlowBox
fragments contained in this InlineFlow. The returned list should not be modified.- Returns:
- The fragments
-
paintBorder
Overridden to paint aFlowBorder
if present, and draw selection. The border is painted first, followed by selection which is generally done in XOR, which still allows the border to be seen.- Overrides:
paintBorder
in classFigure
- Parameters:
graphics
- the graphics- See Also:
-
paintSelection
Renders the XOR selection rectangles to the graphics.- Parameters:
graphics
- the graphics to paint on- Since:
- 3.1
-
postValidate
public void postValidate()Description copied from class:FlowFigure
Called after validate has occurred. This is used to update the bounds of the FlowFigure to encompass its new flow boxed created during validate.- Specified by:
postValidate
in classFlowFigure
- See Also:
-
setBorder
Overridden to assert that onlyFlowBorder
is used.null
is still a valid value as well.
-