WeakListeners class.public abstract class WeakListener extends Object implements EventListener
| Modifier and Type | Class and Description |
|---|---|
static class |
WeakListener.Change
Deprecated.
use appropriate method instead
|
static class |
WeakListener.Document
Deprecated.
use appropriate method instead
|
static class |
WeakListener.FileChange
Deprecated.
use appropriate method instead
|
static class |
WeakListener.FileStatus
Deprecated.
use appropriate method instead
|
static class |
WeakListener.Focus
Deprecated.
use appropriate method instead
|
static class |
WeakListener.Node
Deprecated.
use appropriate method instead
|
static class |
WeakListener.PropertyChange
Deprecated.
use appropriate method instead
|
static class |
WeakListener.Repository
Deprecated.
use appropriate method instead
|
static class |
WeakListener.VetoableChange
Deprecated.
use appropriate method instead
|
| Modifier | Constructor and Description |
|---|---|
protected |
WeakListener(Class listenerClass,
EventListener l)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static ChangeListener |
change(ChangeListener l,
Object source)
|
static EventListener |
create(Class lType,
EventListener l,
Object source)
Deprecated.
|
static DocumentListener |
document(DocumentListener l,
Object source)
|
static FileChangeListener |
fileChange(FileChangeListener l,
Object source)
|
static FileStatusListener |
fileStatus(FileStatusListener l,
Object source)
|
static FocusListener |
focus(FocusListener l,
Object source)
Deprecated.
|
protected EventListener |
get(EventObject ev)
Deprecated.
Getter for the target listener.
|
static NodeListener |
node(NodeListener l,
Object source)
|
static PropertyChangeListener |
propertyChange(PropertyChangeListener l,
Object source)
|
protected abstract String |
removeMethodName()
Deprecated.
Method name to use for removing the listener.
|
static RepositoryListener |
repository(RepositoryListener l,
Object source)
Deprecated.
Creates a weak implementation of RepositoryListener.
|
protected void |
setSource(Object source)
Deprecated.
Setter for the source field.
|
String |
toString()
Deprecated.
|
static VetoableChangeListener |
vetoableChange(VetoableChangeListener l,
Object source)
|
protected WeakListener(Class listenerClass, EventListener l)
listenerClass - class/interface of the listenerl - listener to delegate to, l must be an instance of
listenerClassprotected final void setSource(Object source)
source - is any Object or null, though only setting an object
that has an appropriate remove*listenerClass*Listener method and on which this listener is listening on,
is useful.protected abstract String removeMethodName()
protected final EventListener get(EventObject ev)
ev - the event the we want to distributepublic static NodeListener node(NodeListener l, Object source)
NodeOp.weakNodeListener(org.openide.nodes.NodeListener, java.lang.Object) or WeakListeners.create(java.lang.Class<T>, T, java.lang.Object)l - the listener to delegate tosource - the source that the listener should detach from when
listener l is freed, can be nulll.public static PropertyChangeListener propertyChange(PropertyChangeListener l, Object source)
l - the listener to delegate tosource - the source that the listener should detach from when
listener l is freed, can be nulll.public static VetoableChangeListener vetoableChange(VetoableChangeListener l, Object source)
l - the listener to delegate tosource - the source that the listener should detach from when
listener l is freed, can be nulll.public static FileChangeListener fileChange(FileChangeListener l, Object source)
FileUtil.weakFileChangeListener(org.openide.filesystems.FileChangeListener, java.lang.Object) or WeakListeners.create(java.lang.Class<T>, T, java.lang.Object)l - the listener to delegate tosource - the source that the listener should detach from when
listener l is freed, can be nulll.public static FileStatusListener fileStatus(FileStatusListener l, Object source)
FileUtil.weakFileStatusListener(org.openide.filesystems.FileStatusListener, java.lang.Object) or WeakListeners.create(java.lang.Class<T>, T, java.lang.Object)l - the listener to delegate tosource - the source that the listener should detach from when
listener l is freed, can be nulll.public static RepositoryListener repository(RepositoryListener l, Object source)
l - the listener to delegate tosource - the source that the listener should detach from when
listener l is freed, can be nulll.public static DocumentListener document(DocumentListener l, Object source)
l - the listener to delegate tosource - the source that the listener should detach from when
listener l is freed, can be nulll.public static ChangeListener change(ChangeListener l, Object source)
l - the listener to delegate tosource - the source that the listener should detach from when
listener l is freed, can be nulll.public static FocusListener focus(FocusListener l, Object source)
WeakListeners.create(java.lang.Class<T>, T, java.lang.Object)l - the listener to delegate tosource - the source that the listener should detach from when
listener l is freed, can be nulll.public static EventListener create(Class lType, EventListener l, Object source)
WeakListeners.create(java.lang.Class<T>, T, java.lang.Object)lType.lType - the type of listener to create. It can be any interface,
but only interfaces are allowed.l - the listener to delegate to, l must be an instance
of lTypesource - the source that the listener should detach from when
listener l is freed, can be nulllType delegating all the interface
calls to l.Built on May 22 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.