|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.text.View
com.lightdev.app.shtm.InvisibleView
public class InvisibleView
A view to hide HTML tags (e.g. comments)
Field Summary |
---|
Fields inherited from class javax.swing.text.View |
---|
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS |
Fields inherited from interface javax.swing.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 | |
---|---|
InvisibleView(javax.swing.text.Element e)
constructor |
Method Summary | |
---|---|
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()
|
java.awt.Shape |
modelToView(int pos,
java.awt.Shape a,
javax.swing.text.Position.Bias b)
Provides a mapping, for a given character, from the document model coordinate space to the view coordinate space. |
void |
paint(java.awt.Graphics g,
java.awt.Shape allocation)
Renders using the given rendering surface and area on that surface. |
void |
setParent(javax.swing.text.View parent)
Establishes the parent view for this view. |
int |
viewToModel(float x,
float y,
java.awt.Shape a,
javax.swing.text.Position.Bias[] parm4)
Provides a mapping from the view coordinate space to the logical coordinate space of the model. |
Methods inherited from class javax.swing.text.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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InvisibleView(javax.swing.text.Element e)
Method Detail |
---|
public float getPreferredSpan(int axis)
getPreferredSpan
in class javax.swing.text.View
axis
- may be either View.X_AXIS
or
View.Y_AXIS
View.getPreferredSpan(int)
public float getMaximumSpan()
axis
- may be either View.X_AXIS
or
View.Y_AXIS
View.getPreferredSpan(int)
public float getMinimumSpan()
axis
- may be either View.X_AXIS
or
View.Y_AXIS
View.getPreferredSpan(int)
public void paint(java.awt.Graphics g, java.awt.Shape allocation)
paint
in class javax.swing.text.View
g
- the rendering surface to useallocation
- the allocated region to render intoView.paint(java.awt.Graphics, java.awt.Shape)
public int viewToModel(float x, float y, java.awt.Shape a, javax.swing.text.Position.Bias[] parm4)
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.
viewToModel
in class javax.swing.text.View
x
- the X coordinate >= 0y
- the Y coordinate >= 0a
- the allocated region in which to render
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.public java.awt.Shape modelToView(int pos, java.awt.Shape a, javax.swing.text.Position.Bias b) throws javax.swing.text.BadLocationException
modelToView
in class javax.swing.text.View
pos
- the position of the desired character (>=0)a
- the area of the view, which encompasses the requested characterb
- 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
javax.swing.text.BadLocationException
- if the specified position does
not represent a valid location in the associated document
java.lang.IllegalArgumentException
- if b
is not one of the
legal Position.Bias
values listed aboveView.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])
public void setParent(javax.swing.text.View parent)
super.setParent()
should
be called.
setParent
in class javax.swing.text.View
parent
- the new parent, or null
if the view is
being removed from a parentpublic boolean isVisible()
isVisible
in class javax.swing.text.View
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |