* Rename getMenuImageIcon to getImageIcon2
* Added 24x24 logout icon * Added logout menu to application window
This commit is contained in:
parent
9f7cb1dd9c
commit
360f80a36b
|
@ -257,7 +257,7 @@ public final class AEnv
|
|||
if (iconName == null)
|
||||
iconName = actionName;
|
||||
String text = Msg.getMsg(Env.getCtx(), actionName);
|
||||
ImageIcon icon = Env.getMenuImageIcon(iconName + "16");
|
||||
ImageIcon icon = Env.getImageIcon2(iconName + "16");
|
||||
CMenuItem mi = new CMenuItem(text, icon);
|
||||
mi.setActionCommand(actionName);
|
||||
if (ks != null)
|
||||
|
|
|
@ -162,7 +162,7 @@ public final class APanel extends CPanel
|
|||
/** Private Lock Button */
|
||||
public AppsAction aLock;
|
||||
// Local (added to toolbar)
|
||||
private AppsAction aReport, aEnd, aHome, aHelp, aProduct,
|
||||
private AppsAction aReport, aEnd, aHome, aHelp, aProduct, aLogout,
|
||||
aAccount, aCalculator, aCalendar, aEditor, aPreference, aScript,
|
||||
aOnline, aMailSupport, aAbout, aPrintScr, aScrShot, aExit, aBPartner, aDeleteSelection;
|
||||
|
||||
|
@ -186,6 +186,7 @@ public final class APanel extends CPanel
|
|||
aPrint = addAction("Print", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_F12, 0), false);
|
||||
mFile.addSeparator();
|
||||
aEnd = addAction("End", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.ALT_MASK), false);
|
||||
aLogout = addAction("Logout", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_L, Event.SHIFT_MASK+Event.ALT_MASK), false);
|
||||
aExit = addAction("Exit", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.SHIFT_MASK+Event.ALT_MASK), false);
|
||||
// Edit
|
||||
JMenu mEdit = AEnv.getMenu("Edit");
|
||||
|
@ -1248,6 +1249,8 @@ public final class APanel extends CPanel
|
|||
else if (cmd.equals(aHelp.getName()))
|
||||
cmd_help();
|
||||
// General Commands (Environment)
|
||||
else if (cmd.equals(aLogout.getName()))
|
||||
cmd_logout();
|
||||
else if (!AEnv.actionPerformed (e.getActionCommand(), m_curWindowNo, this))
|
||||
log.log(Level.SEVERE, "No action for: " + cmd);
|
||||
}
|
||||
|
@ -1265,6 +1268,15 @@ public final class APanel extends CPanel
|
|||
setBusy(false, true);
|
||||
} // actionPerformed
|
||||
|
||||
private void cmd_logout() {
|
||||
JFrame top = Env.getWindow(0);
|
||||
if (top instanceof AMenu) {
|
||||
((AMenu)top).logout();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create New Record
|
||||
* @param copy true if current record is to be copied
|
||||
|
|
|
@ -159,8 +159,8 @@ public final class AppsAction extends AbstractAction
|
|||
*/
|
||||
private ImageIcon getIcon(String name, boolean small)
|
||||
{
|
||||
String fullName = name + (small ? "16.gif" : "24.gif");
|
||||
return Env.getImageIcon(fullName);
|
||||
String fullName = name + (small ? "16" : "24");
|
||||
return Env.getImageIcon2(fullName);
|
||||
} // getIcon
|
||||
|
||||
/**
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 829 B |
Loading…
Reference in New Issue