public final class Hyperlinks
extends java.lang.Object
Hyperlink objects.| Modifier and Type | Method | Description |
|---|---|---|
static Intent |
getIntent(Hyperlink hyperlink) |
Get intent associated with a hyperlink of type
HyperlinkType.FROM_INTENT. |
static java.lang.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 java.lang.Runnable getRunnable(@NonNull
Hyperlink hyperlink)
HyperlinkType.FROM_RUNNABLE.hyperlink - The hyperlink to get runnable from.java.lang.IllegalArgumentException - if type of the hyperlink is not
HyperlinkType.FROM_RUNNABLE.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.java.lang.IllegalArgumentException - if type of the hyperlink is not
HyperlinkType.FROM_INTENT.getType(org.netbeans.api.io.Hyperlink),
HyperlinkTypepublic static void invoke(Hyperlink hyperlink)
hyperlink - Hyperlink to invoke.Built on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.