|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.text.View javax.swing.text.ComponentView javax.swing.text.html.EditableView
EditableView sets the view it contains to be visible only when the JTextComponent the view is contained in is editable. The min/pref/max size is 0 when not visible.
Nested Class Summary |
Nested classes inherited from class javax.swing.text.ComponentView |
|
Field Summary | |
private boolean |
isVisible
Set to true if the component is visible. |
Fields inherited from class javax.swing.text.ComponentView |
|
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 | |
(package private) |
EditableView(Element e)
|
Method Summary | |
float |
getMaximumSpan(int axis)
Determines the maximum span for this view along an axis. |
float |
getMinimumSpan(int axis)
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()
Returns a boolean that indicates whether the view is visible or not. |
void |
paint(Graphics g,
Shape allocation)
The real paint behavior occurs naturally from the association that the component has with its parent container (the same container hosting this view). |
void |
setParent(View parent)
Sets the parent for a child view. |
Methods inherited from class javax.swing.text.ComponentView |
createComponent, getAlignment, getComponent, modelToView, viewToModel |
Methods inherited from class javax.swing.text.View |
append, breakView, changedUpdate, createFragment, forwardUpdate, forwardUpdateToView, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, 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 |
Field Detail |
private boolean isVisible
Constructor Detail |
EditableView(Element e)
Method Detail |
public float getMinimumSpan(int axis)
ComponentView
getMinimumSpan
in class ComponentView
axis
- may be either View.X_AXIS or View.Y_AXIS
public float getPreferredSpan(int axis)
ComponentView
getPreferredSpan
in class ComponentView
axis
- may be either View.X_AXIS or View.Y_AXIS
public float getMaximumSpan(int axis)
ComponentView
getMaximumSpan
in class ComponentView
axis
- may be either View.X_AXIS or View.Y_AXIS
public void paint(Graphics g, Shape allocation)
ComponentView
paint
in class ComponentView
g
- the graphics contextallocation
- the shapeView.paint(java.awt.Graphics, java.awt.Shape)
public void setParent(View parent)
ComponentView
getContainer
.
If the parent view parameter is null, this view is being
cleaned up, thus the component is removed from its parent.
The changing of the component hierarchy will touch the component lock, which is the one thing that is not safe from the View hierarchy. Therefore, this functionality is executed immediately if on the event thread, or is queued on the event queue if called from another thread (notification of change from an asynchronous update).
setParent
in class ComponentView
parent
- the parentpublic boolean isVisible()
View
isVisible
in class View
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |