Class HyperLink
java.lang.Object
|
+--HyperLink
- public class HyperLink
- extends java.lang.Object
A hyperlink. A hyperlink is a collection of an URL and a
rectangle. The hyperlink is active within that rectangle.
|
Constructor Summary |
HyperLink(int x,
int y,
int w,
int h,
java.net.URL u)
Creates a new hyperlink. |
|
Method Summary |
boolean |
contains(int a,
int b)
Checks to see if (a, b) is within this link. |
java.net.URL |
getURL()
Returns the URL of this hyperlink. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HyperLink
public HyperLink(int x,
int y,
int w,
int h,
java.net.URL u)
- Creates a new hyperlink.
- Parameters:
x - the x coordinate of the top-left corner.y - the y coordinate of the top-left corner.w - the width of the link.h - the height of the link.u - the URL this links points to.
contains
public boolean contains(int a,
int b)
- Checks to see if (
a, b) is within this link.
- Parameters:
a - the x coordinate.b - the y coordinate.- Returns:
true if (a, b)
is within the boundaries of this link.
getURL
public java.net.URL getURL()
- Returns the URL of this hyperlink.
- Returns:
- the URL.