ELEMENT
- public abstract class ElementDescriptor<ELEMENT extends ECPElement> extends Element implements InternalDescriptor<ELEMENT>, ECPDisposable.DisposeListener
ECPDisposable.DisposeListener
Constructor and Description |
---|
ElementDescriptor(ElementRegistry<ELEMENT,?> registry,
String name) |
Modifier and Type | Method and Description |
---|---|
void |
addDisposeListener(ECPDisposable.DisposeListener listener)
Adds a
ECPDisposable.DisposeListener to this instance. |
void |
dispose()
Disposes the current instance.
|
void |
disposed(ECPDisposable disposable)
Callback method being used to notify listeners about a dispose.
|
protected void |
doDispose() |
String |
getDescription()
Return the description.
|
String |
getLabel()
Returns the label.
|
ElementRegistry<ELEMENT,?> |
getRegistry() |
ELEMENT |
getResolvedElement() |
boolean |
isDisposed()
Whether this instance is already disposed.
|
boolean |
isResolved() |
void |
removeDisposeListener(ECPDisposable.DisposeListener listener)
Removed a
ECPDisposable.DisposeListener from this instance. |
protected abstract ELEMENT |
resolve() |
protected void |
resolvedElement(ELEMENT element) |
void |
setDescription(String description)
Sets the description.
|
void |
setLabel(String label)
Sets the label.
|
compareTo, equals, getName, getType, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getName
compareTo
public ElementDescriptor(ElementRegistry<ELEMENT,?> registry, String name)
public final ElementRegistry<ELEMENT,?> getRegistry()
public final String getLabel()
getLabel
in interface InternalRegistryElement
public final void setLabel(String label)
setLabel
in interface InternalRegistryElement
label
- the Label to setpublic final String getDescription()
getDescription
in interface InternalRegistryElement
public final void setDescription(String description)
setDescription
in interface InternalRegistryElement
description
- the Description to setpublic final boolean isResolved()
isResolved
in interface InternalDescriptor<ELEMENT extends ECPElement>
public final ELEMENT getResolvedElement()
getResolvedElement
in interface InternalDescriptor<ELEMENT extends ECPElement>
public final boolean isDisposed()
isDisposed
in interface ECPDisposable
public final void dispose()
dispose
in interface ECPDisposable
public final void addDisposeListener(ECPDisposable.DisposeListener listener)
ECPDisposable.DisposeListener
to this instance.addDisposeListener
in interface ECPDisposable
listener
- the listener to addpublic final void removeDisposeListener(ECPDisposable.DisposeListener listener)
ECPDisposable.DisposeListener
from this instance.removeDisposeListener
in interface ECPDisposable
listener
- the listener to removepublic final void disposed(ECPDisposable disposable)
disposed
in interface ECPDisposable.DisposeListener
disposable
- the object being disposedprotected void doDispose()
protected void resolvedElement(ELEMENT element)
Copyright © 2019. All rights reserved.