Warning
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeans
has been added to the java.beans package.
Please see java..
| Modifier and Type | Class and Description |
|---|---|
| public static class | HyperlinkEvent.
Defines the ENTERED, EXITED, and ACTIVATED event types, along with their string representations, returned by toString(). |
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private InputEvent | |
| private Element | |
| private HyperlinkEvent. | |
| private URL |
| Access | Constructor and Description |
|---|---|
| public | HyperlinkEvent(Object
the object responsible for the event source, HyperlinkEvent.the event type type,the affected URL u)Creates a new object representing a hypertext link event. |
| public | HyperlinkEvent(Object
the object responsible for the event source, HyperlinkEvent.the event type type,the affected URL. This may be null if a valid URL
could not be created. u, String the description of the link. This may be useful
when attempting to form a URL resulted in a MalformedURLException.
The description provides the text used when attempting to form the
URL. desc)Creates a new object representing a hypertext link event. |
| public | HyperlinkEvent(Object
the object responsible for the event source, HyperlinkEvent.the event type type,the affected URL. This may be null if a valid URL
could not be created. u, String the description of the link. This may be useful
when attempting to form a URL resulted in a MalformedURLException.
The description provides the text used when attempting to form the
URL. desc, Element Element in the Document representing the
anchor sourceElement)Creates a new object representing a hypertext link event. |
| public | HyperlinkEvent(Object
the object responsible for the event source, HyperlinkEvent.the event type type,the affected URL. This may be null if a valid URL
could not be created. u, String the description of the link. This may be useful
when attempting to form a URL resulted in a MalformedURLException.
The description provides the text used when attempting to form the
URL. desc, Element Element in the Document representing the
anchor sourceElement, InputEvent InputEvent that triggered the hyperlink event inputEvent)Creates a new object representing a hypertext link event. |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: the description of this link as aStringGet the description of the link as a string. |
| public HyperlinkEvent. | |
| public InputEvent | Returns: InputEvent that triggered the hyperlink event, or nullReturns the |
| public Element | Returns: Element indicating source of event, or nullReturns the |
| public URL |
| desc | back to summary |
|---|---|
| private String desc | |
| inputEvent | back to summary |
|---|---|
| private InputEvent inputEvent | |
| sourceElement | back to summary |
|---|---|
| private Element sourceElement | |
| type | back to summary |
|---|---|
| private HyperlinkEvent. | |
| u | back to summary |
|---|---|
| private URL u | |
| HyperlinkEvent | back to summary |
|---|---|
| public HyperlinkEvent(Object source, HyperlinkEvent. Creates a new object representing a hypertext link event. The other constructor is preferred, as it provides more information if a URL could not be formed. This constructor is primarily for backward compatibility.
| |
| HyperlinkEvent | back to summary |
|---|---|
| public HyperlinkEvent(Object source, HyperlinkEvent. Creates a new object representing a hypertext link event.
| |
| HyperlinkEvent | back to summary |
|---|---|
| public HyperlinkEvent(Object source, HyperlinkEvent. Creates a new object representing a hypertext link event.
| |
| HyperlinkEvent | back to summary |
|---|---|
| public HyperlinkEvent(Object source, HyperlinkEvent. Creates a new object representing a hypertext link event.
| |
| getDescription | back to summary |
|---|---|
| public String getDescription() Get the description of the link as a string. This may be useful if a URL can't be formed from the description, in which case the associated URL would be null.
| |
| getEventType | back to summary |
|---|---|
| public HyperlinkEvent. Gets the type of event.
| |
| getInputEvent | back to summary |
|---|---|
| public InputEvent getInputEvent() Returns the
| |
| getSourceElement | back to summary |
|---|---|
| public Element getSourceElement() Returns the
| |
| getURL | back to summary |
|---|---|
| public URL getURL() Gets the URL that the link refers to.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final HyperlinkEvent. | ACTIVATED
Activated type. |
| public static final HyperlinkEvent. | ENTERED
Entered type. |
| public static final HyperlinkEvent. | EXITED
Exited type. |
| private String |
| Modifier and Type | Method and Description |
|---|---|
| public String |
| ACTIVATED | back to summary |
|---|---|
| public static final HyperlinkEvent. Activated type. | |
| ENTERED | back to summary |
|---|---|
| public static final HyperlinkEvent. Entered type. | |
| EXITED | back to summary |
|---|---|
| public static final HyperlinkEvent. Exited type. | |
| typeString | back to summary |
|---|---|
| private String typeString | |
| EventType | back to summary |
|---|---|
| private EventType(String s) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Converts the type to a string.
| |