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 22 public class ExpandAction extends TargetableAction { 23 private final static Icon defaultIcon; 24 25 static { 26 URL url = ExpandAction.class.getResource("resources/expandAll.gif"); 27 defaultIcon = url == null ? null : new ImageIcon (url); 28 } 29 30 public ExpandAction() { 31 this("Expand All", "expand-all", defaultIcon); 32 } 33 34 public ExpandAction(String name, String id, Icon icon) { 35 super(name, id, icon); 36 putValue(Action.SHORT_DESCRIPTION, name); 37 } 38 } 39 | Popular Tags |