| Method from javax.swing.text.html.NoFramesView Detail: |
public float getMaximumSpan(int axis) {
if (!visible) {
return 0;
}
return super.getMaximumSpan(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. |
public float getMinimumSpan(int axis) {
if (!visible) {
return 0;
}
return super.getMinimumSpan(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. |
public float getPreferredSpan(int axis) {
if (!visible) {
return 0;
}
return super.getPreferredSpan(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. |
public boolean isVisible() {
return visible;
}
Returns a true/false value that represents
whether the view is visible or not. |
protected void layout(int width,
int height) {
if (!isVisible()) {
return;
}
super.layout(width, height);
}
Do nothing if the view is not visible, otherwise
invoke the superclass to perform layout. |
public void paint(Graphics g,
Shape allocation) {
Container host = getContainer();
if (host != null &&
visible != ((JTextComponent)host).isEditable()) {
visible = ((JTextComponent)host).isEditable();
}
if (!isVisible()) {
return;
}
super.paint(g, allocation);
}
If this view is not visible, then it returns.
Otherwise it invokes the superclass. |
public void setParent(View p) {
if (p != null) {
Container host = p.getContainer();
if (host != null) {
visible = ((JTextComponent)host).isEditable();
}
}
super.setParent(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. |