WeakListeners
class.@Deprecated 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.
|
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 distribute@Deprecated public 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 null
l
.@Deprecated 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 null
l
.@Deprecated 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 null
l
.@Deprecated 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 null
l
.@Deprecated 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 null
l
.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 null
l
.@Deprecated 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 null
l
.@Deprecated 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 null
l
.@Deprecated 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 null
l
.@Deprecated 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 lType
source
- the source that the listener should detach from when
listener l
is freed, can be null
lType
delegating all the interface
calls to l
.