public abstract class BaseAnnotationProvider extends Object
ServiceProvider
.
This is a replacement for former AnnotationProvider
API, which depends on java.awt.
The original API has moved to a UI-dependent module, org.netbeans.modules.masterfs.ui
Constructor and Description |
---|
BaseAnnotationProvider() |
Modifier and Type | Method and Description |
---|---|
void |
addFileStatusListener(FileStatusListener listener)
Registers FileStatusListener to receive events.
|
abstract String |
annotateName(String name,
Set<? extends FileObject> files)
Annotate the name of a file cluster.
|
abstract String |
annotateNameHtml(String name,
Set<? extends FileObject> files)
Annotate a name such that the returned value contains HTML markup.
|
Lookup |
findExtrasFor(Set<? extends FileObject> files)
Provides various (usually UI related) information about
the given set of files.
|
protected void |
fireFileStatusChanged(FileStatusEvent event)
Notifies all registered listeners about change of status of some files.
|
abstract InterceptionListener |
getInterceptionListener()
Returns an InterceptionListener.
|
void |
removeFileStatusListener(FileStatusListener listener)
Removes FileStatusListener from the list of listeners.
|
public abstract String annotateName(String name, Set<? extends FileObject> files)
name
- the name suggested by defaultfiles
- an immutable set of FileObject
s belonging to this filesystempublic abstract String annotateNameHtml(String name, Set<? extends FileObject> files)
annotateName()
. This is used,
for example, by VCS filesystems to deemphasize the status information
included in the file name by using a light grey font color.
For consistency with Node.getHtmlDisplayName()
,
filesystems that proxy other filesystems (and so must implement
this interface to supply HTML annotations) should return null if
the filesystem they proxy does not provide an implementation of
HTMLStatus.
name
- the name suggested by default. It cannot contain HTML
markup tags but must escape HTML metacharacters. For example
"<default package>" is illegal but "<default package>"
is fine.files
- an immutable set of FileObject
s belonging to this filesystemDataNode.getHtmlDisplayName()
,
org.openide.nodes.Node#getHtmlDisplayNamepublic Lookup findExtrasFor(Set<? extends FileObject> files)
files
- the files toFileSystem.findExtrasFor(java.util.Set<org.openide.filesystems.FileObject>)
- may return null
public final void addFileStatusListener(FileStatusListener listener) throws TooManyListenersException
listener
- The listener to register.TooManyListenersException
public final void removeFileStatusListener(FileStatusListener listener)
listener
- The listener to remove.protected final void fireFileStatusChanged(FileStatusEvent event)
event
- The event to be firedpublic abstract InterceptionListener getInterceptionListener()