gui
Class LinkMouseListener
java.lang.Object
java.awt.event.MouseAdapter
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
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 |
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 |
m_linkToOpen
private LinkMouseListener.ILinkGenerator m_linkToOpen
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)
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