|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDocumentNavigator<ItemT extends INavigatorItem>
IDocumentNavigator
provides a framework through which individual IDocuments
can be
navigated.
Field Summary | |
---|---|
static String |
MODEL_INITIATED_PROPERTY_NAME
The name of the client property that determines whether a change is model- or user-initiated. |
Method Summary | ||
---|---|---|
void |
addDocument(ItemT doc)
Adds an IDocuemnt to this navigator. |
|
void |
addDocument(ItemT doc,
String path)
Adds an INavigatorItem into this navigator in a position relative to a given path. |
|
void |
addFocusListener(FocusListener e)
Add FocusListener to navigator. |
|
void |
addNavigationListener(INavigationListener<? super ItemT> listener)
Adds an INavigationListener to this navigator. |
|
void |
addTopLevelGroup(String name,
INavigatorItemFilter<? super ItemT> f)
Adds the top level group with the specified name and filter. |
|
Container |
asContainer()
|
|
void |
clear()
Removes all INavigatorItem s from this IDocumentNavigator . |
|
boolean |
contains(ItemT doc)
Tests to see if a given document is contained in this navigator. |
|
|
execute(IDocumentNavigatorAlgo<ItemT,InType,ReturnType> algo,
InType input)
Visitor pattern hook method. |
|
ItemT |
getCurrent()
Returns the currently selected navigator item, or null if no navigator item is selected. |
|
int |
getDocumentCount()
Returns the number of INavigatorItem s contained by this IDocumentNavigator |
|
ArrayList<ItemT> |
getDocuments()
Returns all the IDocuments in the collection in enumeration order. |
|
int |
getDocumentSelectedCount()
|
|
ArrayList<ItemT> |
getDocumentsInBin(String binName)
Returns all the IDocuments contained in the specified bin. |
|
ItemT |
getFirst()
|
|
FocusListener[] |
getFocusListeners()
Gets the FocustListeners. |
|
int |
getGroupSelectedCount()
|
|
ItemT |
getLast()
|
|
Object |
getModelLock()
Returns the model lock for this navigator. |
|
Set<String> |
getNamesOfSelectedTopLevelGroup()
Returns the names of the top level groups that the selected items descend from. |
|
Collection<INavigationListener<? super ItemT>> |
getNavigatorListeners()
Returns a collection of all listeners registered with this navigator. |
|
ItemT |
getNext(ItemT doc)
The following five operations impose a natural ordering on the documents in the navigator. |
|
ItemT |
getPrevious(ItemT doc)
|
|
List<ItemT> |
getSelectedDocuments()
|
|
List<File> |
getSelectedFolders()
|
|
int |
getSelectionCount()
|
|
boolean |
isDocumentSelected()
|
|
boolean |
isEmpty()
Returns whether this IDocumentNavigator contains any INavigatorItem s. |
|
boolean |
isGroupSelected()
|
|
boolean |
isNextChangeModelInitiated()
|
|
boolean |
isRootSelected()
Returns true if the root is selected. |
|
boolean |
isSelectedAt(int x,
int y)
Returns true if the item at the x,y coordinate of the navigator pane is currently selected. |
|
boolean |
isSelectedInGroup(ItemT i)
|
|
boolean |
isTopLevelGroupSelected()
Returns true if at least one top level group is selected, false otherwise. |
|
void |
refreshDocument(ItemT doc,
String path)
Resets a given INavigatorItem |
|
ItemT |
removeDocument(ItemT doc)
Removes a given INavigatorItem |
|
void |
removeFocusListener(FocusListener e)
Remove FocusListener from navigator. |
|
void |
removeNavigationListener(INavigationListener<? super ItemT> listener)
Removes the given listener from observing this navigator. |
|
void |
repaint()
The standard swing repaint() method. |
|
void |
requestSelectionUpdate(ItemT i)
Switches the selection to the given INavigatorItem if the current selection is not already on an INavigatorItem. |
|
void |
selectDocument(ItemT doc)
Sets the active document as specified. |
|
boolean |
selectDocumentAt(int x,
int y)
Selects the document at the x,y coordinates of the navigator pane and makes it the active document. |
|
void |
setNextChangeModelInitiated(boolean b)
Marks the next selection change as model-initiated (true) or user-initiated (false; default). |
Methods inherited from interface edu.rice.cs.util.docnavigation.IAWTContainerNavigatorActor |
---|
getRenderer |
Field Detail |
---|
static final String MODEL_INITIATED_PROPERTY_NAME
Method Detail |
---|
Container asContainer()
asContainer
in interface IAWTContainerNavigatorActor
void addDocument(ItemT doc)
IDocuemnt
to this navigator.
doc
- the document to be added into this navigator.void addDocument(ItemT doc, String path)
INavigatorItem
into this navigator in a position relative to a given path.
doc
- the document to be added into this navigator.path
- the relative path to insert this INavigatorItem at.ItemT getCurrent()
Object getModelLock()
ItemT removeDocument(ItemT doc)
INavigatorItem from this navigator. Removes all INavigatorItem
s
from this navigator that are "equal" (.equals(...)
) to the passed argument. Any of the
removed documents may be returned by this method.
- Parameters:
doc
- the docment to be removed
- Returns:
- doc a document removed from this navigator as a result of invoking this method.
- Throws:
IllegalArgumentException
- if this navigator contains no document equal to the passed document.
void refreshDocument(ItemT doc, String path)
INavigatorItem in the tree. This may affect the placement of the item or its
display to reflect any changes made in the model.
- Parameters:
doc
- the docment to be refreshed
- Throws:
IllegalArgumentException
- if this navigator contains no document that is equal to the passed document.
void selectDocument(ItemT doc)
doc
- the document to selectItemT getNext(ItemT doc)
doc
- the INavigatorItem of interest
ItemT getPrevious(ItemT doc)
doc
- the INavigatorItem of interest
ItemT getFirst()
ItemT getLast()
ArrayList<ItemT> getDocuments()
IDocuments
in the collection in enumeration order.
INavigatorItem enumeration of this navigator's contents.
ArrayList<ItemT> getDocumentsInBin(String binName)
IDocuments
contained in the specified bin.
binName
- name of bin
INavigatorItem enumeration of this navigator's contents.
boolean contains(ItemT doc)
doc
- the document to test for containment.
true
if this contains a document "equal" (.equals(...)
method)
to the passed document, else false
.int getDocumentCount()
INavigatorItem
s contained by this IDocumentNavigator
boolean isEmpty()
IDocumentNavigator
contains any INavigatorItem
s.
true
if this navigator contains one or more documents, else false
.void clear()
INavigatorItem
s from this IDocumentNavigator
.
void addNavigationListener(INavigationListener<? super ItemT> listener)
INavigationListener
to this navigator. After invoking this method, the passed listener
will observe events generated this navigator. If the provided listener is already observing this navigator
(==
), no action is taken.
listener
- the listener to be added to this navigator.void removeNavigationListener(INavigationListener<? super ItemT> listener)
==
) will no longer receive observable dispatches.
listener
- the listener to be removed from this navigatorvoid addFocusListener(FocusListener e)
void removeFocusListener(FocusListener e)
FocusListener[] getFocusListeners()
Collection<INavigationListener<? super ItemT>> getNavigatorListeners()
boolean selectDocumentAt(int x, int y)
x
- the x coordinate of the navigator paney
- the y coordinate of the navigator paneboolean isSelectedAt(int x, int y)
x
- the x coordinate of the navigator paney
- the y coordinate of the navigator pane
<InType,ReturnType> ReturnType execute(IDocumentNavigatorAlgo<ItemT,InType,ReturnType> algo, InType input)
algo
- the algorithm to run on this navigatorinput
- the input to the algorithmint getSelectionCount()
boolean isGroupSelected()
int getGroupSelectedCount()
List<File> getSelectedFolders()
boolean isDocumentSelected()
int getDocumentSelectedCount()
List<ItemT> getSelectedDocuments()
boolean isRootSelected()
boolean isSelectedInGroup(ItemT i)
void addTopLevelGroup(String name, INavigatorItemFilter<? super ItemT> f)
boolean isTopLevelGroupSelected()
Set<String> getNamesOfSelectedTopLevelGroup() throws GroupNotSelectedException
GroupNotSelectedException
void requestSelectionUpdate(ItemT i)
i
- The suggested current INavigatorItem.void repaint()
void setNextChangeModelInitiated(boolean b)
boolean isNextChangeModelInitiated()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |