1
2
3
4
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
21 /*** Creates a new instance of UnwantedDiagram */
22 public UnwantedIncidentDiagram() {
23 super(ToolModel.getInstance(false),"UnwantedDiagram");
24
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 }