edu.rice.cs.drjava.ui.avail
Class AndGUIAvailabilityListener
java.lang.Object
edu.rice.cs.drjava.ui.avail.AndGUIAvailabilityListener
- All Implemented Interfaces:
- GUIAvailabilityListener
- Direct Known Subclasses:
- AndGUIAvailabilityActionAdapter, AndGUIAvailabilityComponentAdapter
public abstract class AndGUIAvailabilityListener
- extends Object
- implements GUIAvailabilityListener
Listener responding to the availability of several GUI components.
- Version:
- $Id: AndGUIAvailabilityListener.java 5355 2010-08-11 21:20:32Z mgricken $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_components
protected final HashSet<GUIAvailabilityListener.ComponentType> _components
_notifier
protected final GUIAvailabilityNotifier _notifier
_lastValue
protected volatile boolean _lastValue
AndGUIAvailabilityListener
public AndGUIAvailabilityListener(GUIAvailabilityNotifier notifier,
GUIAvailabilityListener.ComponentType... components)
- Create a listener that responds to changes in availability of several GUI components.
- Parameters:
components - components that must be available
isAvailable
public boolean isAvailable()
- Returns:
- true if all required components are available
availabilityChanged
public void availabilityChanged(GUIAvailabilityListener.ComponentType component,
boolean available)
- Called when a component's availability changes.
- Specified by:
availabilityChanged in interface GUIAvailabilityListener
- Parameters:
component - the component whose availability changedavailable - true if component is available
availabilityChanged
public abstract void availabilityChanged(boolean available)
- Called when the combined availability of all components changes.
- Parameters:
available - true if all components are available