1 19 package org.openharmonise.him.actions.system; 20 21 import java.awt.event.*; 22 23 import javax.swing.*; 24 25 import org.openharmonise.him.actions.*; 26 import org.openharmonise.vfs.*; 27 import org.openharmonise.vfs.context.*; 28 import org.openharmonise.vfs.gui.*; 29 30 31 38 public class ActionExitCommit extends AbstractHIMAction implements HIMAction { 39 40 43 public ActionExitCommit() { 44 super(); 45 } 46 47 50 public ActionExitCommit(VirtualFile vfFile) { 51 super(vfFile); 52 } 53 54 57 public void actionPerformed(ActionEvent arg0) { 58 ContextEvent ce = new ContextEvent(ContextType.CONTEXT_SYNC_ALL_FILES_AND_SHUTDOWN, "FORCE_SYNC"); 59 ContextHandler.getInstance().fireContextEvent(ce); 60 } 61 62 65 public String getDescription() { 66 return "Closes the application and synchronises, all uncommited, changes to the server"; 67 } 68 69 72 public String getText() { 73 return "Exit & commit changes"; 74 } 75 76 79 public String getToolTip() { 80 return this.getDescription(); 81 } 82 83 86 public Icon getIcon() { 87 return IconManager.getInstance().getIcon("16-blank.gif"); 88 } 89 90 93 public int getAcceleratorKeycode() { 94 return 0; 95 } 96 97 100 public String getMnemonic() { 101 return "x"; 102 } 103 104 107 public int getAcceleratorMask() { 108 return 0; 109 } 110 111 } 112 | Popular Tags |