restructured focus menu items, removed debugging output

This commit is contained in:
fros4943 2010-04-26 08:05:31 +00:00
parent c7ef068f33
commit a430573688

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id: LogListener.java,v 1.27 2010/03/26 09:29:04 fros4943 Exp $ * $Id: LogListener.java,v 1.28 2010/04/26 08:05:31 fros4943 Exp $
*/ */
package se.sics.cooja.plugins; package se.sics.cooja.plugins;
@ -254,8 +254,10 @@ public class LogListener extends VisPlugin {
popupMenu.addSeparator(); popupMenu.addSeparator();
popupMenu.add(new JMenuItem(saveAction)); popupMenu.add(new JMenuItem(saveAction));
popupMenu.addSeparator(); popupMenu.addSeparator();
popupMenu.add(new JMenuItem(radioLoggerAction)); JMenu focusMenu = new JMenu("Focus (Space)");
popupMenu.add(new JMenuItem(timeLineAction)); focusMenu.add(new JMenuItem(timeLineAction));
focusMenu.add(new JMenuItem(radioLoggerAction));
popupMenu.add(focusMenu);
logTable.setComponentPopupMenu(popupMenu); logTable.setComponentPopupMenu(popupMenu);
@ -466,13 +468,13 @@ public class LogListener extends VisPlugin {
} }
}; };
private Action timeLineAction = new AbstractAction("to Timeline") { private Action timeLineAction = new AbstractAction("in Timeline ") {
private static final long serialVersionUID = -6358463434933029699L; private static final long serialVersionUID = -6358463434933029699L;
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
TimeLine plugin = (TimeLine) simulation.getGUI().getStartedPlugin(TimeLine.class.getName()); TimeLine plugin = (TimeLine) simulation.getGUI().getStartedPlugin(TimeLine.class.getName());
if (plugin == null) { if (plugin == null) {
logger.fatal("No Timeline plugin"); /*logger.fatal("No Timeline plugin");*/
return; return;
} }
@ -487,13 +489,13 @@ public class LogListener extends VisPlugin {
} }
}; };
private Action radioLoggerAction = new AbstractAction("to Radio Logger") { private Action radioLoggerAction = new AbstractAction("in Radio Logger") {
private static final long serialVersionUID = -3041714249257346688L; private static final long serialVersionUID = -3041714249257346688L;
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
RadioLogger plugin = (RadioLogger) simulation.getGUI().getStartedPlugin(RadioLogger.class.getName()); RadioLogger plugin = (RadioLogger) simulation.getGUI().getStartedPlugin(RadioLogger.class.getName());
if (plugin == null) { if (plugin == null) {
logger.fatal("No Radio Logger plugin"); /*logger.fatal("No Radio Logger plugin");*/
return; return;
} }