Class AccessibilityListenerList
- java.lang.Object
-
- com.sun.java.accessibility.util.AccessibilityListenerList
public class AccessibilityListenerList extends Object
The AccessibilityListenerList
is a copy of the Swing EventListerList
class.
Fields
Modifier and Type | Field | Description |
---|---|---|
protected Object[] | listenerList | The list of listener type, listener pairs |
Constructors
Constructor | Description |
---|---|
AccessibilityListenerList() |
Methods
Modifier and Type | Method | Description |
---|---|---|
void | add(Class<? extends EventListener> t,
EventListener l) | Add the listener as a listener of the specified type. |
int | getListenerCount() | Returns the total number of listeners for this listener list. |
int | getListenerCount(Class<? extends EventListener> t) | Return the total number of listeners of the supplied type for this listener list. |
Object[] | getListenerList() | Passes back the event listener list as an array of listener type, listener pairs. |
void | remove(Class<? extends EventListener> t,
EventListener l) | Remove the listener as a listener of the specified type. |
String | toString() | Return a string representation of the |
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Fields
listenerList
protected transient Object[] listenerList
The list of listener type, listener pairs
Constructors
AccessibilityListenerList
public AccessibilityListenerList()
Methods
getListenerList
public Object[] getListenerList()
Passes back the event listener list as an array of listener type, listener pairs. Note that for performance reasons, this implementation passes back the actual data structure in which the listener data is stored internally. This method is guaranteed to pass back a non-null array, so that no null-checking is required in fire methods. A zero-length array of Object is returned if there are currently no listeners.
Absolutely no modification of the data contained in this array should be made. If any such manipulation is necessary, it should be done on a copy of the array returned rather than the array itself.
- Returns:
- an array of listener type, listener pairs.
getListenerCount
public int getListenerCount()
Returns the total number of listeners for this listener list.
- Returns:
- the total number of listeners for this listener list.
getListenerCount
public int getListenerCount(Class<? extends EventListener> t)
Return the total number of listeners of the supplied type for this listener list.
- Parameters:
-
t
- the type of the listener to be counted - Returns:
- the number of listeners found
add
public void add(Class<? extends EventListener> t, EventListener l)
Add the listener as a listener of the specified type.
- Parameters:
-
t
- the type of the listener to be added -
l
- the listener to be added
remove
public void remove(Class<? extends EventListener> t, EventListener l)
Remove the listener as a listener of the specified type.
- Parameters:
-
t
- the type of the listener to be removed -
l
- the listener to be removed
toString
public String toString()
Return a string representation of the AccessibilityListenerList
.
© 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/11/docs/api/jdk.accessibility/com/sun/java/accessibility/util/AccessibilityListenerList.html