public class InlineFlow extends FlowFigure
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.
Figure.FigureIterator, Figure.IdentitySearch
IFigure.NoInsets
selectionStart
bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS
Constructor and Description |
---|
InlineFlow() |
Modifier and Type | Method and Description |
---|---|
boolean |
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 |
createDefaultFlowLayout()
Creates the default layout manager
|
java.util.List |
getFragments()
Returns the
FlowBox fragments contained in this InlineFlow. |
protected void |
paintBorder(Graphics graphics)
Overridden to paint a
FlowBorder if present, and draw selection. |
protected void |
paintSelection(Graphics graphics)
Renders the XOR selection rectangles to the graphics.
|
void |
postValidate()
Called after validate has occurred.
|
void |
setBorder(Border border)
Overridden to assert that only
FlowBorder is used. |
add, contributeBidi, remove, revalidateBidi, setBidiInfo, setBounds, setFlowContext, setSelection
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, getClientArea, getClientArea, getClippingStrategy, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, 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, 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
public boolean addLeadingWordRequirements(int[] width)
addLeadingWordRequirements
in class FlowFigure
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 arrayFlowFigure.addLeadingWordRequirements(int[])
public boolean containsPoint(int x, int y)
containsPoint
in interface IFigure
containsPoint
in class Figure
x
- the relative x coordinatey
- the relative y coordinatetrue
if a fragment contains the given pointIFigure.containsPoint(int, int)
protected FlowFigureLayout createDefaultFlowLayout()
FlowFigure
createDefaultFlowLayout
in class FlowFigure
FlowFigure.createDefaultFlowLayout()
public java.util.List getFragments()
FlowBox
fragments contained in this InlineFlow.
The returned list should not be modified.protected void paintBorder(Graphics graphics)
FlowBorder
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.paintBorder
in class Figure
graphics
- the graphicsBorder.paint(IFigure, Graphics, Insets)
protected void paintSelection(Graphics graphics)
graphics
- the graphics to paint onpublic void postValidate()
FlowFigure
postValidate
in class FlowFigure
FlowFigure.postValidate()
public void setBorder(Border border)
FlowBorder
is used.
null
is still a valid value as well.setBorder
in interface IFigure
setBorder
in class Figure
border
- null
or a FlowBorderIFigure.setBorder(Border)
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.