| Overview | Package | Class | Tree | Deprecated | Index | Help |
Java Platform 1.1.7 |
||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
java.lang.Object
|
+--com.sun.java.swing.text.View
|
+--com.sun.java.swing.text.IconView
| Fields inherited from class com.sun.java.swing.text.View | |
| BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS | |
| Constructor Summary | |
| IconView(Element elem)
Creates a new icon view that represents an element. |
|
| Method Summary | |
| float | getAlignment(int axis)
Determines the desired alignment for this view along an axis. |
| float | getPreferredSpan(int axis)
Determines the preferred span for this view along an axis. |
| java.awt.Shape | modelToView(int pos,
java.awt.Shape a)
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it. |
| void | paint(java.awt.Graphics g,
java.awt.Shape a)
Paints the icon. |
| void | setSize(float width,
float height)
Sets the size of the view. |
| int | viewToModel(float x,
float y,
java.awt.Shape a)
Provides a mapping from the view coordinate space to the logical coordinate space of the model. |
| Methods inherited from class com.sun.java.swing.text.View | |
| breakView, changedUpdate, createFragment, getAlignment, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getParent, getPreferredSpan, getResizeWeight, getStartOffset, getViewCount, getViewFactory, getView, insertUpdate, modelToView, paint, preferenceChanged, removeUpdate, setParent, setSize, viewToModel | |
| Methods inherited from class java.lang.Object | |
| clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait | |
| Constructor Detail |
public IconView(Element elem)
elem
- the element to create a view for| Method Detail |
public void paint(java.awt.Graphics g,
java.awt.Shape a)
g
- the rendering surface to use
a
- the allocated region to render intopublic float getPreferredSpan(int axis)
axis
- may be either View.X_AXIS or View.Y_AXISpublic float getAlignment(int axis)
axis
- may be either View.X_AXIS or View.Y_AXIS
public java.awt.Shape modelToView(int pos,
java.awt.Shape a)
throws BadLocationException
pos
- the position to convert >= 0
a
- the allocated region to render into
public int viewToModel(float x,
float y,
java.awt.Shape a)
x
- the X coordinate >= 0
y
- the Y coordinate >= 0
a
- the allocated region to render into
public void setSize(float width,
float height)
width
- the width
height
- the height| Overview | Package | Class | Tree | Deprecated | Index | Help |
Java Platform 1.1.7 |
||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||