Package org.jdesktop.swingx.hyperlink
Class HyperlinkAction.BrowseVisitor
- java.lang.Object
-
- org.jdesktop.swingx.hyperlink.HyperlinkAction.URIVisitor
-
- org.jdesktop.swingx.hyperlink.HyperlinkAction.BrowseVisitor
-
- Enclosing class:
- HyperlinkAction
private class HyperlinkAction.BrowseVisitor extends HyperlinkAction.URIVisitor
-
-
Field Summary
-
Fields inherited from class org.jdesktop.swingx.hyperlink.HyperlinkAction.URIVisitor
desktopSupported
-
-
Constructor Summary
Constructors Modifier Constructor Description private
BrowseVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
isActionSupported()
Returns a boolean indicating if the action is supported by the current Desktop.boolean
isEnabled(java.net.URI uri)
Returns a boolean indicating whether the action is supported on the given URI.void
visit(java.net.URI uri)
Visits the given URI via Desktop functionality.
-
-
-
Method Detail
-
visit
public void visit(java.net.URI uri) throws java.io.IOException
Visits the given URI via Desktop functionality. Must not be called if not enabled.Implemented to message the browse method of Desktop.
- Specified by:
visit
in classHyperlinkAction.URIVisitor
- Parameters:
uri
- the URI to visit- Throws:
java.io.IOException
- if the Desktop method throws IOException.
-
isActionSupported
protected boolean isActionSupported()
Returns a boolean indicating if the action is supported by the current Desktop.Implemented to query the Desktop for support of BROWSE action.
- Specified by:
isActionSupported
in classHyperlinkAction.URIVisitor
- Returns:
- true if the Action is supported by the current desktop, false otherwise.
-
isEnabled
public boolean isEnabled(java.net.URI uri)
Returns a boolean indicating whether the action is supported on the given URI. This implementation returns true if both the Desktop is generally supported andisActionSupported()
. PENDING JW: hmm ... which class exactly has to check for valid combination of Action and URI?Implemented to guard against null URI in addition to super.
- Overrides:
isEnabled
in classHyperlinkAction.URIVisitor
- Returns:
- See Also:
HyperlinkAction.URIVisitor.isActionSupported()
-
-