/** * * @param uri the target uri, maybe null. * @param desktopAction the type of desktop action this class should perform, must be * BROWSE or MAIL * @throws HeadlessException if {@link * GraphicsEnvironment#isHeadless()} returns {@code true} * @throws UnsupportedOperationException if the current platform doesn't support * Desktop * @throws IllegalArgumentException if unsupported action type */ public HyperlinkAction(URI uri, Action desktopAction) { super(); if (!Desktop.isDesktopSupported()) { throw new UnsupportedOperationException("Desktop API is not " + "supported on the current platform"); } if (desktopAction != Desktop.Action.BROWSE && desktopAction != Desktop.Action.MAIL) { throw new IllegalArgumentException("Illegal action type: " + desktopAction + ". Must be BROWSE or MAIL"); } this.desktopAction = desktopAction; getURIVisitor(); setTarget(uri); }
/** * * @param uri the target uri, maybe null. * @param desktopAction the type of desktop action this class should perform, must be * BROWSE or MAIL * @throws HeadlessException if {@link * GraphicsEnvironment#isHeadless()} returns {@code true} * @throws UnsupportedOperationException if the current platform doesn't support * Desktop * @throws IllegalArgumentException if unsupported action type */ public HyperlinkAction(URI uri, Action desktopAction) { super(); if (!Desktop.isDesktopSupported()) { throw new UnsupportedOperationException("Desktop API is not " + "supported on the current platform"); } if (desktopAction != Desktop.Action.BROWSE && desktopAction != Desktop.Action.MAIL) { throw new IllegalArgumentException("Illegal action type: " + desktopAction + ". Must be BROWSE or MAIL"); } this.desktopAction = desktopAction; getURIVisitor(); setTarget(uri); }
/** * * @param uri the target uri, maybe null. * @param desktopAction the type of desktop action this class should perform, must be * BROWSE or MAIL * @throws HeadlessException if {@link * GraphicsEnvironment#isHeadless()} returns {@code true} * @throws UnsupportedOperationException if the current platform doesn't support * Desktop * @throws IllegalArgumentException if unsupported action type */ public HyperlinkAction(URI uri, Action desktopAction) { super(); if (!Desktop.isDesktopSupported()) { throw new UnsupportedOperationException("Desktop API is not " + "supported on the current platform"); } if (desktopAction != Desktop.Action.BROWSE && desktopAction != Desktop.Action.MAIL) { throw new IllegalArgumentException("Illegal action type: " + desktopAction + ". Must be BROWSE or MAIL"); } this.desktopAction = desktopAction; getURIVisitor(); setTarget(uri); }
/** * * @param uri the target uri, maybe null. * @param desktopAction the type of desktop action this class should perform, must be * BROWSE or MAIL * @throws HeadlessException if {@link * GraphicsEnvironment#isHeadless()} returns {@code true} * @throws UnsupportedOperationException if the current platform doesn't support * Desktop * @throws IllegalArgumentException if unsupported action type */ public HyperlinkAction(URI uri, Action desktopAction) { super(); if (!Desktop.isDesktopSupported()) { throw new UnsupportedOperationException("Desktop API is not " + "supported on the current platform"); } if (desktopAction != Desktop.Action.BROWSE && desktopAction != Desktop.Action.MAIL) { throw new IllegalArgumentException("Illegal action type: " + desktopAction + ". Must be BROWSE or MAIL"); } this.desktopAction = desktopAction; getURIVisitor(); setTarget(uri); }