public final class StaticDomEventConverter extends Object
DomEventConverter
methods statically.
This class is thread-safe, i.e. the provided methods can be called from different threads and concurrent executions do not interfere with each other.
Constructor and Description |
---|
StaticDomEventConverter() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canConvertToHyperlinkEvent(Event domEvent)
Indicates whether the specified DOM event can be converted to a
HyperlinkEvent . |
static HyperlinkEvent |
convertToHyperlinkEvent(Event domEvent,
Object source)
Converts the specified DOM event to a hyperlink event.
|
public static boolean canConvertToHyperlinkEvent(Event domEvent)
HyperlinkEvent
.domEvent
- the DOM-Event
type
has an equivalent EventType
DomEventConverter.canConvertToHyperlinkEvent(Event)
public static HyperlinkEvent convertToHyperlinkEvent(Event domEvent, Object source) throws IllegalArgumentException
domEvent
- the DOM-Event
from which the HyperlinkEvent
will be createdsource
- the source of the domEvent
HyperlinkEvent
with the following properties:
getEventType()
returns the HyperlinkEvent.EventType
corresponding to
the domEvent's type as defined by DomEventType
getSource()
returns the specified source
getUrl()
returns the href-attribute's value of the event's source
element
getDescription()
returns the text content of the event's
source element
getInputEvent()
returns null
getSourceElement()
returns null
IllegalArgumentException
- if the specified event can not be converted to a hyperlink event; this is the case if
canConvertToHyperlinkEvent(Event)
returns falseDomEventConverter.convertToHyperlinkEvent(Event, Object)
This documentation is licensed under CC-BY 4.0, attributed to Nicolai Parlog from CodeFX.