public void run() { customCommandAvailable(command); } });
public void run() { customExceptionOccurred(exception); } });
public void run() { customFinished(); } });
@Classname("human") public IFuture<Void> execute(IInternalAccess ia) { ia.getComponentFeature(IMonitoringComponentFeature.class).subscribeToEvents(IMonitoringEvent.TERMINATION_FILTER, false, PublishEventLevel.COARSE) .addResultListener(new SwingIntermediateResultListener<IMonitoringEvent>(new IntermediateDefaultResultListener<IMonitoringEvent>() { public void intermediateResultAvailable(IMonitoringEvent result) { HumanPlayerInterface.this.dispose(); } })); return IFuture.DONE; } });
@Classname("tray") public IFuture<Void> execute(IInternalAccess ia) { ia.getComponentFeature(IMonitoringComponentFeature.class).subscribeToEvents(IMonitoringEvent.TERMINATION_FILTER, false, PublishEventLevel.COARSE) .addResultListener(new SwingIntermediateResultListener<IMonitoringEvent>(new IntermediateDefaultResultListener<IMonitoringEvent>() { public void intermediateResultAvailable(IMonitoringEvent result) { dislis.exceptionOccurred(null); } })); return IFuture.DONE; } }).addResultListener(dislis);
@Classname("tray") public IFuture<Void> execute(IInternalAccess ia) { ia.getComponentFeature(IMonitoringComponentFeature.class).subscribeToEvents(IMonitoringEvent.TERMINATION_FILTER, false, PublishEventLevel.COARSE) .addResultListener(new SwingIntermediateResultListener<IMonitoringEvent>(new IntermediateDefaultResultListener<IMonitoringEvent>() { public void intermediateResultAvailable(IMonitoringEvent result) { dislis.exceptionOccurred(null); } })); return IFuture.DONE; } }).addResultListener(dislis);
/** * Called when an exception occurred. * @param exception The exception. */ public void exceptionOccurred(final Exception exception) { // exception.printStackTrace(); // Hack!!! When triggered from shutdown hook, swing might be terminated // and invokeLater has no effect (grrr). if(!SReflect.HAS_GUI || SwingUtilities.isEventDispatchThread())// || Starter.isShutdown()) // if(SwingUtilities.isEventDispatchThread()) { customExceptionOccurred(exception); } else { // Thread.dumpStack(); SwingUtilities.invokeLater(new Runnable() { public void run() { customExceptionOccurred(exception); } }); } }
/** * Called when a command is available. */ final public void commandAvailable(final Object command) { // Hack!!! When triggered from shutdown hook, swing might be terminated // and invokeLater has no effect (grrr). if(!SReflect.HAS_GUI || SwingUtilities.isEventDispatchThread())// || Starter.isShutdown()) // if(SwingUtilities.isEventDispatchThread()) { customCommandAvailable(command); } else { // Thread.dumpStack(); SwingUtilities.invokeLater(new Runnable() { public void run() { customCommandAvailable(command); } }); } }
/** * Declare that the future is finished. * This method is only called for intermediate futures, * i.e. when this method is called it is guaranteed that the * intermediateResultAvailable method was called for all * intermediate results before. */ public void finished() { // Hack!!! When triggered from shutdown hook, swing might be terminated // and invokeLater has no effect (grrr). if(!SReflect.HAS_GUI || SwingUtilities.isEventDispatchThread())// || Starter.isShutdown()) // if(SwingUtilities.isEventDispatchThread()) { customFinished(); } else { SwingUtilities.invokeLater(new Runnable() { public void run() { customFinished(); } }); } }
.addResultListener(new SwingIntermediateResultListener<IMonitoringEvent>(new IntermediateDefaultResultListener<IMonitoringEvent>()
public IFuture<Void> execute(IInternalAccess ia) { // ia.addComponentListener(new TerminationAdapter() // { // public void componentTerminated() // { // SwingUtilities.invokeLater(new Runnable() // { // public void run() // { // f.dispose(); // } // }); // } // }); ia.getComponentFeature(IMonitoringComponentFeature.class).subscribeToEvents(IMonitoringEvent.TERMINATION_FILTER, false, PublishEventLevel.COARSE) .addResultListener(new SwingIntermediateResultListener<IMonitoringEvent>(new IntermediateDefaultResultListener<IMonitoringEvent>() { public void intermediateResultAvailable(IMonitoringEvent result) { f.dispose(); } })); return IFuture.DONE; } }).addResultListener(dislis);
@Classname("dispose") public IFuture<Void> execute(IInternalAccess ia) { // System.out.println("booktrading2: "+agent.getComponentIdentifier()); ia.getComponentFeature(IMonitoringComponentFeature.class).subscribeToEvents(IMonitoringEvent.TERMINATION_FILTER, false, PublishEventLevel.COARSE) .addResultListener(new SwingIntermediateResultListener<IMonitoringEvent>(new IntermediateDefaultResultListener<IMonitoringEvent>() { public void intermediateResultAvailable(IMonitoringEvent result) { dispose(); } })); return IFuture.DONE; } }).addResultListener(dislis);
@Classname("dispose") public IFuture<Void> execute(IInternalAccess ia) { // System.out.println("booktrading2: "+agent.getComponentIdentifier()); ia.getComponentFeature(IMonitoringComponentFeature.class).subscribeToEvents(IMonitoringEvent.TERMINATION_FILTER, false, PublishEventLevel.COARSE) .addResultListener(new SwingIntermediateResultListener<IMonitoringEvent>(new IntermediateDefaultResultListener<IMonitoringEvent>() { public void intermediateResultAvailable(IMonitoringEvent result) { dispose(); } })); return IFuture.DONE; } }).addResultListener(dislis);
ToolTipManager.sharedInstance().registerComponent(tree); monservice.subscribeToEvents(null).addResultListener(new SwingIntermediateResultListener<IMonitoringEvent>(new IIntermediateResultListener<IMonitoringEvent>()
@Classname("dispose") public IFuture<Void> execute(IInternalAccess ia) { ia.getComponentFeature(IMonitoringComponentFeature.class).subscribeToEvents(IMonitoringEvent.TERMINATION_FILTER, false, PublishEventLevel.COARSE) .addResultListener(new SwingIntermediateResultListener<IMonitoringEvent>(new IntermediateDefaultResultListener<IMonitoringEvent>() { public void intermediateResultAvailable(IMonitoringEvent result) { EnvironmentGui.this.dispose(); } })); return IFuture.DONE; } });
@Classname("dispose") public IFuture<Void> execute(IInternalAccess ia) { ia.getComponentFeature(IMonitoringComponentFeature.class).subscribeToEvents(IMonitoringEvent.TERMINATION_FILTER, false, PublishEventLevel.COARSE) .addResultListener(new SwingIntermediateResultListener<IMonitoringEvent>(new IntermediateDefaultResultListener<IMonitoringEvent>() { public void intermediateResultAvailable(IMonitoringEvent result) { setVisible(false); dispose(); } })); return IFuture.DONE; } }).addResultListener(dislis);
@Classname("dispose") public IFuture<Void> execute(IInternalAccess ia) { ia.getComponentFeature(IMonitoringComponentFeature.class).subscribeToEvents(IMonitoringEvent.TERMINATION_FILTER, false, PublishEventLevel.COARSE) .addResultListener(new SwingIntermediateResultListener<IMonitoringEvent>(new IntermediateDefaultResultListener<IMonitoringEvent>() { public void intermediateResultAvailable(IMonitoringEvent result) { ManagerFrame.this.dispose(); cmsuh.dispose(); } })); return IFuture.DONE; } }).addResultListener(dislis);
.addResultListener(new SwingIntermediateResultListener<IMonitoringEvent>(new IntermediateDefaultResultListener<IMonitoringEvent>()
ToolTipManager.sharedInstance().registerComponent(tree); monservice.subscribeToEvents(null).addResultListener(new SwingIntermediateResultListener<IMonitoringEvent>(new IIntermediateResultListener<IMonitoringEvent>()
fut[0].addResultListener(new SwingIntermediateResultListener<Class<?>>(new IIntermediateResultListener<Class<?>>()