|
org.openide.text 6.9.22 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openide.text.Annotation
public abstract class Annotation
Description of annotation. The class is extended by modules which creates annotations and defines annotation type and tooltip. The annotation can be attached to Annotatable object. Editors which displays Annotations listen on PropertyChangeListner for changes of annotation type or tooltip text. The tooltip text can be evaluated asynchronously. It means that editors after the getShortDescription call must listen on PropertyChangeListner while the tooltip is visible. If the tooltip text property is changed, the tooltip value must be updated.
Field Summary | |
---|---|
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 Summary | |
---|---|
Annotation()
|
Method Summary | |
---|---|
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()
Returns the tooltip 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROP_SHORT_DESCRIPTION
public static final String PROP_ANNOTATION_TYPE
public static final String PROP_MOVE_TO_FRONT
Constructor Detail |
---|
public Annotation()
Method Detail |
---|
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()
|
org.openide.text 6.9.22 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |