當前位置: 首頁>>代碼示例>>Java>>正文


Java Action.BROWSE屬性代碼示例

本文整理匯總了Java中java.awt.Desktop.Action.BROWSE屬性的典型用法代碼示例。如果您正苦於以下問題:Java Action.BROWSE屬性的具體用法?Java Action.BROWSE怎麽用?Java Action.BROWSE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在java.awt.Desktop.Action的用法示例。


在下文中一共展示了Action.BROWSE屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createURIVisitor

/**
 * @return
 */
private URIVisitor createURIVisitor() {
    return getDesktopAction() == Action.BROWSE ?
            new BrowseVisitor() : new MailVisitor();
}
 
開發者ID:RockManJoe64,項目名稱:swingx,代碼行數:7,代碼來源:HyperlinkAction.java

示例2: createHyperlinkAction

/**
 * Factory method to create and return a HyperlinkAction for the given uri. Tries
 * to guess the appropriate type from the uri. If uri is not null and has a
 * scheme of mailto, create one of type Mail. In all other cases, creates one
 * for BROWSE.
 * 
 * @param uri to uri to create a HyperlinkAction for, maybe null.
 * @return a HyperlinkAction for the given URI.
 * @throws HeadlessException if {@link
 * GraphicsEnvironment#isHeadless()} returns {@code true}
 * @throws UnsupportedOperationException if the current platform doesn't support
 *   Desktop
 */
public static HyperlinkAction createHyperlinkAction(URI uri) {
    Action type = isMailURI(uri) ? Action.MAIL : Action.BROWSE;
    return createHyperlinkAction(uri, type);
}
 
開發者ID:RockManJoe64,項目名稱:swingx,代碼行數:17,代碼來源:HyperlinkAction.java

示例3: HyperlinkAction

/** 
 * Instantiates a HyperlinkAction with action type BROWSE.
 * 
 * @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() {
    this(Action.BROWSE);
}
 
開發者ID:RockManJoe64,項目名稱:swingx,代碼行數:12,代碼來源:HyperlinkAction.java


注:本文中的java.awt.Desktop.Action.BROWSE屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。