public abstract class SearchScopeDefinition extends Object
Constructor and Description |
---|
SearchScopeDefinition() |
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener l)
Registers a listener listening for changes of applicability.
|
abstract void |
clean()
This method is called when this search scope definition is no longer
needed.
|
String |
getAdditionalInfo()
Returns an additional information about this search scope.
|
abstract String |
getDisplayName()
Returns human-readable, localized name of this search scope.
|
Icon |
getIcon()
Get icon to show in the combo box.
|
abstract int |
getPriority()
Get priority of this search scope.
|
abstract SearchInfo |
getSearchInfo()
Returns object defining the actual search scope, i.e.
|
abstract String |
getTypeId()
Identifies type of search scope.
|
abstract boolean |
isApplicable()
Is this search scope applicable at the moment?
For example, search scope of all open projects is not applicable if there
is no open project.
|
protected void |
notifyListeners()
This method should be called whenever the state of current search scope
changes.
|
void |
removeChangeListener(ChangeListener l)
Unregisters a listener listening for changes of applicability.
|
void |
selected()
This method is called when the search scope is selected in the UI.
|
String |
toString() |
@NonNull public abstract String getDisplayName()
@CheckForNull public String getAdditionalInfo()
null
.null
if no additional information is availablepublic abstract boolean isApplicable()
true
if this search scope is applicable,
false
otherwisepublic final void addChangeListener(@NonNull ChangeListener l)
SearchScope
changes.l
- listener to be registeredSearchScopeDefinition.isApplicable()
public final void removeChangeListener(@NonNull ChangeListener l)
null
,
this method has no effect.l
- listener to be unregisteredSearchScopeDefinition.addChangeListener(javax.swing.event.ChangeListener)
,
SearchScopeDefinition.isApplicable()
protected final void notifyListeners()
@NonNull public abstract SearchInfo getSearchInfo()
FileObject
s to be searched.SearchInfo
defining the search scopepublic abstract int getPriority()
public abstract void clean()
public void selected()
@CheckForNull public Icon getIcon()