Package org.eclipse.draw2d.text
Class BlockFlow
java.lang.Object
org.eclipse.draw2d.Figure
org.eclipse.draw2d.text.FlowFigure
org.eclipse.draw2d.text.BlockFlow
- All Implemented Interfaces:
- IFigure
- Direct Known Subclasses:
- FlowPage
A 
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.
- Since:
- 2.1
- 
Nested Class SummaryNested classes/interfaces inherited from class org.eclipse.draw2d.FigureFigure.FigureIterator, Figure.IdentitySearch, Figure.ReverseFigureChildrenIteratorNested classes/interfaces inherited from interface org.eclipse.draw2d.IFigureIFigure.NoInsets
- 
Field SummaryFields inherited from class org.eclipse.draw2d.text.FlowFigureselectionStartFields inherited from class org.eclipse.draw2d.FigurebgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTipFields inherited from interface org.eclipse.draw2d.IFigureMAX_DIMENSION, MIN_DIMENSION, NO_INSETS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidcontributeBidi(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 FlowFigureLayoutCreates the default layout managerprotected BlockBoxReturns the BlockBox associated with this.intReturns the effective horizontal alignment.intReturns the horizontal alignment set on this block.intReturns the orientation set on this block.intReturns this block's Bidi orientation.voidpaintBorder(Graphics graphics) Paints the border associated with this Figure, if one exists.voidCalled after validate has occurred.voidInvalidates this figure and revalidates() its parent.protected voidrevalidateBidi(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.voidsetHorizontalAligment(int value) Sets the horitontal aligment of the block.voidsetOrientation(int orientation) Sets the orientation for this block.protected booleanReturnstrueif this Figure uses local coordinates.voidvalidate()Re-evaluate the Bidi state of all the fragments if it has been invalidated.Methods inherited from class org.eclipse.draw2d.text.FlowFigureadd, addLeadingWordRequirements, remove, setBidiInfo, setBounds, setFlowContext, setSelectionMethods inherited from class org.eclipse.draw2d.Figureadd, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, 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, 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
- 
Constructor Details- 
BlockFlowpublic BlockFlow()Constructs a new BlockFlow.
 
- 
- 
Method Details- 
contributeBidiBlockFlows contribute a paragraph separator so as to keep the Bidi state of the text on either side of this block from affecting each other. Since each block is like a different paragraph, it does not contribute any actual text to its containing block.- Overrides:
- contributeBidiin class- FlowFigure
- Parameters:
- proc- the BidiProcessor to which contributions should be made
- See Also:
 
- 
createDefaultFlowLayoutDescription copied from class:FlowFigureCreates the default layout manager- Specified by:
- createDefaultFlowLayoutin class- FlowFigure
- Returns:
- The default layout
- See Also:
 
- 
getBlockBoxReturns the BlockBox associated with this.- Returns:
- This BlockFlow's BlockBox
 
- 
getHorizontalAligmentpublic int getHorizontalAligment()Returns the effective horizontal alignment. This method will never returnPositionConstants.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).- Returns:
- the effective alignment
 
- 
getLocalOrientationpublic int getLocalOrientation()Returns the orientation set on this block.- Returns:
- LTR, RTL or NONE
- Since:
- 3.1
- See Also:
 
- 
getLocalHorizontalAlignmentpublic int getLocalHorizontalAlignment()Returns the horizontal alignment set on this block.- Returns:
- LEFT, RIGHT, ALWAYS_LEFT, ALWAYS_RIGHT, NONE
- Since:
- 3.1
- See Also:
 
- 
getOrientationpublic int getOrientation()Returns this block's Bidi orientation. If none was set on this block, it will inherit the one from its containing block. If there is no containing block, it will return the default orientation (SWT.RIGHT_TO_LEFT if mirrored; SWT.LEFT_TO_RIGHT otherwise).- Returns:
- SWT.RIGHT_TO_LEFT or SWT.LEFT_TO_RIGHT
- Since:
- 3.1
- See Also:
 
- 
paintBorderDescription copied from class:FigurePaints the border associated with this Figure, if one exists.- Overrides:
- paintBorderin class- Figure
- Parameters:
- graphics- The Graphics used to paint
- See Also:
 
- 
postValidatepublic 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 class- FlowFigure
- See Also:
 
- 
revalidatepublic void revalidate()Description copied from interface:IFigureInvalidates this figure and revalidates() its parent. If a figure does not have a parent, it will request a validation from it UpdateManager. Calling this method does not guarantee that a repaint will occur.- Specified by:
- revalidatein interface- IFigure
- Overrides:
- revalidatein class- Figure
- See Also:
 
- 
revalidateBidiA Block will invalidate the Bidi state of all its children, so that it is re-evaluated when this block is next validated.- Overrides:
- revalidateBidiin class- FlowFigure
- Parameters:
- origin- the figure that was revalidated
- See Also:
 
- 
setHorizontalAligmentpublic void setHorizontalAligment(int value) Sets the horitontal aligment of the block. Valid values are:- NONE- (default) Alignment is inherited from parent. If a parent is not found then LEFT is used.
- PositionConstants.LEFT- Alignment is with leading edge
- PositionConstants.RIGHT- Alignment is with trailing edge
- PositionConstants.CENTER
- PositionConstants.ALWAYS_LEFT- Left, irrespective of orientation
- PositionConstants.ALWAYS_RIGHT- Right, irrespective of orientation
 - Parameters:
- value- the aligment
- See Also:
 
- 
setOrientationpublic void setOrientation(int orientation) Sets the orientation for this block. Orientation can be one of:- SWT.LEFT_TO_RIGHT
- SWT.RIGHT_TO_LEFT
- SWT.NONE(default)
 NONEis used to indicate that orientation should be inherited from the encompassing block.- Parameters:
- orientation- LTR, RTL or NONE
- Since:
- 3.1
- See Also:
 
- 
useLocalCoordinatesprotected boolean useLocalCoordinates()Description copied from class:FigureReturnstrueif this Figure uses local coordinates. This means its children are placed relative to this Figure's top-left corner.- Overrides:
- useLocalCoordinatesin class- Figure
- Returns:
- trueif this Figure uses local coordinates
- See Also:
 
- 
validatepublic void validate()Re-evaluate the Bidi state of all the fragments if it has been invalidated.
 
-