java类java.awt.Taskbar.Feature的实例源码

XTaskbarPeer.java 文件源码 项目:openjdk-jdk10 阅读 32 收藏 0 点赞 0 评论 0
@Override
public boolean isSupported(Feature feature) {
    switch (feature) {
        case ICON_BADGE_NUMBER:
        case MENU:
        case PROGRESS_VALUE:
        case USER_ATTENTION:
            return true;
        default:
            return false;
    }
}
XTaskbarPeer.java 文件源码 项目:openjdk-jdk10 阅读 27 收藏 0 点赞 0 评论 0
@Override
public void setIconBadge(String badge) {
    boolean visible = false;
    long val = 0;
    if (badge != null) {
        try {
            val = Long.parseLong(badge);
            visible = true;
        } catch (NumberFormatException e) {
            throw new UnsupportedOperationException("The " + Feature.ICON_BADGE_TEXT
                + " feature is not supported on the current platform!");
        }
    }
    setBadge(val, visible);
}
CTaskbarPeer.java 文件源码 项目:openjdk-jdk10 阅读 22 收藏 0 点赞 0 评论 0
@Override
public boolean isSupported(Feature feature) {
    switch(feature) {
        case ICON_BADGE_TEXT:
        case ICON_BADGE_NUMBER:
        case ICON_IMAGE:
        case MENU:
        case PROGRESS_VALUE:
        case USER_ATTENTION:
            return true;
        default:
            return false;
    }
}
WTaskbarPeer.java 文件源码 项目:openjdk-jdk10 阅读 23 收藏 0 点赞 0 评论 0
@Override
public boolean isSupported(Feature feature) {
    switch(feature) {
        case ICON_BADGE_IMAGE_WINDOW:
        case PROGRESS_STATE_WINDOW:
        case PROGRESS_VALUE_WINDOW:
            return supported;
        case USER_ATTENTION_WINDOW:
            return true;
        default:
            return false;
    }
}
XTaskbarPeer.java 文件源码 项目:openjdk9 阅读 23 收藏 0 点赞 0 评论 0
@Override
public boolean isSupported(Feature feature) {
    switch (feature) {
        case ICON_BADGE_NUMBER:
        case MENU:
        case PROGRESS_VALUE:
        case USER_ATTENTION:
            return true;
        default:
            return false;
    }
}
CTaskbarPeer.java 文件源码 项目:openjdk9 阅读 20 收藏 0 点赞 0 评论 0
@Override
public boolean isSupported(Feature feature) {
    switch(feature) {
        case ICON_BADGE_TEXT:
        case ICON_BADGE_NUMBER:
        case ICON_IMAGE:
        case MENU:
        case PROGRESS_VALUE:
        case USER_ATTENTION:
            return true;
        default:
            return false;
    }
}
WTaskbarPeer.java 文件源码 项目:openjdk9 阅读 23 收藏 0 点赞 0 评论 0
@Override
public boolean isSupported(Feature feature) {
    switch(feature) {
        case ICON_BADGE_IMAGE_WINDOW:
        case PROGRESS_STATE_WINDOW:
        case PROGRESS_VALUE_WINDOW:
            return supported;
        case USER_ATTENTION_WINDOW:
            return true;
        default:
            return false;
    }
}
DesktopFeatures.java 文件源码 项目:demo-java-9 阅读 19 收藏 0 点赞 0 评论 0
public static void main(String[] args) {
    if (Taskbar.isTaskbarSupported()) {
        System.out.println("Taskbar is supported - feature support breakdown:");
        Taskbar taskbar = Taskbar.getTaskbar();
        stream(Feature.values())
                .forEach(feature -> System.out.printf(" - %s: %s%n", feature, taskbar.isSupported(feature)));
    } else {
        System.out.println("Taskbar is not on your platform. :(");
    }
}
TaskbarPeer.java 文件源码 项目:openjdk-jdk10 阅读 21 收藏 0 点赞 0 评论 0
/**
 * Tests support of {@code Feature} on current platform.
 * @param f feature to test
 * @return true if feature supported supported
 */
default public boolean isSupported(Feature f) { return false; }
TaskbarPeer.java 文件源码 项目:openjdk9 阅读 22 收藏 0 点赞 0 评论 0
/**
 * Tests support of {@code Feature} on current platform.
 * @param f feature to test
 * @return true if feature supported supported
 */
default public boolean isSupported(Feature f) { return false; }


问题


面经


文章

微信
公众号

扫码关注公众号