| 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.ComponentView
| Fields inherited from class com.sun.java.swing.text.View | |
| BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS | |
| Constructor Summary | |
| ComponentView(Element elem)
Creates a new ComponentView object. |
|
| 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 coordinate space of the model to that of the view. |
| void | paint(java.awt.Graphics g,
java.awt.Shape a)
Paints a component view. |
| void | setParent(View p)
Sets the parent for a child view. |
| 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 ComponentView(Element elem)
elem
- the element to decorate| Method Detail |
public void paint(java.awt.Graphics g,
java.awt.Shape a)
g
- the graphics context
a
- the shapepublic 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 void setSize(float width,
float height)
width
- the width >= 0
height
- the height >= 0public void setParent(View p)
p
- the parent
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| 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 | ||