APIdia Launch Partner
Top Description Fields Constructors Methods
javax.swing.text.html

pack-priv Class NoFramesView

extends BlockView
Class Inheritance
Imports
javax.swing.text.*, java.awt.*

This is the view associated with the html tag NOFRAMES. This view has been written to ignore the contents of the NOFRAMES tag. The contents of the tag will only be visible when the JTextComponent the view is contained in is editable.
Author
Sunita Mani

Field Summary

Modifier and TypeField and Description
pack-priv boolean

Constructor Summary

AccessConstructor and Description
public
NoFramesView(Element
the element to create a view for
elem
,
int
either View.X_AXIS or View.Y_AXIS
axis
)

Creates a new view that represents an html box.

Method Summary

Modifier and TypeMethod and Description
public float

Returns:

the maximum span the view can be rendered into
getMaximumSpan
(int
may be either View.X_AXIS or View.Y_AXIS
axis
)

Overrides javax.swing.text.html.BlockView.getMaximumSpan.

Determines the maximum span for this view along an axis.

public float

Returns:

the minimum span the view can be rendered into
getMinimumSpan
(int
may be either View.X_AXIS or View.Y_AXIS
axis
)

Overrides javax.swing.text.html.BlockView.getMinimumSpan.

Determines the minimum span for this view along an axis.

public float

Returns:

the span the view would like to be rendered into; typically the view is told to render into the span that is returned, although there is no guarantee; the parent may choose to resize or break the view
getPreferredSpan
(int
may be either View.X_AXIS or View.Y_AXIS
axis
)

Overrides javax.swing.text.html.BlockView.getPreferredSpan.

Determines the preferred span for this view.

public boolean
isVisible()

Overrides javax.swing.text.View.isVisible.

Returns a true/false value that represents whether the view is visible or not.

protected void
layout(int width, int height)

Overrides javax.swing.text.BoxView.layout.

Do nothing if the view is not visible, otherwise invoke the superclass to perform layout.

public void
paint(Graphics
the rendering surface to use
g
,
Shape
the allocated region to render into
allocation
)

Overrides javax.swing.text.html.BlockView.paint.

If this view is not visible, then it returns.

public void
setParent(View
the parent View.
p
)

Overrides javax.swing.text.html.BlockView.setParent.

Determines if the JTextComponent that the view is contained in is editable.

Inherited from javax.swing.text.html.BlockView:
calculateMajorAxisRequirementscalculateMinorAxisRequirementschangedUpdategetAlignmentgetAttributesgetResizeWeightgetStyleSheetisPercentagelayoutMinorAxissetPropertiesFromAttributesspanSetFromAttributes

Field Detail

visibleback to summary
pack-priv boolean visible

Constructor Detail

NoFramesViewback to summary
public NoFramesView(Element elem, int axis)

Creates a new view that represents an html box. This can be used for a number of elements. By default this view is not visible.

Parameters
elem:Element

the element to create a view for

axis:int

either View.X_AXIS or View.Y_AXIS

Method Detail

getMaximumSpanback to summary
public float getMaximumSpan(int axis)

Overrides javax.swing.text.html.BlockView.getMaximumSpan.

Determines the maximum span for this view along an axis. Returns 0 if the view is not visible, otherwise it calls the superclass method ot get the maximum span.

Parameters
axis:int

may be either View.X_AXIS or View.Y_AXIS

Returns:float

the maximum span the view can be rendered into

See Also
javax.swing.text.ParagraphView#getMaximumSpan
getMinimumSpanback to summary
public float getMinimumSpan(int axis)

Overrides javax.swing.text.html.BlockView.getMinimumSpan.

Determines the minimum span for this view along an axis. Returns 0 if the view is not visible, otherwise it calls the superclass method to get the minimum span.

Parameters
axis:int

may be either View.X_AXIS or View.Y_AXIS

Returns:float

the minimum span the view can be rendered into

See Also
javax.swing.text.ParagraphView#getMinimumSpan
getPreferredSpanback to summary
public float getPreferredSpan(int axis)

Overrides javax.swing.text.html.BlockView.getPreferredSpan.

Determines the preferred span for this view. Returns 0 if the view is not visible, otherwise it calls the superclass method to get the preferred span. axis.

Parameters
axis:int

may be either View.X_AXIS or View.Y_AXIS

Returns:float

the span the view would like to be rendered into; typically the view is told to render into the span that is returned, although there is no guarantee; the parent may choose to resize or break the view

See Also
javax.swing.text.ParagraphView#getPreferredSpan
isVisibleback to summary
public boolean isVisible()

Overrides javax.swing.text.View.isVisible.

Returns a true/false value that represents whether the view is visible or not.

layoutback to summary
protected void layout(int width, int height)

Overrides javax.swing.text.BoxView.layout.

Do nothing if the view is not visible, otherwise invoke the superclass to perform layout.

paintback to summary
public void paint(Graphics g, Shape allocation)

Overrides javax.swing.text.html.BlockView.paint.

If this view is not visible, then it returns. Otherwise it invokes the superclass.

Parameters
g:Graphics

the rendering surface to use

allocation:Shape

the allocated region to render into

See Also
isVisible, javax.swing.text.ParagraphView#paint
setParentback to summary
public void setParent(View p)

Overrides javax.swing.text.html.BlockView.setParent.

Determines if the JTextComponent that the view is contained in is editable. If so, then this view and all its child views are visible. Once this has been determined, the superclass is invoked to continue processing.

Parameters
p:View

the parent View.

See Also
BlockView#setParent