Methods Summary |
---|
public float | getMaximumSpan(int axis)Determines the maximum span for this view along an
axis. Returns 0 if the view is not visible, otherwise
it calls the superclass method ot get the maximum span.
if (!visible) {
return 0;
}
return super.getMaximumSpan(axis);
|
public float | getMinimumSpan(int axis)Determines the minimum span for this view along an
axis. Returns 0 if the view is not visible, otherwise
it calls the superclass method to get the minimum span.
if (!visible) {
return 0;
}
return super.getMinimumSpan(axis);
|
public float | getPreferredSpan(int axis)Determines the preferred span for this view. Returns
0 if the view is not visible, otherwise it calls the
superclass method to get the preferred span.
axis.
if (!visible) {
return 0;
}
return super.getPreferredSpan(axis);
|
public boolean | isVisible()Returns a true/false value that represents
whether the view is visible or not.
return visible;
|
protected void | layout(int width, int height)Do nothing if the view is not visible, otherwise
invoke the superclass to perform layout.
if (!isVisible()) {
return;
}
super.layout(width, height);
|
public void | paint(java.awt.Graphics g, java.awt.Shape allocation)If this view is not visible, then it returns.
Otherwise it invokes the superclass.
Container host = getContainer();
if (host != null &&
visible != ((JTextComponent)host).isEditable()) {
visible = ((JTextComponent)host).isEditable();
}
if (!isVisible()) {
return;
}
super.paint(g, allocation);
|
public void | setParent(javax.swing.text.View p)Determines if the JTextComponent that the view
is contained in is editable. If so, then this
view and all its child views are visible.
Once this has been determined, the superclass
is invoked to continue processing.
if (p != null) {
Container host = p.getContainer();
if (host != null) {
visible = ((JTextComponent)host).isEditable();
}
}
super.setParent(p);
|