/** Unregisters all the listeners registered by this SoughtGraphPlugin. */ protected void unregisterListeners() { SeekConnection conn = (SeekConnection) getConn(); soughtGraph.removeSeekSelectionListener(this); conn.getSeekListenerManager().removeSeekListener(this); // Just in case. getConn().getListenerManager().removeConnectionListener(this); }
/** Gets called when the seek graph container is made invisible. */ public void pluginUIHidden(PluginUIEvent evt) { soughtGraph.removeAllSeeks(); SeekConnection conn = (SeekConnection) getConn(); conn.getSeekListenerManager().removeSeekListener(this); }
/** Remove all seeks on disconnection. This just seems to make more sense than leaving them on. */ public void connectionLost(Connection conn) { soughtGraph.removeAllSeeks(); }
/** SeekListener implementation. Gets called when a seek is removed. */ public void seekRemoved(SeekEvent evt) { soughtGraph.removeSeek(evt.getSeek()); }
/** SeekListener implementation. Gets called when a seek is added. */ public void seekAdded(SeekEvent evt) { soughtGraph.addSeek(evt.getSeek()); }
/** Registers the necessary listeners. */ protected void registerListeners() { soughtGraph.addSeekSelectionListener(this); getConn().getListenerManager().addConnectionListener(this); }