1 7 8 package org.jdesktop.jdnc.actions; 9 10 import java.net.URL ; 11 12 import javax.swing.Action ; 13 import javax.swing.Icon ; 14 import javax.swing.ImageIcon ; 15 16 import org.jdesktop.swing.actions.TargetableAction; 17 18 public class PrintAction extends TargetableAction { 19 20 private final static Icon defaultIcon; 21 22 static { 23 URL url = PrintAction.class.getResource("/toolbarButtonGraphics/general/Print24.gif"); 24 defaultIcon = url == null ? null : new ImageIcon (url); 25 } 26 27 public PrintAction() { 28 this("Print", "print", defaultIcon); 29 } 30 31 public PrintAction(String name, String id, Icon icon) { 32 super(name, id, icon); 33 putValue(Action.SHORT_DESCRIPTION, name); 34 } 35 } 36 | Popular Tags |