For the following:
private class LabelViewMouseListener extends MouseAdapter
{
private Camera ivCamera;
private LabelViewMouseListener( Camera camera )
{
ivCamera = camera;
}
@Override
public void mouseDoubleClick( MouseEvent e )
{
startCameraViewer( ivCamera );
}
@Override
public void mouseUp( MouseEvent e )
{
ivCamera.getPopupMenu().setVisible( true );
}
}
The idea is to get the menu on a click, yet start the viewer on a double click.
When the mouse "clicks", the mouseUp event fires. This brings up the popup menu. The menu positions itself just under the mouse pointer, so the double click does not register as the second click is now absorbed by the menu. If I am very quick and just twitch the mouse enough, I can sometimes get the mouseDoubleClick to fire.
Short of grafting special click abilities onto my users, how do I get this to work as desired?