Top Description Fields Constructors Methods
javax.swing.text.html

pack-priv Class FrameSetView

extends BoxView
Class Inheritance
Imports
java.awt.*, java.util.*, javax.swing.*, javax.swing.text.*, javax.swing.event.*

Implements a FrameSetView, intended to support the HTML <FRAMESET> tag. Supports the ROWS and COLS attributes.
Author
Sunita Mani Credit also to the hotjava browser engineers that worked on making the allocation of space algorithms conform to the HTML 4.0 standard and also be netscape compatible.

Field Summary

Modifier and TypeField and Description
pack-priv int[]
pack-priv int
pack-priv String[]
pack-priv int[]
pack-priv int
pack-priv int[]
pack-priv int

Constructor Summary

AccessConstructor and Description
public
FrameSetView(Element
the element that this view is responsible for
elem
,
int axis)

Constructs a FrameSetView for the given element.

Method Summary

Modifier and TypeMethod and Description
protected SizeRequirements[]
getChildRequests(int targetSpan, int axis)

private void
init()

Initializes a number of internal state variables that store information about space allocation for the frames contained within the frameset.

protected void

Returns:

the offset and span for each child view in the offsets and spans parameters
layoutMajorAxis
(int
the total span given to the view, which would be used to layout the children
targetSpan
,
int
the axis being laid out
axis
,
int[]
the offsets from the origin of the view for each of the child views; this is a return value and is filled in by the implementation of this method
offsets
,
int[]
the span of each child view; this is a return value and is filled in by the implementation of this method
spans
)

Overrides javax.swing.text.BoxView.layoutMajorAxis.

Perform layout for the major axis of the box (i.e. the axis that it represents).
private int
parseDigits(String mixedStr)

private String[]
parseRowColSpec(HTML.Attribute key)

Parses the ROW or COL attributes and returns an array of strings that represent the space distribution.

private void
spread(int targetSpan, int[] span)

This method is responsible for returning in span[] the span for each child view along the major axis.

Inherited from javax.swing.text.BoxView:
baselineLayoutbaselineRequirementscalculateMajorAxisRequirementscalculateMinorAxisRequirementschildAllocationflipEastAndWestAtEndsforwardUpdategetAlignmentgetAxisgetChildAllocationgetHeightgetMaximumSpangetMinimumSpangetOffsetgetPreferredSpangetResizeWeightgetSpangetViewAtPointgetWidthisAfterisAllocationValidisBeforeisLayoutValidlayoutlayoutChangedlayoutMinorAxismodelToViewpaintpaintChildpreferenceChangedreplacesetAxissetSizeviewToModel

Field Detail

absoluteChildrenback to summary
pack-priv int[] absoluteChildren
absoluteTotalsback to summary
pack-priv int absoluteTotals
childrenback to summary
pack-priv String[] children

Hides javax.swing.text.CompositeView.children.

percentChildrenback to summary
pack-priv int[] percentChildren
percentTotalsback to summary
pack-priv int percentTotals
relativeChildrenback to summary
pack-priv int[] relativeChildren
relativeTotalsback to summary
pack-priv int relativeTotals

Constructor Detail

FrameSetViewback to summary
public FrameSetView(Element elem, int axis)

Constructs a FrameSetView for the given element.

Parameters
elem:Element

the element that this view is responsible for

Method Detail

getChildRequestsback to summary
protected SizeRequirements[] getChildRequests(int targetSpan, int axis)
initback to summary
private void init()

Initializes a number of internal state variables that store information about space allocation for the frames contained within the frameset.

layoutMajorAxisback to summary
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans)

Overrides javax.swing.text.BoxView.layoutMajorAxis.

Perform layout for the major axis of the box (i.e. the axis that it represents). The results of the layout should be placed in the given arrays which represent the allocations to the children along the major axis.

Parameters
targetSpan:int

the total span given to the view, which would be used to layout the children

axis:int

the axis being laid out

offsets:int[]

the offsets from the origin of the view for each of the child views; this is a return value and is filled in by the implementation of this method

spans:int[]

the span of each child view; this is a return value and is filled in by the implementation of this method

Returns:void

the offset and span for each child view in the offsets and spans parameters

parseDigitsback to summary
private int parseDigits(String mixedStr)
parseRowColSpecback to summary
private String[] parseRowColSpec(HTML.Attribute key)

Parses the ROW or COL attributes and returns an array of strings that represent the space distribution.

spreadback to summary
private void spread(int targetSpan, int[] span)

This method is responsible for returning in span[] the span for each child view along the major axis. it computes this based on the information that extracted from the value of the ROW/COL attribute.