public interface SourceGroup
Sources
Modifier and Type | Field and Description |
---|---|
static String |
PROP_CONTAINERSHIP
Pseudo-property used to indicate changes in containership of some subfiles.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a listener to changes in aspects of the source group.
|
boolean |
contains(FileObject file)
Check whether the given file is contained in this group.
|
String |
getDisplayName()
Get a display name suitable for presentation to a user.
|
Icon |
getIcon(boolean opened)
Get an icon for presentation to a user.
|
String |
getName()
Get a code name suitable for internal identification of this source group.
|
FileObject |
getRootFolder()
Get the folder forming the root of this group of sources.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a listener to changes in aspects of the source group.
|
static final String PROP_CONTAINERSHIP
FileObject getRootFolder()
String getName()
Sources
object.String getDisplayName()
Sources
object.Icon getIcon(boolean opened)
opened
- if true, may select an alternative "open" variantboolean contains(FileObject file)
A constraint is that the root folder must be contained and if any file or folder (other than the root folder) is contained then its parent must be as well. Therefore, while the return value is precise for files, and a false return value means what it sounds like for folders, a true return value for folders may mean that just parts of the folder are contained in the group.
file
- a file or folder; must be a descendant of the root foldervoid addPropertyChangeListener(PropertyChangeListener listener)
rootFolder
, name
, displayName
,
icon
) or SourceGroup.PROP_CONTAINERSHIP
.listener
- a listener to addvoid removePropertyChangeListener(PropertyChangeListener listener)
listener
- a listener to remove