View Javadoc

1   /*
2    * TreatmentDiagram.java
3    *
4    * Created on 24. mai 2005, 16:16
5    */
6   
7   package com.vikash.firsttool.Diagram;
8   import com.vikash.firsttool.UI.*;
9   import com.vikash.firsttool.ProfileImpl.*;
10  import org.jgraph.graph.GraphModel;
11  import org.jgraph.graph.GraphLayoutCache;
12  import org.jgraph.graph.DefaultCellViewFactory;
13  import javax.swing.tree.*;
14  /***
15   *
16   * @author  studajb
17   */
18  public class TreatmentDiagram extends ToolGraph{
19      //static ToolModel model=new ToolModel();
20      /*** Creates a new instance of TreatmentDiagram */
21      public TreatmentDiagram() {
22          super(ToolModel.getInstance(false),"TreatmentDiagram");
23         //setGraphLayoutCache(new ToolGraphLayoutCache(ToolModel.getInstance(),null,true));
24         
25      }
26      public boolean isValidElement(DefaultMutableTreeNode cell){
27          if(cell instanceof ThreatScenarioGraphCell || cell instanceof UnwantedIncidentGraphCell|| cell instanceof AssetGraphCell
28          || cell instanceof ThreatAgentGraphCell || cell instanceof TreatmentGraphCell )
29              return true;
30          else 
31              return false;
32      } 
33      public String toString(){
34          String name="Treatment Diagram";
35          return name;
36      }
37  }