Changeset 98 for java/main/src/main/java/com/framsticks/gui/Browser.java
- Timestamp:
- 07/08/13 23:04:56 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/main/src/main/java/com/framsticks/gui/Browser.java
r97 r98 14 14 import com.framsticks.util.dispatching.ExceptionResultHandler; 15 15 import com.framsticks.util.dispatching.Future; 16 import com.framsticks.util.dispatching.FutureHandler;17 16 import com.framsticks.util.dispatching.Joinable; 18 17 import com.framsticks.util.dispatching.JoinableCollection; … … 46 45 47 46 protected final List<PopupMenuEntryProvider> popupMenuEntryProviders = new LinkedList<>(); 47 // protected final SwingDispatcher 48 48 49 49 protected final MainFrame mainFrame; … … 63 63 64 64 mainFrame = new MainFrame(Browser.this); 65 66 // mainFrame.getStatusBar().setExceptionHandler(ThrowExceptionHandler.getInstance()); 67 65 68 addFrame(mainFrame); 66 69 … … 120 123 public void addTree(Tree tree) { 121 124 log.info("adding tree: " + tree); 125 tree.setDispatcher(new SwingDispatcher<Tree>()); 122 126 trees.add(tree); 123 127 } 124 128 125 129 public void autoResolvePath(final String path, final Future<Path> future) { 126 final Tree i = trees.get("localhost");127 i.dispatch(new RunAt<Tree>(future) {128 @Override129 protected void runAt() {130 TreeOperations.resolveAndGet(i, path, new FutureHandler<Path>(future) {131 @Override132 protected void result(final Path p) {133 future.pass(p);134 mainFrame.dispatch(new RunAt<Frame>(future) {135 @Override136 protected void runAt() {137 mainFrame.goTo(p);138 }139 });140 }141 });142 }143 });130 // final Tree i = trees.get("localhost"); 131 // i.dispatch(new RunAt<Tree>(future) { 132 // @Override 133 // protected void runAt() { 134 // TreeOperations.tryGet(i, path, new FutureHandler<Path>(future) { 135 // @Override 136 // protected void result(final Path p) { 137 // future.pass(p); 138 // mainFrame.dispatch(new RunAt<Frame>(future) { 139 // @Override 140 // protected void runAt() { 141 // mainFrame.goTo(p); 142 // } 143 // }); 144 // } 145 // }); 146 // } 147 // }); 144 148 } 145 149 … … 284 288 } 285 289 286 // @Override 287 // public boolean isDone() { 288 // return frames.isDone() && trees.isDone(); 290 // final protected Map<EventParam, Subscription<?>> userSubscriptions = new HashMap<>(); 291 // public boolean hasSubscribed(EventParam param) { 292 // assert frame.isActive(); 293 // return userSubscriptions.containsKey(param); 289 294 // } 295 296 // public void unsubscribe(EventParam eventParam) { 297 // assert frame.isActive(); 298 // if (!hasSubscribed(eventParam)) { 299 // log.error("could not unsubscribe from " + eventParam); 300 // return; 301 // } 302 // userSubscriptions.get(eventParam).unsubscribe(new LoggingStateCallback(log, "unsubscribed " + eventParam)); 303 // userSubscriptions.remove(eventParam); 304 // } 305 306 307 308 290 309 }
Note: See TracChangeset
for help on using the changeset viewer.