All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.text.JHBoxView

java.lang.Object
   |
   +----com.sun.java.swing.text.JView
           |
           +----com.sun.java.swing.text.JCompositeView
                   |
                   +----com.sun.java.swing.text.JHBoxView

public class JHBoxView
extends JCompositeView
A view of a text model that arranges it's children into a horizontal box. It might be used to represent unwrapped lines, a piece of a flow, etc.


Constructor Index

 o JHBoxView(Element)
Construct a JHBoxView that does not load children.
 o JHBoxView(Element, ViewFactory)
Construct an JHBoxView for the given element.

Method Index

 o calculateSize(Rectangle, ViewFactory)
 o childAllocation(int, Shape, ViewFactory)
 o getViewAtPoint(Point, Rectangle, ViewFactory)
Fetch the child view at the given point.
 o isAfter(Point, Rectangle)
 o isBefore(Point, Rectangle)
 o paint(Graphics, Shape, ViewFactory)

Constructors

 o JHBoxView
 public JHBoxView(Element elem,
                  ViewFactory f)
Construct an JHBoxView for the given element.

Parameters:
f - The factory to use to create views of the elements that are children of the element this view is responsible for.
elem - The element this view is responsible for.
 o JHBoxView
 public JHBoxView(Element elem)
Construct a JHBoxView that does not load children. This is useful for subclasses that want to tile their children horizontally but do something special to arrange for their child view creation.

Methods

 o paint
 public void paint(Graphics g,
                   Shape allocation,
                   ViewFactory f)
Overrides:
paint in class JCompositeView
See Also:
paint
 o calculateSize
 protected Dimension calculateSize(Rectangle alloc,
                                   ViewFactory f)
Overrides:
calculateSize in class JCompositeView
 o isBefore
 protected boolean isBefore(Point pt,
                            Rectangle alloc)
Overrides:
isBefore in class JCompositeView
 o isAfter
 protected boolean isAfter(Point pt,
                           Rectangle alloc)
Overrides:
isAfter in class JCompositeView
 o getViewAtPoint
 protected View getViewAtPoint(Point pt,
                               Rectangle alloc,
                               ViewFactory f)
Fetch the child view at the given point.

Parameters:
p - The location of the child to fetch
alloc - The parents allocation on entry, which should be changed to the childs allocation on exit.
Overrides:
getViewAtPoint in class JCompositeView
 o childAllocation
 protected Rectangle childAllocation(int index,
                                     Shape allocation,
                                     ViewFactory f)
Overrides:
childAllocation in class JCompositeView

All Packages  Class Hierarchy  This Package  Previous  Next  Index