public void showLink ( final String href ) { if ( null != href && ! href . isEmpty ( ) ) { if ( logger . isTraceEnabled ( ) ) { logger . trace ( "JS asks to browse to {}" , href ) ; } if ( ! Desktop . isDesktopSupported ( ) ) { if ( logger . isWarnEnabled ( ) ) { logger . warn ( "no desktop support for displaying {}" , href ) ; } } else { try { Desktop . getDesktop ( ) . browse ( new URI ( href ) ) ; } catch ( final IOException | URISyntaxException e ) { if ( logger . isWarnEnabled ( ) ) { logger . warn ( "can't display {}" , href , e ) ; } } } } }
called when an a href in the map is clicked and shows the URL in the default browser .