y.view
Class HtmlLabelConfiguration.LabelHyperlinkEvent
java.lang.Object
java.util.EventObject
javax.swing.event.HyperlinkEvent
y.view.HtmlLabelConfiguration.LabelHyperlinkEvent
- All Implemented Interfaces:
- Serializable
- Enclosing class:
- HtmlLabelConfiguration
public static class HtmlLabelConfiguration.LabelHyperlinkEvent
- extends HyperlinkEvent
Used to notify interested parties of label hyper link events.
- See Also:
HtmlLabelConfiguration.handleLabelEvent(YLabel, Mouse2DEvent, javax.swing.event.HyperlinkListener),
Serialized Form
HtmlLabelConfiguration.LabelHyperlinkEvent
public HtmlLabelConfiguration.LabelHyperlinkEvent(Object source,
HyperlinkEvent.EventType type,
URL u,
String desc,
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(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()