1 33 34 package edu.rice.cs.util.docnavigation; 35 36 import java.util.*; 37 import java.awt.Container ; 38 import java.awt.event.FocusEvent ; 39 import java.awt.event.FocusListener ; 40 41 43 public interface IDocumentNavigator<ItemT extends INavigatorItem> extends IAWTContainerNavigatorActor { 44 45 public Container asContainer(); 46 47 50 public void addDocument(ItemT doc); 51 52 56 public void addDocument(ItemT doc, String path); 57 58 59 public ItemT getCurrent(); 60 61 62 public Object getModelLock(); 63 64 71 public ItemT removeDocument(ItemT doc); 72 73 78 public void refreshDocument(ItemT doc, String path); 79 80 83 public void setActiveDoc(ItemT doc); 84 85 91 public ItemT getNext(ItemT doc); 92 93 96 public ItemT getPrevious(ItemT doc); 97 98 100 public ItemT getFirst(); 101 102 104 public ItemT getLast(); 105 106 109 public Enumeration<ItemT> getDocuments(); 110 111 116 public boolean contains(ItemT doc); 117 118 121 public int getDocumentCount(); 122 123 126 public boolean isEmpty(); 127 128 129 public void clear(); 130 131 136 public void addNavigationListener(INavigationListener<? super ItemT> listener); 137 138 143 public void removeNavigationListener(INavigationListener<? super ItemT> listener); 144 145 146 public void addFocusListener(FocusListener e); 147 148 149 public void removeFocusListener(FocusListener e); 150 151 152 public FocusListener [] getFocusListeners(); 153 154 157 public Collection<INavigationListener<? super ItemT>> getNavigatorListeners(); 158 159 163 public boolean selectDocumentAt(int x, int y); 164 165 169 public <InType, ReturnType> ReturnType execute(IDocumentNavigatorAlgo<ItemT, InType, ReturnType> algo, InType input); 170 171 172 public boolean isGroupSelected(); 173 174 175 public boolean isSelectedInGroup(ItemT i); 176 177 178 public void addTopLevelGroup(String name, INavigatorItemFilter<? super ItemT> f); 179 180 181 public boolean isTopLevelGroupSelected(); 182 183 186 public String getNameOfSelectedTopLevelGroup() throws GroupNotSelectedException; 187 188 195 196 public void requestSelectionUpdate(ItemT i); 197 198 199 public void repaint(); 200 201 202 public void setNextChangeModelInitiated(boolean b); 203 204 205 public boolean isNextChangeModelInitiated(); 206 207 208 public static final String MODEL_INITIATED_PROPERTY_NAME = "ModelInitiated"; 209 210 } 212 | Popular Tags |