1 19 package org.openharmonise.him.actions.system; 20 21 import java.awt.event.*; 22 import java.net.*; 23 import java.rmi.*; 24 25 import javax.swing.*; 26 import javax.xml.rpc.*; 27 28 import org.openharmonise.him.*; 29 import org.openharmonise.him.actions.*; 30 import org.openharmonise.him.harmonise.*; 31 import org.openharmonise.him.serverconfig.*; 32 import org.openharmonise.vfs.*; 33 import org.openharmonise.vfs.authentication.*; 34 import org.openharmonise.vfs.context.*; 35 import org.openharmonise.vfs.gui.*; 36 import org.openharmonise.vfs.servers.*; 37 38 39 46 public class ActionPreviewSettings extends AbstractHIMAction implements HIMAction { 47 48 51 public ActionPreviewSettings() { 52 super(); 53 } 54 55 58 public ActionPreviewSettings(VirtualFile vfFile) { 59 super(vfFile); 60 } 61 62 65 public void actionPerformed(ActionEvent arg0) { 66 JFrame frame = new JFrame(); 67 frame.setIconImage( ((ImageIcon)IconManager.getInstance().getIcon("16-command-server-properties.gif")).getImage() ); 68 69 70 PreviewConfigDialog dialog = new PreviewConfigDialog(frame, "Preview Settings"); 71 dialog.show(); 72 } 73 74 77 public String getText() { 78 return "Preview settings..."; 80 } 81 82 85 public String getToolTip() { 86 return this.getDescription(); 87 } 88 89 92 public Icon getIcon() { 93 return IconManager.getInstance().getIcon("16-blank.gif"); 94 } 95 96 99 public String getMnemonic() { 100 return "P"; 101 } 102 103 106 public boolean isEnabled(ContextEvent ce) { 107 if(!this.m_bUserChecked) { 108 this.checkUser(); 109 } 110 this.setEnabled(this.m_bShow); 111 return this.m_bShow; 112 } 113 114 117 public String getDescription() { 118 return "Opens a dialog in which you can alter preview settings"; 119 } 120 121 124 public int getAcceleratorKeycode() { 125 return 0; 127 } 128 129 132 public int getAcceleratorMask() { 133 return 0; 135 } 136 } 137 | Popular Tags |