本文整理汇总了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")));
}
}
示例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")));
}
}
示例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")));
}
}
示例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));
}
示例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));
}
示例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));
}