| org.netbeans.api.project.SourceGroup
SourceGroup | public interface SourceGroup (Code) | | Representation of one area of sources.
author: Jesse Glick See Also: Sources |
Method Summary | |
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.
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. | 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. |
PROP_CONTAINERSHIP | String PROP_CONTAINERSHIP(Code) | | Pseudo-property used to indicate changes in containership of some subfiles.
(The old and new value should be left null.)
|
addPropertyChangeListener | void addPropertyChangeListener(PropertyChangeListener listener)(Code) | | Add a listener to changes in aspects of the source group.
The property names used may be normal JavaBean names
(rootFolder , name , displayName ,
icon ) or
SourceGroup.PROP_CONTAINERSHIP .
Parameters: listener - a listener to add |
contains | boolean contains(FileObject file) throws IllegalArgumentException(Code) | | Check whether the given file is contained in this group.
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.
Parameters: file - a file or folder; must be a descendant of the root folder true if the group contains that file, false if it is to be excluded throws: IllegalArgumentException - if a file is passed which is not inside the root |
getDisplayName | String getDisplayName()(Code) | | Get a display name suitable for presentation to a user.
Should preferably be unique among the source groups of a given type
contained in a single
Sources object.
a display name |
getIcon | Icon getIcon(boolean opened)(Code) | | Get an icon for presentation to a user.
Parameters: opened - if true, may select an alternative "open" variant an icon, or null if no specific icon is needed |
getName | String getName()(Code) | | Get a code name suitable for internal identification of this source group.
Should be unique among the source groups of a given type
contained in a single
Sources object.
a code name |
getRootFolder | FileObject getRootFolder()(Code) | | Get the folder forming the root of this group of sources.
the root folder (must be a folder, not a file) |
removePropertyChangeListener | void removePropertyChangeListener(PropertyChangeListener listener)(Code) | | Remove a listener to changes in aspects of the source group.
Parameters: listener - a listener to remove |
|
|