1 19 package org.openharmonise.him.actions.dir; 20 21 import java.awt.event.ActionEvent ; 22 23 import javax.swing.Icon ; 24 import javax.swing.ImageIcon ; 25 import javax.swing.JFrame ; 26 27 import org.openharmonise.him.actions.*; 28 import org.openharmonise.him.displaycomponents.table.order.*; 29 import org.openharmonise.vfs.*; 30 import org.openharmonise.vfs.context.*; 31 import org.openharmonise.vfs.gui.*; 32 33 34 41 public class ActionOrder extends AbstractHIMAction implements HIMAction { 42 43 public static String ACTION_NAME = "ORDER"; 44 45 48 public ActionOrder() { 49 super(); 50 } 51 52 56 public ActionOrder(VirtualFile vfFile) { 57 super(vfFile); 58 } 59 60 63 public void actionPerformed(ActionEvent arg0) { 64 JFrame frame = new JFrame (); 65 frame.setIconImage( ((ImageIcon )IconManager.getInstance().getIcon("32-sim-logo.gif")).getImage() ); 66 67 ContextEvent ce = ContextHandler.getInstance().getLastEvent(ContextType.CONTEXT_DIRS); 68 VirtualFile vfDir = ce.getVFS().getVirtualFile(ce.getPath()).getResource(); 69 70 OrderDialog dialog = new OrderDialog(frame, "Set Server Order", vfDir); 71 dialog.show(); 72 } 73 74 77 public String getText() { 78 return "Order"; 79 } 80 81 84 public String getToolTip() { 85 return "Opens a dialog to order the resources in the current collection"; 86 } 87 88 91 public Icon getIcon() { 92 return IconManager.getInstance().getIcon("16-blank.gif"); 93 } 94 95 98 public String getMnemonic() { 99 return "O"; 100 } 101 102 105 public String getDescription() { 106 return this.getToolTip(); 107 } 108 109 112 public int getAcceleratorKeycode() { 113 return 0; 114 } 115 116 119 public int getAcceleratorMask() { 120 return 0; 121 } 122 123 } 124 | Popular Tags |