Class Paragraph

java.lang.Object
  |
  +--AbstractBox
        |
        +--AbstractFlexibleBox
              |
              +--BoxFlow
                    |
                    +--Paragraph
All Implemented Interfaces:
Box, FlexibleBox

public class Paragraph
extends BoxFlow

A paragraph. A paragraph is a simple subclass of BoxFlow. The difference is that it makes a little amount of space after the box to (halfleading).


Fields inherited from class AbstractFlexibleBox
boxes
 
Fields inherited from class AbstractBox
height, min_width, pref_width, width
 
Constructor Summary
Paragraph()
           
 
Method Summary
 void doLayout(java.awt.Graphics g, javax.swing.JComponent c, int w)
          Updates the width and height of the box.
 
Methods inherited from class BoxFlow
drawAt, getMinimumWidth, getPreferredWidth
 
Methods inherited from class AbstractFlexibleBox
insert, isEmpty
 
Methods inherited from class AbstractBox
getHeight, getWidth, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface Box
getHeight, getWidth, toString
 

Constructor Detail

Paragraph

public Paragraph()
Method Detail

doLayout

public void doLayout(java.awt.Graphics g,
                     javax.swing.JComponent c,
                     int w)
Updates the width and height of the box. The child-boxes are laid out from left to right and new lines are made as necessary. When that's done, the height is increased by 10 pixels.
Overrides:
doLayout in class BoxFlow
Following copied from class: AbstractFlexibleBox
Parameters:
g - the graphics context. Some boxes, like TextFragments, need a graphics context before they can determine their width and height.
c - the component into which the box will be drawn. An ImageBox needs to know the component to calculate the width and height.
w - the width available for to the box.