当前位置: 首页>>代码示例>>Java>>正文


Java Main类代码示例

本文整理汇总了Java中net.sourceforge.subsonic.booter.Main的典型用法代码示例。如果您正苦于以下问题:Java Main类的具体用法?Java Main怎么用?Java Main使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Main类属于net.sourceforge.subsonic.booter包,在下文中一共展示了Main类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setupIcons

import net.sourceforge.subsonic.booter.Main; //导入依赖的package包/类
private void setupIcons() {
    Toolkit toolkit = Toolkit.getDefaultToolkit();

    // Window.setIconImages() was added in Java 1.6.  Since Subsonic only requires 1.5, we
    // use reflection to invoke it.
    try {
        Method method = Window.class.getMethod("setIconImages", java.util.List.class);
        java.util.List<Image> images = Arrays.asList(
                toolkit.createImage(Main.class.getResource("/images/subsonic-16.png")),
                toolkit.createImage(Main.class.getResource("/images/subsonic-32.png")),
                toolkit.createImage(Main.class.getResource("/images/subsonic-512.png")));
        method.invoke(this, images);
    } catch (Throwable x) {
        // Fallback to old method.
        setIconImage(toolkit.createImage(Main.class.getResource("/images/subsonic-32.png")));
    }
}
 
开发者ID:sindremehus,项目名称:subsonic,代码行数:18,代码来源:SubsonicFrame.java

示例2: setupIcons

import net.sourceforge.subsonic.booter.Main; //导入依赖的package包/类
private void setupIcons() {
    Toolkit toolkit = Toolkit.getDefaultToolkit();

    // Window.setIconImages() was added in Java 1.6.  Since Subsonic only requires 1.5, we
    // use reflection to invoke it.
    try {
        Method method = Window.class.getMethod("setIconImages", java.util.List.class);
        java.util.List<Image> images = Arrays.asList(
                toolkit.createImage(Main.class.getResource("/images/futuresonic-16.png")),
                toolkit.createImage(Main.class.getResource("/images/futuresonic-32.png")),
                toolkit.createImage(Main.class.getResource("/images/futuresonic-512.png")));
        method.invoke(this, images);
    } catch (Throwable x) {
        // Fallback to old method.
        setIconImage(toolkit.createImage(Main.class.getResource("/images/futuresonic-32.png")));
    }
}
 
开发者ID:FutureSonic,项目名称:FutureSonic-Server,代码行数:18,代码来源:SubsonicFrame.java

示例3: setupIcons

import net.sourceforge.subsonic.booter.Main; //导入依赖的package包/类
private void setupIcons() {
    Toolkit toolkit = Toolkit.getDefaultToolkit();

    // Window.setIconImages() was added in Java 1.6.  Since Subsonic only requires 1.5, we
    // use reflection to invoke it.
    try {
        Method method = Window.class.getMethod("setIconImages", java.util.List.class);
        java.util.List<Image> images = Arrays.asList(
                toolkit.createImage(Main.class.getResource("/images/madsonic-16.png")),
                toolkit.createImage(Main.class.getResource("/images/madsonic-32.png")),
                toolkit.createImage(Main.class.getResource("/images/madsonic-512.png")));
        method.invoke(this, images);
    } catch (Throwable x) {
        // Fallback to old method.
        setIconImage(toolkit.createImage(Main.class.getResource("/images/madsonic-32.png")));
    }
}
 
开发者ID:MadMarty,项目名称:madsonic-server-5.0,代码行数:18,代码来源:SubsonicFrame.java

示例4: SubsonicFrame

import net.sourceforge.subsonic.booter.Main; //导入依赖的package包/类
public SubsonicFrame(SubsonicDeployerService deployer) {
    super("Subsonic");
    this.deployer = deployer;
    createComponents();
    layoutComponents();
    addBehaviour();

    URL url = Main.class.getResource("/images/subsonic-512.png");
    setIconImage(Toolkit.getDefaultToolkit().createImage(url));
}
 
开发者ID:sindremehus,项目名称:subsonic,代码行数:11,代码来源:SubsonicFrame.java

示例5: SubsonicFrame

import net.sourceforge.subsonic.booter.Main; //导入依赖的package包/类
public SubsonicFrame(SubsonicDeployerService deployer) {
    super("FutureSonic");
    this.deployer = deployer;
    createComponents();
    layoutComponents();
    addBehaviour();

    URL url = Main.class.getResource("/images/futuresonic-512.png");
    setIconImage(Toolkit.getDefaultToolkit().createImage(url));
}
 
开发者ID:FutureSonic,项目名称:FutureSonic-Server,代码行数:11,代码来源:SubsonicFrame.java

示例6: SubsonicFrame

import net.sourceforge.subsonic.booter.Main; //导入依赖的package包/类
public SubsonicFrame(SubsonicDeployerService deployer) {
    super("Madsonic");
    this.deployer = deployer;
    createComponents();
    layoutComponents();
    addBehaviour();

    URL url = Main.class.getResource("/images/madsonic-512.png");
    setIconImage(Toolkit.getDefaultToolkit().createImage(url));
}
 
开发者ID:MadMarty,项目名称:madsonic-server-5.0,代码行数:11,代码来源:SubsonicFrame.java


注:本文中的net.sourceforge.subsonic.booter.Main类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。