View Javadoc

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