Modifier and Type | Method and Description |
---|---|
static Intent |
getIntent(Hyperlink hyperlink)
Get intent associated with a hyperlink of type
HyperlinkType.FROM_INTENT . |
static Runnable |
getRunnable(Hyperlink hyperlink)
Get runnable associated with a hyperlink of type
HyperlinkType.FROM_RUNNABLE . |
static HyperlinkType |
getType(Hyperlink hyperlink)
Get hyperlink type.
|
static void |
invoke(Hyperlink hyperlink)
Invoke appropriate action for the hyperlink.
|
static boolean |
isImportant(Hyperlink hyperlink)
Check whether a hyperlink is important.
|
@NonNull public static HyperlinkType getType(@NonNull Hyperlink hyperlink)
hyperlink
- The hyperlink to get type of.public static boolean isImportant(@NonNull Hyperlink hyperlink)
Important hyperlinks can be printed in different color, or can have some special behavior, e.g. automatic scrolling can be switched off to keep the important hyperlink visible.
hyperlink
- The hyperlink to check.@NonNull public static Runnable getRunnable(@NonNull Hyperlink hyperlink)
HyperlinkType.FROM_RUNNABLE
.hyperlink
- The hyperlink to get runnable from.IllegalArgumentException
- if type of the hyperlink is not
HyperlinkType.FROM_RUNNABLE
.Hyperlinks.getType(org.netbeans.api.io.Hyperlink)
,
HyperlinkType
@NonNull public static Intent getIntent(@NonNull Hyperlink hyperlink)
HyperlinkType.FROM_INTENT
.hyperlink
- The hyperlink to get intent from.IllegalArgumentException
- if type of the hyperlink is not
HyperlinkType.FROM_INTENT
.Hyperlinks.getType(org.netbeans.api.io.Hyperlink)
,
HyperlinkType
public static void invoke(Hyperlink hyperlink)
hyperlink
- Hyperlink to invoke.