Java in a Nutshell

Previous Chapter 23
The java.beans Package
Next
 

23.23 java.beans.Visibility (JDK 1.1)

This interface is intended to be implemented by advanced beans that may run either with or without a GUI (graphical user interface) present. The methods it defines allow a bean to specify whether it requires a GUI and allows the environment to notify the bean whether a GUI is available.

If a bean absolutely requires a GUI, it should return true from needsGui(). If a bean is running without a GUI, it should return true from avoidingGui(). If no GUI is available, the bean may be notified through a call to dontUseGui(), and if a GUI is available, the bean may be notified through a call to okToUseGui().


public abstract interface Visibility {

    // Public Instance Methods

            public abstract boolean avoidingGui();

            public abstract void dontUseGui();

            public abstract boolean needsGui();

            public abstract void okToUseGui();

}


Previous Home Next
java.beans.VetoableChangeSupport (JDK 1.1) Book Index The java.io Package

Java in a Nutshell Java Language Reference Java AWT Java Fundamental Classes Exploring Java