|
From: <fle...@us...> - 2008-02-04 15:44:17
|
Revision: 730
http://magicmap.svn.sourceforge.net/magicmap/?rev=730&view=rev
Author: flederohr
Date: 2008-02-04 07:43:54 -0800 (Mon, 04 Feb 2008)
Log Message:
-----------
added right-click-menu for accesspoint-hiding
Modified Paths:
--------------
trunk/magicmapclient/src/net/sf/magicmap/client/gui/views/OutlineView.java
Modified: trunk/magicmapclient/src/net/sf/magicmap/client/gui/views/OutlineView.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/gui/views/OutlineView.java 2008-02-04 15:22:07 UTC (rev 729)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/gui/views/OutlineView.java 2008-02-04 15:43:54 UTC (rev 730)
@@ -333,9 +333,12 @@
case MouseEvent.BUTTON3 :
// TODO: right-click-menu
Node node;
- // check if MapNode is selected
if ((node = ((OutlineTreeNode) ((OutlineTree) e.getSource()).getSelectionPath().getLastPathComponent())
- .getNode()) instanceof Node) this.getMenuContainer().buildMenu(node, new JPopupMenu()).show(this, e.getX(), e.getY());
+ .getNode()) instanceof Node){
+ JPopupMenu menu;
+ if((menu = this.getMenuContainer().buildMenu(node, new JPopupMenu())).getComponentCount() > 0)
+ menu.show(this, e.getX(), e.getY());
+ }
break;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|