1 4 5 package org.objectweb.fractal.swing; 6 7 import java.awt.event.ActionEvent ; 8 9 import javax.swing.ImageIcon ; 10 11 public class AbstractAction extends javax.swing.AbstractAction 12 implements ActionAttributes 13 { 14 15 private String iconURL; 16 17 public String getName () { 18 return (String )getValue(NAME); 19 } 20 21 public void setName (String name) { 22 putValue(NAME, name); 23 } 24 25 public String getIconURL () { 26 return iconURL; 27 } 28 29 public void setIconURL (String iconURL) { 30 this.iconURL = iconURL; 31 putValue(SMALL_ICON, new ImageIcon (getClass().getResource(iconURL))); 32 } 33 34 public String getToolTipText () { 35 return (String )getValue(SHORT_DESCRIPTION); 36 } 37 38 public void setToolTipText (String toolTipText) { 39 putValue(SHORT_DESCRIPTION, toolTipText); 40 } 41 42 public String getAcceleratorKey () { 43 return (String )getValue(ACCELERATOR_KEY); 44 } 45 46 public void setAcceleratorKey (String acceleratorKey) { 47 putValue(ACCELERATOR_KEY, acceleratorKey); 48 } 49 50 public void actionPerformed (ActionEvent e) { 51 } 52 } 53 | Popular Tags |