Eclipse Draw2d
2.1

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 fragment 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 paragraph.

BlockFlows should be nested inside other BlockFlows, but it is also valid to place them in InlineFlows. FlowPage can be used as a "root" block and can be added to normal draw2d 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 Summary
 
Nested classes inherited from class org.eclipse.draw2d.Figure
Figure.FigureIterator
 
Nested classes inherited from class org.eclipse.draw2d.IFigure
IFigure.NoInsets
 
Field Summary
 
Fields inherited from class org.eclipse.draw2d.Figure
bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip
 
Fields inherited from interface org.eclipse.draw2d.IFigure
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS
 
Constructor Summary
BlockFlow()
          Constructs a new BlockFlow.
 
Method Summary
protected  FlowFigureLayout createDefaultFlowLayout()
          Creates the default layout manager
protected  BlockBox getBlockBox()
          Returns the BlockBox associated with this.
 int getHorizontalAligment()
          Returns the horizontal aligment.
 void postValidate()
          Called after validate has occurred.
 void setHorizontalAligment(int value)
          Sets the horitontal aligment of the block.
protected  boolean useLocalCoordinates()
          Returns true if this Figure uses local coordinates.
 
Methods inherited from class org.eclipse.draw2d.text.FlowFigure
add, paintFigure, setBounds, setFlowContext
 
Methods inherited from class org.eclipse.draw2d.Figure
add, add, add, addAncestorListener, addFigureListener, addFocusListener, addKeyListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocalBackgroundColor, 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, isEnabled, isFocusTraversable, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, paint, paintBorder, paintChildren, paintClientArea, primTranslate, remove, removeAll, removeAncestorListener, removeFigureListener, removeFocusListener, removeKeyListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, 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, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockFlow

public BlockFlow()
Constructs a new BlockFlow.

Method Detail

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 horizontal aligment.

Returns:
the hotizontal aligment

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()

setHorizontalAligment

public void setHorizontalAligment(int value)
Sets the horitontal aligment of the block. Valid values are:

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()

Eclipse Draw2d
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.