| Modifier and Type | Field and Description |
|---|---|
| private Icon |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public float | Returns: the desired alignment >= 0.0f && <= 1.0f. This should be a value between 0.0 and 1.0 where 0 indicates alignment at the origin and 1.0 indicates alignment to the full span away from the origin. An alignment of 0.5 would be the center of the view.may be either View.X_AXIS or View.Y_AXIS axis)Overrides javax. Determines the desired alignment 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.may be either View.X_AXIS or View.Y_AXIS axis)Implements abstract javax. Determines the preferred span for this view along an axis. |
| public Shape | Returns: the bounding box of the given positionthe position to convert >= 0 pos, Shape the allocated region to render into a, Position.Implements abstract javax. Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it. |
| public void | paint(Graphics
the rendering surface to use g, Shape the allocated region to render into a)Implements abstract javax. Paints the icon. |
| public int | Returns: the location within the model that best represents the given point of view >= 0the X coordinate >= 0 x, float the Y coordinate >= 0 y, Shape the allocated region to render into a, Position.Implements abstract javax. Provides a mapping from the view coordinate space to the logical coordinate space of the model. |
| c | back to summary |
|---|---|
| private Icon c | |
| IconView | back to summary |
|---|---|
| public IconView(Element elem) Creates a new icon view that represents an element.
| |
| getAlignment | back to summary |
|---|---|
| public float getAlignment(int axis) Overrides javax. 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.
| |
| getPreferredSpan | back to summary |
|---|---|
| public float getPreferredSpan(int axis) Implements abstract javax. Determines the preferred span for this view along an axis.
| |
| modelToView | back to summary |
|---|---|
| public Shape modelToView(int pos, Shape a, Position. Implements abstract javax. Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
| |
| paint | back to summary |
|---|---|
| public void paint(Graphics g, Shape a) Implements abstract javax. 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.
| |
| viewToModel | back to summary |
|---|---|
| public int viewToModel(float x, float y, Shape a, Position. Implements abstract javax. Provides a mapping from the view coordinate space to the logical coordinate space of the model.
| |