use of se.trixon.almond.util.PomInfo in project java-jotasync by trixon.
the class MainFrame method initActions.
private void initActions() {
mActionManager = ActionManager.getInstance().init(getRootPane().getActionMap(), getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW));
// about
PomInfo pomInfo = new PomInfo(MainFrame.class, "se.trixon", "jotasync");
AboutModel aboutModel = new AboutModel(SystemHelper.getBundle(MainFrame.class, "about"), SystemHelper.getResourceAsImageIcon(MainFrame.class, "sync-256px.png"));
aboutModel.setAppVersion(pomInfo.getVersion());
AboutPanel aboutPanel = new AboutPanel(aboutModel);
AlmondAction action = AboutPanel.getAction(MainFrame.this, aboutPanel);
getRootPane().getActionMap().put(ActionManager.ABOUT, action);
// File
connectMenuItem.setAction(mActionManager.getAction(ActionManager.CONNECT));
disconnectMenuItem.setAction(mActionManager.getAction(ActionManager.DISCONNECT));
startServerMenuItem.setAction(mActionManager.getAction(ActionManager.START_SERVER));
shutdownServerMenuItem.setAction(mActionManager.getAction(ActionManager.SHUTDOWN_SERVER));
shutdownServerQuitMenuItem.setAction(mActionManager.getAction(ActionManager.SHUTDOWN_SERVER_QUIT));
saveMenuItem.setAction(mActionManager.getAction(ActionManager.SAVE_TAB));
quitMenuItem.setAction(mActionManager.getAction(ActionManager.QUIT));
// Tools
cronCheckBoxMenuItem.setAction(mActionManager.getAction(ActionManager.CRON));
jobEditorMenuItem.setAction(mActionManager.getAction(ActionManager.JOB_EDITOR));
optionsMenuItem.setAction(mActionManager.getAction(ActionManager.OPTIONS));
// Help
helpMenuItem.setAction(mActionManager.getAction(ActionManager.HELP));
aboutMenuItem.setAction(mActionManager.getAction(ActionManager.ABOUT));
aboutRsyncMenuItem.setAction(mActionManager.getAction(ActionManager.ABOUT_RSYNC));
}
use of se.trixon.almond.util.PomInfo in project java-jotasync by trixon.
the class Main method displayVersion.
private static void displayVersion() {
PomInfo pomInfo = new PomInfo(se.trixon.jota.client.Main.class, "se.trixon", "jotasync");
System.out.println(String.format(sBundle.getString("version_info"), pomInfo.getVersion()));
}
use of se.trixon.almond.util.PomInfo in project java-jotasync by trixon.
the class Main method displayVersion.
private static void displayVersion() {
PomInfo pomInfo = new PomInfo(Main.class, "se.trixon", "jotasync");
System.out.println(String.format(sBundle.getString("version_info"), pomInfo.getVersion()));
}
use of se.trixon.almond.util.PomInfo in project java-mapollage by trixon.
the class MainFrame method initActions.
private void initActions() {
mActionManager = ActionManager.getInstance().init(getRootPane().getActionMap(), getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW));
InputMap inputMap = mPopupMenu.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
ActionMap actionMap = mPopupMenu.getActionMap();
Action action = new AbstractAction("HideMenu") {
@Override
public void actionPerformed(ActionEvent e) {
mPopupMenu.setVisible(false);
}
};
String key = "HideMenu";
actionMap.put(key, action);
KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
inputMap.put(keyStroke, key);
// about
PomInfo pomInfo = new PomInfo(Mapollage.class, "se.trixon", "mapollage");
AboutModel aboutModel = new AboutModel(SystemHelper.getBundle(Mapollage.class, "about"), SystemHelper.getResourceAsImageIcon(MainFrame.class, "icon-1024px.png"));
aboutModel.setAppVersion(pomInfo.getVersion());
AboutPanel aboutPanel = new AboutPanel(aboutModel);
action = AboutPanel.getAction(MainFrame.this, aboutPanel);
getRootPane().getActionMap().put(ActionManager.ABOUT, action);
// File
quitMenuItem.setAction(mActionManager.getAction(ActionManager.QUIT));
// Profile
addMenuItem.setAction(mActionManager.getAction(ActionManager.ADD));
cloneMenuItem.setAction(mActionManager.getAction(ActionManager.CLONE));
renameMenuItem.setAction(mActionManager.getAction(ActionManager.RENAME));
removeMenuItem.setAction(mActionManager.getAction(ActionManager.REMOVE));
removeAllMenuItem.setAction(mActionManager.getAction(ActionManager.REMOVE_ALL));
// Tools
optionsMenuItem.setAction(mActionManager.getAction(ActionManager.OPTIONS));
// Help
helpMenuItem.setAction(mActionManager.getAction(ActionManager.HELP));
aboutDateFormatMenuItem.setAction(mActionManager.getAction(ActionManager.ABOUT_DATE_FORMAT));
aboutMenuItem.setAction(mActionManager.getAction(ActionManager.ABOUT));
// Toolbar
startButton.setAction(mActionManager.getAction(ActionManager.START));
cancelButton.setAction(mActionManager.getAction(ActionManager.CANCEL));
menuButton.setAction(mActionManager.getAction(ActionManager.MENU));
SwingHelper.clearText(toolBar);
}
use of se.trixon.almond.util.PomInfo in project java-mapollage by trixon.
the class Mapollage method displayVersion.
private void displayVersion() {
PomInfo pomInfo = new PomInfo(Mapollage.class, "se.trixon", "mapollage");
System.out.println(String.format(sBundle.getString("version_info"), pomInfo.getVersion()));
}
Aggregations