View Javadoc

1   // Copyright 2004-2005, FreeHEP.
2   package hep.wired.heprep.interaction;
3   
4   import java.awt.*;
5   import java.awt.event.*;
6   import java.awt.geom.*;
7   import javax.swing.*;
8   
9   import org.freehep.application.Application;
10  
11  import hep.wired.interaction.DefaultInteractionHandler;
12  import hep.wired.services.GraphicsPanel;
13  import hep.wired.services.RecordPlot;
14  import hep.wired.image.WiredBaseImage;
15  
16  import hep.wired.heprep.plugin.WiredPlugin;
17  
18  /***
19   *
20   * @author Mark Donszelmann
21   * @version $Id: TreeSelection.java 687 2005-03-14 08:04:46Z duns $
22   */
23  public class TreeSelection extends RoutingInteractionHandler {
24  
25      private static TreeSelection instance;
26  
27      private TreeSelection() {
28          super("Visibility Tree");
29          add(DefaultInteractionHandler.getInstance());
30      }
31      
32      public static TreeSelection getInstance() {
33          if (instance == null) {
34              instance = new TreeSelection();
35          }
36          return instance;
37      }
38      
39      public Icon getIcon(int size) {
40          return WiredBaseImage.getIcon("Tree%w", size);
41      }    
42  
43      public String getDescription() {
44          return "Selection of visibility of types.";
45      }
46  
47      public Component getControl() {
48          return WiredPlugin.getPlugin().getTreePanel();       
49      }
50  
51      public String toString() {
52          return "TreeSelection";
53      }
54  }