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