# Class InvisibleView

java.lang.Object
javax.swing.text.View
com.lightdev.app.shtm.InvisibleView

All Implemented Interfaces:
  `SwingConstants`

public class InvisibleView extends View
A view to hide HTML tags (e.g. comments)

## Field Summary

### Fields inherited from class View

`BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS`

### Fields inherited from interface SwingConstants

`BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST`

## Constructor Summary

Constructors
Constructor
Description
`InvisibleView(Element e)`
constructor

## Method Summary

Modifier and Type
Method
Description
`float`
`getMaximumSpan()`
Determines the maximum span for this view along an axis.
`float`
`getMinimumSpan()`
Determines the minimum span for this view along an axis.
`float`
`getPreferredSpan(int axis)`
Determines the preferred span for this view along an axis.
`boolean`
`isVisible()`
`Shape`
`modelToView(int pos, Shape a, Position.Bias b)`
Provides a mapping, for a given character, from the document model coordinate space to the view coordinate space.
`void`
`paint(Graphics g, Shape allocation)`
Renders using the given rendering surface and area on that surface.
`void`
`setParent(View parent)`
Establishes the parent view for this view.
`int`
`viewToModel(float x, float y, Shape a, Position.Bias[] parm4)`
Provides a mapping from the view coordinate space to the logical coordinate space of the model.

### Methods inherited from class View

`append, breakView, changedUpdate, createFragment, forwardUpdate, forwardUpdateToView, getAlignment, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getMaximumSpan, getMinimumSpan, getNextVisualPositionFrom, getParent, getResizeWeight, getStartOffset, getToolTipText, getView, getViewCount, getViewFactory, getViewIndex, getViewIndex, insert, insertUpdate, modelToView, modelToView, preferenceChanged, remove, removeAll, removeUpdate, replace, setSize, updateChildren, updateLayout, viewToModel`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### InvisibleView

public InvisibleView(Element e)
constructor

## Method Details

### getPreferredSpan

public float getPreferredSpan(int axis)
Determines the preferred span for this view along an axis.

Specified by:
  `getPreferredSpan` in class `View`
Parameters:
  `axis` - may be either `View.X_AXIS` or `View.Y_AXIS`
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
See Also:
  - `View.getPreferredSpan(int)`

### getMaximumSpan

public float getMaximumSpan()
Determines the maximum span for this view along an axis.

Returns:
  the maximum span the view can be rendered into
See Also:
  - `View.getPreferredSpan(int)`

### getMinimumSpan

public float getMinimumSpan()
Determines the minimum span for this view along an axis.

Returns:
  the minimum span the view can be rendered into
See Also:
  - `View.getPreferredSpan(int)`

### paint

public void paint(Graphics g, Shape allocation)
Renders using the given rendering surface and area on that surface. The view may need to do layout and create child views to enable itself to render into the given allocation.

Specified by:
  `paint` in class `View`
Parameters:
  `g` - the rendering surface to use
  `allocation` - the allocated region to render into
See Also:
  - `View.paint(Graphics, Shape)`

### viewToModel

public int viewToModel(float x, float y, Shape a, Position.Bias[] parm4)
Provides a mapping from the view coordinate space to the logical coordinate space of the model. The `biasReturn` argument will be filled in to indicate that the point given is closer to the next character in the model or the previous character in the model.

Specified by:
  `viewToModel` in class `View`
Parameters:
  `x` - the X coordinate >= 0
  `y` - the Y coordinate >= 0
  `a` - the allocated region in which to render
Returns:
  the location within the model that best represents the given point in the view >= 0. The `biasReturn` argument will be filled in to indicate that the point given is closer to the next character in the model or the previous character in the model.

### modelToView

public Shape modelToView(int pos, Shape a, Position.Bias b)
Provides a mapping, for a given character, from the document model coordinate space to the view coordinate space.

Specified by:
  `modelToView` in class `View`
Parameters:
  `pos` - the position of the desired character (>=0)
  `a` - the area of the view, which encompasses the requested character
  `b` - the bias toward the previous character or the next character represented by the offset, in case the position is a boundary of two views; `b` will have one of these values:
  - `Position.Bias.Forward`
  - `Position.Bias.Backward`
Returns:
  the bounding box, in view coordinate space, of the character at the specified position
Throws:
  `IllegalArgumentException` - if `b` is not one of the legal `Position.Bias` values listed above
See Also:
  - `View.viewToModel(float, float, Shape, Position.Bias[])`

### setParent

public void setParent(View parent)
Establishes the parent view for this view. This is guaranteed to be called before any other methods if the parent view is functioning properly. This is also the last method called, since it is called to indicate the view has been removed from the hierarchy as well. When this method is called to set the parent to null, this method does the same for each of its children, propagating the notification that they have been disconnected from the view tree. If this is reimplemented, `super.setParent()` should be called.

Overrides:
  `setParent` in class `View`
Parameters:
  `parent` - the new parent, or `null` if the view is being removed from a parent

### isVisible

public boolean isVisible()

Overrides:
  `isVisible` in class `View`
Returns:
  true if the Component is visible.