com.inet.html
Class InetHtmlEditorKit.ExtendedHyperlinkEvent
java.lang.Object
java.util.EventObject
javax.swing.event.HyperlinkEvent
com.inet.html.InetHtmlEditorKit.ExtendedHyperlinkEvent
- All Implemented Interfaces:
- java.io.Serializable
- Enclosing class:
- InetHtmlEditorKit
public static class InetHtmlEditorKit.ExtendedHyperlinkEvent
- extends javax.swing.event.HyperlinkEvent
An extended hyperlink event to support link targets
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class javax.swing.event.HyperlinkEvent |
javax.swing.event.HyperlinkEvent.EventType |
Constructor Summary |
InetHtmlEditorKit.ExtendedHyperlinkEvent(java.lang.Object source,
javax.swing.event.HyperlinkEvent.EventType type,
java.net.URL u,
java.lang.String desc,
javax.swing.text.Element sourceElement)
Creates the event |
Method Summary |
java.lang.String |
getTarget()
Returns the target identifier |
void |
setTarget(java.lang.String target)
Sets the target of this link, like '_top' or '_blank' |
Methods inherited from class javax.swing.event.HyperlinkEvent |
getDescription, getEventType, getSourceElement, getURL |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TARGET_TOP
public static final java.lang.String TARGET_TOP
- See Also:
- Constant Field Values
TARGET_BLANK
public static final java.lang.String TARGET_BLANK
- See Also:
- Constant Field Values
TARGET_NEW_TAB
public static final java.lang.String TARGET_NEW_TAB
- See Also:
- Constant Field Values
InetHtmlEditorKit.ExtendedHyperlinkEvent
public InetHtmlEditorKit.ExtendedHyperlinkEvent(java.lang.Object source,
javax.swing.event.HyperlinkEvent.EventType type,
java.net.URL u,
java.lang.String desc,
javax.swing.text.Element sourceElement)
- Creates the event
- Parameters:
source
- the object responsible for the eventtype
- the event typeu
- the affected URL. This may be null if a valid URL
could not be created.desc
- 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.sourceElement
- Element in the Document representing the
setTarget
public void setTarget(java.lang.String target)
- Sets the target of this link, like '_top' or '_blank'
- Parameters:
target
- the target identifier
getTarget
public java.lang.String getTarget()
- Returns the target identifier
- Returns:
- the target identifier