|
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
- public class InlineFlow
- extends
FlowFigure
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
Fields inherited from class org.eclipse.draw2d.
Figure
|
bgColor,
border,
bounds,
fgColor,
flags,
font,
MAX_FLAG,
maxSize,
minSize,
NO_MANAGER,
prefSize,
toolTip
|
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,
getClientArea,
getClientArea,
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,
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
|
InlineFlow
public InlineFlow()
addLeadingWordRequirements
public boolean addLeadingWordRequirements(int[] width)
- Iterates over the children to find the width before a line-break is encountered.
-
-
Overrides:
-
addLeadingWordRequirements
in class
FlowFigure
-
-
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:
-
FlowFigure.addLeadingWordRequirements(int[])
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 interface
IFigure
-
Overrides:
-
containsPoint
in class
Figure
-
-
Parameters:
-
x - the relative x coordinate -
y - the relative y coordinate
-
Returns:
-
true if a fragment contains the given point -
See Also:
-
IFigure.containsPoint(int, int)
createDefaultFlowLayout
protected
FlowFigureLayout createDefaultFlowLayout()
-
Description copied from class:
FlowFigure
- Creates the default layout manager
-
-
Specified by:
-
createDefaultFlowLayout
in class
FlowFigure
-
-
Returns:
- The default layout
-
See Also:
-
FlowFigure.createDefaultFlowLayout()
getFragments
public java.util.List getFragments()
- Returns the
FlowBox fragments contained in this InlineFlow. The returned
list should not be modified.
-
-
Returns:
- The fragments
paintBorder
protected void paintBorder(
Graphics graphics)
- Overridden to paint a
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.
-
-
Overrides:
-
paintBorder
in class
Figure
-
-
Parameters:
-
graphics - the graphics -
See Also:
-
Border.paint(IFigure, Graphics, Insets)
paintSelection
protected void paintSelection(
Graphics graphics)
- 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 class
FlowFigure
-
-
See Also:
-
FlowFigure.postValidate()
setBorder
public void setBorder(
Border border)
- Overridden to assert that only
FlowBorder is used. null is still a
valid value as well.
-
-
Specified by:
-
setBorder
in interface
IFigure
-
Overrides:
-
setBorder
in class
Figure
-
-
Parameters:
-
border - null or a FlowBorder -
See Also:
-
IFigure.setBorder(Border)
Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.
|
|