public static synchronized FileChooserWinService getInstance() {
    if (OsUtils.isWindows() == false) return null;

    if (instance == null) instance = new FileChooserWinService();

    return instance;
  }
예제 #2
0
 /**
  * Set shortcut text displayed in this menu item. Displayed as keycode+keycode+keycode (eg.
  * Ctrl+Shift+F5 on Windows and Linux, on Mac ⌘⇧F5). CONTROL_LEFT and CONTROL_RIGHT are mapped to
  * Ctrl. The same goes for Alt and Shift. This DOES NOT set actual hot key for this menu item, it
  * only makes shortcut text visible in item.
  *
  * @param keycodes keycodes from {@link Keys} that are used to determine the shortcut text
  * @return this object for the purpose of chaining methods
  */
 public MenuItem setShortcut(int... keycodes) {
   shortcutLabel.setText(OsUtils.getShortcutFor(keycodes));
   packParentMenu();
   return this;
 }