Eclipse Draw2d
2.1

org.eclipse.draw2d.text
Class FlowBox

java.lang.Object
  |
  +--org.eclipse.draw2d.text.FlowBox
Direct Known Subclasses:
CompositeBox, TextFragmentBox

public class FlowBox
extends Object

A Geometric object for representing a region on a line of Text. This class adds the notion of a baseline to Rectangle. Ascent is the distance above the baseline. Descent is the distance below the baseline.

This class should not be treated as a Rectangle by clients.

Since:
2.1

Field Summary
 int x
          The x location
 int y
          The y location
 
Constructor Summary
FlowBox()
           
 
Method Summary
 boolean containsPoint(int x, int y)
          This method must be called on a block that is completely positioned and committed.
 int getAscent()
          By default, a FlowBox is all ascent, and no descent, so the height is returned.
 int getDescent()
          By default, a simple FlowBox is all ascent, and no descent.
 int getHeight()
          Returns the height
 int getWidth()
          Returns the width
 void makeBaseline(int value)
          Used to set the baseline of this FlowBox to the specified value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

public int x
The x location


y

public int y
The y location

Constructor Detail

FlowBox

public FlowBox()
Method Detail

containsPoint

public boolean containsPoint(int x,
                             int y)
This method must be called on a block that is completely positioned and committed.

Parameters:
x - X
y - Y
Returns:
true if the FlowBox contains the point

getAscent

public int getAscent()
By default, a FlowBox is all ascent, and no descent, so the height is returned.

Returns:
the ascent in pixels above the baseline

getDescent

public final int getDescent()
By default, a simple FlowBox is all ascent, and no descent. Zero is returned.

Returns:
the descent in pixels below the baseline

getHeight

public int getHeight()
Returns the height

Returns:
height

getWidth

public int getWidth()
Returns the width

Returns:
width

makeBaseline

public void makeBaseline(int value)
Used to set the baseline of this FlowBox to the specified value.

Parameters:
value - the new baseline

Eclipse Draw2d
2.1

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