gui
Class LinkMouseListener

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by gui.LinkMouseListener
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener

public class LinkMouseListener
extends java.awt.event.MouseAdapter


Nested Class Summary
static interface LinkMouseListener.ILinkGenerator
           
private  class LinkMouseListener.ImmutableLinkGenerator
           
 
Field Summary
private  LinkMouseListener.ILinkGenerator m_linkToOpen
           
 
Constructor Summary
LinkMouseListener()
          create a LinkMouseListener that can only be applied to a JLabel and will on click open an URL gotten from that JLabel's getText() method
LinkMouseListener(LinkMouseListener.ILinkGenerator a_Link)
           
LinkMouseListener(java.lang.String a_Link)
          create a LinkMouseListener that can be applied to any component will open the supplied link on click does not check if the supplied String is a valid URL
 
Method Summary
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 
Methods inherited from class java.awt.event.MouseAdapter
mouseDragged, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_linkToOpen

private LinkMouseListener.ILinkGenerator m_linkToOpen
Constructor Detail

LinkMouseListener

public LinkMouseListener()
create a LinkMouseListener that can only be applied to a JLabel and will on click open an URL gotten from that JLabel's getText() method


LinkMouseListener

public LinkMouseListener(java.lang.String a_Link)
create a LinkMouseListener that can be applied to any component will open the supplied link on click does not check if the supplied String is a valid URL

Parameters:
a_Link - String

LinkMouseListener

public LinkMouseListener(LinkMouseListener.ILinkGenerator a_Link)
Method Detail

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener
Overrides:
mouseClicked in class java.awt.event.MouseAdapter

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener
Overrides:
mouseEntered in class java.awt.event.MouseAdapter

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener
Overrides:
mouseExited in class java.awt.event.MouseAdapter