Icon decorator that implements the view interface. The
entire element is used to represent the icon. This acts
as a gateway from the display-only View implementations to
interactive lightweight icons (that is, it allows icons
to be embedded into the View hierarchy. The parent of the icon
is the container that is handed out by the associated view
factory.
modelToView(int pos,
Shape a,
Position.Bias b)
Provides a mapping from the document model coordinate space
to the coordinate space of the view mapped to it.
setSize(float width,
float height)
Sets the size of the view.
int
viewToModel(float x,
float y,
Shape a,
Position.Bias[] bias)
Provides a mapping from the view coordinate space to the logical
coordinate space of the model.
Methods inherited from class javax.swing.text.View
Paints the icon.
The real paint behavior occurs naturally from the association
that the icon has with its parent container (the same
container hosting this view), so this simply allows us to
position the icon properly relative to the view. Since
the coordinate system for the view is simply the parent
containers, positioning the child icon is easy.
Determines the desired alignment for this view along an
axis. This is implemented to give the alignment to the
bottom of the icon along the y axis, and the default
along the x axis.
Submit a bug or feature For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road Palo Alto, California, 94303, U.S.A. All Rights Reserved.