public class BlockFlow extends FlowFigure
FlowFigure represented by a single BlockBox containing
one or more lines. A BlockFlow is a creator of LineBoxes, which its children
require during layout. A BlockFlow can be thought of as a foundation for a
paragraph.
BlockFlows must be parented by a FlowFigure. FlowPage
can be used as a "root" block and can be parented by normal Figures.
Only FlowFigures can be added to a BlockFlow.
WARNING: This class is not intended to be subclassed by clients.
Figure.FigureIterator, Figure.IdentitySearchIFigure.NoInsetsselectionStartbgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTipMAX_DIMENSION, MIN_DIMENSION, NO_INSETS| Constructor and Description |
|---|
BlockFlow()
Constructs a new BlockFlow.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
contributeBidi(BidiProcessor proc)
BlockFlows contribute a paragraph separator so as to keep the Bidi state
of the text on either side of this block from affecting each other.
|
protected FlowFigureLayout |
createDefaultFlowLayout()
Creates the default layout manager
|
protected BlockBox |
getBlockBox()
Returns the BlockBox associated with this.
|
int |
getHorizontalAligment()
Returns the effective horizontal alignment.
|
int |
getLocalHorizontalAlignment()
Returns the horizontal alignment set on this block.
|
int |
getLocalOrientation()
Returns the orientation set on this block.
|
int |
getOrientation()
Returns this block's Bidi orientation.
|
void |
paintBorder(Graphics graphics)
Paints the border associated with this Figure, if one exists.
|
void |
postValidate()
Called after validate has occurred.
|
void |
revalidate()
Invalidates this figure and revalidates() its parent.
|
protected void |
revalidateBidi(IFigure origin)
A Block will invalidate the Bidi state of all its children, so that it is
re-evaluated when this block is next validated.
|
void |
setHorizontalAligment(int value)
Sets the horitontal aligment of the block.
|
void |
setOrientation(int orientation)
Sets the orientation for this block.
|
protected boolean |
useLocalCoordinates()
Returns
true if this Figure uses local coordinates. |
void |
validate()
Re-evaluate the Bidi state of all the fragments if it has been
invalidated.
|
add, addLeadingWordRequirements, remove, setBidiInfo, setBounds, setFlowContext, setSelectionadd, 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, paintChildren, paintClientArea, paintFigure, primTranslate, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, 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, translateToRelativeprotected void contributeBidi(BidiProcessor proc)
contributeBidi in class FlowFigureproc - the BidiProcessor to which contributions should be madeFlowFigure.contributeBidi(org.eclipse.draw2d.text.BidiProcessor)protected FlowFigureLayout createDefaultFlowLayout()
FlowFigurecreateDefaultFlowLayout in class FlowFigureFlowFigure.createDefaultFlowLayout()protected BlockBox getBlockBox()
public int getHorizontalAligment()
PositionConstants.NONE. If the value is none, it will return the
inherited alignment. If no alignment was inherited, it will return the
default alignment (PositionConstants.LEFT).public int getLocalOrientation()
setOrientation(int)public int getLocalHorizontalAlignment()
setHorizontalAligment(int)public int getOrientation()
setOrientation(int)public void paintBorder(Graphics graphics)
FigurepaintBorder in class Figuregraphics - The Graphics used to paintFigure.paintBorder(org.eclipse.draw2d.Graphics)public void postValidate()
FlowFigurepostValidate in class FlowFigureFlowFigure.postValidate()public void revalidate()
IFigurerevalidate in interface IFigurerevalidate in class FigureFigure.revalidate()protected void revalidateBidi(IFigure origin)
revalidateBidi in class FlowFigureorigin - the figure that was revalidatedFlowFigure.revalidateBidi(org.eclipse.draw2d.IFigure)public void setHorizontalAligment(int value)
NONE - (default) Alignment is
inherited from parent. If a parent is not found then LEFT is used.PositionConstants.LEFT - Alignment is with leading edgePositionConstants.RIGHT - Alignment is with trailing edgePositionConstants.CENTERPositionConstants.ALWAYS_LEFT - Left, irrespective of
orientationPositionConstants.ALWAYS_RIGHT - Right, irrespective of
orientationvalue - the aligmentgetHorizontalAligment()public void setOrientation(int orientation)
SWT.LEFT_TO_RIGHT
SWT.RIGHT_TO_LEFT
SWT.NONE (default)
NONE is used to indicate that orientation should be
inherited from the encompassing block.orientation - LTR, RTL or NONEgetOrientation()protected boolean useLocalCoordinates()
Figuretrue if this Figure uses local coordinates. This
means its children are placed relative to this Figure's top-left corner.useLocalCoordinates in class Figuretrue if this Figure uses local coordinatesFigure.useLocalCoordinates()public void validate()
validate in interface IFigurevalidate in class FigureIFigure.validate()Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.