本文整理汇总了Java中ika.utils.IconUtils类的典型用法代码示例。如果您正苦于以下问题:Java IconUtils类的具体用法?Java IconUtils怎么用?Java IconUtils使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IconUtils类属于ika.utils包,在下文中一共展示了IconUtils类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startGUI
import ika.utils.IconUtils; //导入依赖的package包/类
/**
* Start the graphical user interface.
*/
public static void startGUI() {
// set icon for JOptionPane dialogs
Properties props = PropertiesLoader.loadProperties("ika.app.Application");
IconUtils.setOptionPaneIcons(props.getProperty("ApplicationIcon"));
// on Mac OS X: take the menu bar out of the window and put it on top
// of the main screen.
if (ika.utils.Sys.isMacOSX()) {
System.setProperty("apple.laf.useScreenMenuBar", "true");
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Scree Painter");
}
// Replace title of progress monitor dialog by empty string.
UIManager.put("ProgressMonitor.progressText", "");
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
// show std out in own window
// new ika.utils.StdErrOutWindows(null, "Console Output", "Error Output");
// create a temporary invisible BaseMainWindow, extract its
// menu bar and pass it to the MacWindowsManager.
if (ika.utils.Sys.isMacOSX()) {
MacWindowsManager.init(MainWindow.getMenuBarClone());
}
// create a new empty window
MainWindow win = MainWindow.newDocumentWindow();
// user canceled data selection dialog.
if (win == null) {
System.exit(0);
}
}
});
}
示例2: main
import ika.utils.IconUtils; //导入依赖的package包/类
/**
* main routine for the application.
* @param args the command line arguments
*/
public static void main(String args[]) {
// on Mac OS X: take the menu bar out of the window and put it on top
// of the main screen.
if (ika.utils.Sys.isMacOSX()) {
System.setProperty("apple.laf.useScreenMenuBar", "true");
}
// use the standard look and feel
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
e.printStackTrace();
}
// set icon for JOptionPane dialogs. This is done automatically on Mac 10.5 and later
if (!ika.utils.Sys.isMacOSX_10_5_orHigherWithJava5()) {
java.util.Properties props
= ika.utils.PropertiesLoader.loadProperties("ika.app.Application");
IconUtils.setOptionPaneIcons(props.getProperty("ApplicationIcon"));
}
// Replace title of progress monitor dialog with empty string.
UIManager.put("ProgressMonitor.progressText", "");
// RepaintManager.setCurrentManager(
// new com.clientjava.examples.badswingthread.ThreadCheckingRepaintManager(false));
SwingUtilities.invokeLater( new Runnable() {
@Override
public void run() {
// create a temporary invisible BaseMainWindow, extract its
// menu bar and pass it to the MacWindowsManager.
if (ika.utils.Sys.isMacOSX()) {
MacWindowsManager.init(MainWindow.getMenuBarClone());
}
// create a new empty window
MainWindow.newDocumentWindow();
/*
// initialize output and error stream for display in a window
String appName = ika.app.ApplicationInfo.getApplicationName();
String outTitle = appName + " - Standard Output";
String errTitle = appName + " - Error Messages";
new ika.utils.StdErrOutWindows(null, outTitle, errTitle);
*/
}
});
}