y.view
Class HtmlLabelConfiguration.LabelHyperlinkEvent
java.lang.Object
java.util.EventObject
javax.swing.event.HyperlinkEvent
y.view.HtmlLabelConfiguration.LabelHyperlinkEvent
All Implemented Interfaces: java.io.Serializable
Enclosing class: HtmlLabelConfiguration
public static class HtmlLabelConfiguration.LabelHyperlinkEvent extends javax.swing.event.HyperlinkEvent
Used to notify interested parties of label hyper link events.
See Also: HtmlLabelConfiguration.handleLabelEvent(YLabel, Mouse2DEvent, javax.swing.event.HyperlinkListener)
,
Serialized Form Your browser does not support SVG content.
Nested classes/interfaces inherited from class javax.swing.event.HyperlinkEvent
javax.swing.event.HyperlinkEvent.EventType
Fields inherited from class java.util.EventObject
source
Constructor Summary
HtmlLabelConfiguration.LabelHyperlinkEvent (java.lang.Object source,
javax.swing.event.HyperlinkEvent.EventType type,
java.net.URL u,
java.lang.String desc,
javax.swing.text.Element sourceElement,
YLabel label)
Initializes a new LabelHyperlinkEvent
instance.
Method Summary
static Graph2DView
getGraph2DView (java.lang.Object canvas)
Returns the Graph2DView
instance that is associated to
a canvas component.
YLabel
getLabel ()
Returns the YLabel
instance that displays the HTML
document.
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
HtmlLabelConfiguration.LabelHyperlinkEvent
public HtmlLabelConfiguration.LabelHyperlinkEvent (java.lang.Object source,
javax.swing.event.HyperlinkEvent.EventType type,
java.net.URL u,
java.lang.String desc,
javax.swing.text.Element sourceElement,
YLabel label)
Initializes a new LabelHyperlinkEvent
instance.
Parameters: source
- the object responsible for the event. Typically a
Graph2DView
's canvas component.type
- the event type.u
- the affected URL.
May be null
if no valid URL could be created.desc
- the description of the link.
The description provides the text used when attempting to form the URL.sourceElement
- the element in the HTML document representing the
link anchor.label
- the YLabel
instance that displays the HTML
document.See Also: HtmlLabelConfiguration.handleLabelEvent(YLabel, Mouse2DEvent, javax.swing.event.HyperlinkListener)
,
Graph2DView.getCanvasComponent()
,
getGraph2DView(Object)
getLabel
public YLabel getLabel ()
Returns the YLabel
instance that displays the HTML
document.
Returns: the YLabel
instance that displays the HTML
document.
getGraph2DView
public static Graph2DView getGraph2DView (java.lang.Object canvas)
Returns the Graph2DView
instance that is associated to
a canvas component. This method is useful to retrieve views related
to hyperlink events whose source is a canvas component.
Parameters: canvas
- the canvas component whose associated
Graph2DView
instance has to be retrieved.
Returns: the Graph2DView
instance that is associated to
the specified canvas component or null
if the specified
object is no canvas component. See Also: Graph2DView.getCanvasComponent()