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.ReverseFigureChildrenIteratorNested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure
IFigure.NoInsets -
Field Summary
Fields inherited from class org.eclipse.draw2d.text.FlowFigure
selectionStartFields inherited from class org.eclipse.draw2d.Figure
bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTipFields inherited from interface org.eclipse.draw2d.IFigure
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddLeadingWordRequirements(int[] width) Iterates over the children to find the width before a line-break is encountered.booleancontainsPoint(int x, int y) Extended to return false if the point is not also contained by at least one fragment.protected FlowFigureLayoutCreates the default layout managerReturns theFlowBoxfragments contained in this InlineFlow.protected voidpaintBorder(Graphics graphics) Overridden to paint aFlowBorderif present, and draw selection.protected voidpaintSelection(Graphics graphics) Renders the XOR selection rectangles to the graphics.voidCalled after validate has occurred.voidOverridden to assert that onlyFlowBorderis used.Methods inherited from class org.eclipse.draw2d.text.FlowFigure
add, contributeBidi, remove, revalidateBidi, setBidiInfo, setBounds, setFlowContext, setSelectionMethods inherited from class org.eclipse.draw2d.Figure
add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, 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, handleMouseWheelScrolled, 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, removeMouseWheelListener, 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:
addLeadingWordRequirementsin 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:
containsPointin interfaceIFigure- Overrides:
containsPointin classFigure- Parameters:
x- the relative x coordinatey- the relative y coordinate- Returns:
trueif a fragment contains the given point- See Also:
-
createDefaultFlowLayout
Description copied from class:FlowFigureCreates the default layout manager- Specified by:
createDefaultFlowLayoutin classFlowFigure- Returns:
- The default layout
- See Also:
-
getFragments
Returns theFlowBoxfragments contained in this InlineFlow. The returned list should not be modified.- Returns:
- The fragments
-
paintBorder
Overridden to paint aFlowBorderif 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:
paintBorderin 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:FlowFigureCalled 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:
postValidatein classFlowFigure- See Also:
-
setBorder
Overridden to assert that onlyFlowBorderis used.nullis still a valid value as well.
-