|
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
- public class BlockFlow
- extends
FlowFigure
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
FlowFigure s can be added to a BlockFlow.
WARNING: This class is not intended to be subclassed by clients.
-
Since:
- 2.1
Fields inherited from class org.eclipse.draw2d.
Figure
|
bgColor,
border,
bounds,
fgColor,
flags,
font,
MAX_FLAG,
maxSize,
minSize,
NO_MANAGER,
prefSize,
toolTip
|
Constructor Summary
|
BlockFlow
()
Constructs a new BlockFlow. |
Methods inherited from class org.eclipse.draw2d.
Figure
|
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,
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,
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
|
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
BlockFlow
public BlockFlow()
- Constructs a new BlockFlow.
contributeBidi
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. Since each block is like a
different paragraph, it does not contribute any actual text to its containing block.
-
-
Overrides:
-
contributeBidi
in class
FlowFigure
-
-
Parameters:
-
proc - the BidiProcessor to which contributions should be made -
See Also:
-
FlowFigure.contributeBidi(org.eclipse.draw2d.text.BidiProcessor)
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()
getBlockBox
protected
BlockBox getBlockBox()
- Returns the BlockBox associated with this.
-
-
Returns:
- This BlockFlow's BlockBox
getHorizontalAligment
public int getHorizontalAligment()
- Returns the effective horizontal alignment. This method will never return
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 ).
-
-
Returns:
- the effective alignment
getLocalOrientation
public int getLocalOrientation()
- Returns the orientation set on this block.
-
-
Returns:
- LTR, RTL or NONE
-
Since:
- 3.1
-
See Also:
-
setOrientation(int)
getLocalHorizontalAlignment
public int getLocalHorizontalAlignment()
- Returns the horizontal alignment set on this block.
-
-
Returns:
- LEFT, RIGHT, ALWAYS_LEFT, ALWAYS_RIGHT, NONE
-
Since:
- 3.1
-
See Also:
-
setHorizontalAligment(int)
getOrientation
public 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:
-
setOrientation(int)
paintBorder
public void paintBorder(
Graphics graphics)
-
Description copied from class:
Figure
- Paints the border associated with this Figure, if one exists.
-
-
Overrides:
-
paintBorder
in class
Figure
-
-
Parameters:
-
graphics - The Graphics used to paint -
See Also:
-
Figure.paintBorder(org.eclipse.draw2d.Graphics)
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()
revalidate
public void revalidate()
-
Description copied from interface:
IFigure
- Invalidates 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:
-
revalidate
in interface
IFigure
-
Overrides:
-
revalidate
in class
Figure
-
-
See Also:
-
Figure.revalidate()
revalidateBidi
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.
-
-
Overrides:
-
revalidateBidi
in class
FlowFigure
-
-
Parameters:
-
origin - the figure that was revalidated -
See Also:
-
FlowFigure.revalidateBidi(org.eclipse.draw2d.IFigure)
setHorizontalAligment
public void setHorizontalAligment(int value)
- Sets the horitontal aligment of the block. Valid values are:
-
-
Parameters:
-
value - the aligment -
See Also:
-
getHorizontalAligment()
setOrientation
public 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)
NONE is used to indicate that orientation should be inherited from the
encompassing block.
-
-
Parameters:
-
orientation - LTR, RTL or NONE -
Since:
- 3.1
-
See Also:
-
getOrientation()
useLocalCoordinates
protected boolean useLocalCoordinates()
-
Description copied from class:
Figure
- Returns
true if this Figure uses local coordinates. This means its
children are placed relative to this Figure's top-left corner.
-
-
Overrides:
-
useLocalCoordinates
in class
Figure
-
-
Returns:
-
true if this Figure uses local coordinates -
See Also:
-
Figure.useLocalCoordinates()
validate
public void validate()
- Re-evaluate the Bidi state of all the fragments if it has been
invalidated.
-
-
Specified by:
-
validate
in interface
IFigure
-
Overrides:
-
validate
in class
Figure
-
-
See Also:
-
IFigure.validate()
Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.
|
|