public abstract class FlowFigure extends Figure
WARNING: This class is not intended to be subclassed by clients. Future versions may contain additional abstract methods.
Figure.FigureIterator, Figure.IdentitySearch
IFigure.NoInsets
Modifier and Type | Field and Description |
---|---|
protected int |
selectionStart
integer indicating whether selection should be displayed.
|
bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS
Constructor and Description |
---|
FlowFigure()
Constructs a new FlowFigure.
|
Modifier and Type | Method and Description |
---|---|
void |
add(IFigure child,
java.lang.Object constraint,
int index)
If the child is a
FlowFigure , its FlowContext is passed to
it. |
boolean |
addLeadingWordRequirements(int[] width)
Calculates the width of text before the next line-break is encountered.
|
protected void |
contributeBidi(BidiProcessor proc)
FlowFigures can contribute text for their block to the given
BidiProcessor , which will process the contributions to determine
Bidi levels and shaping requirements. |
protected abstract FlowFigureLayout |
createDefaultFlowLayout()
Creates the default layout manager
|
abstract void |
postValidate()
Called after validate has occurred.
|
void |
remove(IFigure figure)
Overridden to revalidateBidi when fragments are removed.
|
protected void |
revalidateBidi(IFigure origin)
This method should be invoked whenever a change that can potentially
affect the Bidi evaluation is made (eg., adding or removing children,
changing text, etc.).
|
void |
setBidiInfo(BidiInfo info)
Sets the bidi information for this figure.
|
void |
setBounds(Rectangle r)
FlowFigures override setBounds() to prevent translation of children.
|
void |
setFlowContext(FlowContext flowContext)
Sets the flow context.
|
void |
setSelection(int start,
int end)
Sets the selection or a range of selection.
|
add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, 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, paintBorder, paintChildren, paintClientArea, paintFigure, primTranslate, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, 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
protected int selectionStart
public void add(IFigure child, java.lang.Object constraint, int index)
FlowFigure
, its FlowContext is passed to
it.add
in interface IFigure
add
in class Figure
child
- The IFigure to addconstraint
- The newly added IFigure's constraintindex
- The index where the IFigure should be addedIFigure.add(IFigure, Object, int)
public boolean addLeadingWordRequirements(int[] width)
Default implementation treats each FlowFigure as a line-break. It adds no
width and returns true
. Sub-classes should override as
needed.
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 arrayprotected void contributeBidi(BidiProcessor proc)
BidiProcessor
, which will process the contributions to determine
Bidi levels and shaping requirements.
This method is invoked as part of validating Bidi.
Sub-classes that cache the BidiInfo and/or the bidi level in ContentBoxes should clear the cached values when this method is invoked.
proc
- the BidiProcessor to which contributions should be madeBidiProcessor.add(FlowFigure, String)
protected abstract FlowFigureLayout createDefaultFlowLayout()
public abstract void postValidate()
public void remove(IFigure figure)
remove
in interface IFigure
remove
in class Figure
figure
- The Figure to removeIFigure.remove(org.eclipse.draw2d.IFigure)
protected void revalidateBidi(IFigure origin)
The default implementation delegates the revalidation task to the parent.
Only blocks
perform the actual
revalidation.
The given IFigure is the one that triggered the revalidation. This can be used to optimize bidi evaluation.
origin
- the figure that was revalidatedpublic void setBidiInfo(BidiInfo info)
contributeBidi(BidiProcessor)
. If the figure contributes
text associated with it, this method is called back to indicate the bidi
properties for that text within its block.info
- the BidiInfo for this figurepublic void setBounds(Rectangle r)
setBounds
in interface IFigure
setBounds
in class Figure
r
- The new boundsFigure.setBounds(Rectangle)
public void setFlowContext(FlowContext flowContext)
flowContext
- the flow context for this flow figurepublic void setSelection(int start, int end)
start
- the start offsetend
- the end offsetCopyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.