1 19 20 package org.netbeans.modules.welcome.content; 21 22 import java.awt.event.ActionEvent ; 23 import java.awt.event.MouseEvent ; 24 import org.openide.awt.StatusDisplayer; 25 26 30 public class WebLink extends LinkButton { 31 32 private String url; 33 34 35 public WebLink( String key, boolean showBullet ) { 36 this( BundleSupport.getLabel( key ), BundleSupport.getURL( key ), showBullet ); 37 } 38 39 public WebLink( String label, String url, boolean showBullet ) { 40 super( label, showBullet ); 41 this.url = url; 42 } 43 44 public void actionPerformed(ActionEvent e) { 45 Utils.showURL( url ); 46 } 47 48 protected void onMouseExited(MouseEvent e) { 49 StatusDisplayer.getDefault().setStatusText( "" ); 50 } 51 52 protected void onMouseEntered(MouseEvent e) { 53 StatusDisplayer.getDefault().setStatusText( url ); 54 } 55 } 56 57 | Popular Tags |