public abstract class Annotation extends Object
See more - description of the way to declare an Annotation.
Modifier and Type | Field and Description |
---|---|
static String |
PROP_ANNOTATION_TYPE
Property name of the annotation type
|
static String |
PROP_MOVE_TO_FRONT
Virtual property which does not have getter/setter.
|
static String |
PROP_SHORT_DESCRIPTION
Property name of the tip text
|
Constructor and Description |
---|
Annotation() |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
Add listeners on changes of annotation properties
|
void |
attach(Annotatable anno)
Attach annotation to Annotatable object.
|
void |
detach()
Detach annotation.
|
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Fire property change to registered listeners.
|
abstract String |
getAnnotationType()
Returns name of the file which describes the annotation type.
|
Annotatable |
getAttachedAnnotatable()
Gets annotatable object to which this annotation is attached.
|
abstract String |
getShortDescription()
Gets the tool tip text for this annotation.
|
void |
moveToFront()
Helper method for moving annotation which is covered by other annotations
on the same line in front of others.
|
protected void |
notifyAttached(Annotatable toAnno)
Notifies the annotation that it was attached
to the annotatable.
|
protected void |
notifyDetached(Annotatable fromAnno)
Notifies the annotation that it was detached
from the annotatable.
|
void |
removePropertyChangeListener(PropertyChangeListener l)
Remove listeners on changes of annotation properties
|
public static final String PROP_SHORT_DESCRIPTION
public static final String PROP_ANNOTATION_TYPE
public static final String PROP_MOVE_TO_FRONT
public abstract String getAnnotationType()
public abstract String getShortDescription()
public final void attach(Annotatable anno)
anno
- annotatable class to which this annotation will be attachedprotected void notifyAttached(Annotatable toAnno)
toAnno
- annotatable to which the annotation
was attached.public final void detach()
protected void notifyDetached(Annotatable fromAnno)
fromAnno
- annotatable from which the annotation
was detached.public final Annotatable getAttachedAnnotatable()
public final void addPropertyChangeListener(PropertyChangeListener l)
l
- change listenerpublic final void removePropertyChangeListener(PropertyChangeListener l)
l
- change listenerprotected final void firePropertyChange(String propertyName, Object oldValue, Object newValue)
public final void moveToFront()