Commit 86ed9cc8 authored by apvrille's avatar apvrille

Update on network manager

parent b3bc95f5
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="ISO-8859-1"?>
<TURTLEGMODELING version="0.98-beta4">
<TURTLEGMODELING version="0.99-beta4">
<Modeling type="Avatar Analysis" nameTab="Analysis" >
<SequenceDiagramPanel name="MyScenario0" minX="10" maxX="2500" minY="10" maxY="1500" >
<COMPONENT type="301" id="17" >
<cdparam x="668" y="566" />
<sizeparam width="260" height="51" minWidth="20" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<sizeparam width="286" height="51" minWidth="20" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<hidden value="false" />
<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
<infoparam name="UML Note" value="We create an overall statement based
......@@ -40,7 +40,7 @@ This &quot;creation&quot; is a a dynamic webpage
<COMPONENT type="301" id="34" >
<cdparam x="904" y="315" />
<sizeparam width="192" height="27" minWidth="20" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<sizeparam width="209" height="27" minWidth="20" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<hidden value="false" />
<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
<infoparam name="UML Note" value="Creation of a token specific to
......@@ -130,7 +130,7 @@ the Banque Courtois
<SUBCOMPONENT type="602" id="43" >
<father id="93" num="0" />
<cdparam x="807" y="319" />
<sizeparam width="131" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<sizeparam width="141" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<hidden value="false" />
<cdrectangleparam minX="5" maxX="5" minY="10" maxY="470" />
<infoparam name="action state" value="m = {Id_BC}_BCpubK" />
......@@ -206,7 +206,7 @@ the Banque Courtois
<SUBCOMPONENT type="602" id="102" >
<father id="152" num="0" />
<cdparam x="476" y="555" />
<sizeparam width="226" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<sizeparam width="245" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<hidden value="false" />
<cdrectangleparam minX="5" maxX="5" minY="10" maxY="470" />
<infoparam name="action state" value="m1 = s1 + statementBanqueCourtois" />
......@@ -382,7 +382,7 @@ the Banque Courtois
<SequenceDiagramPanel name="MyScenario1" minX="10" maxX="2500" minY="10" maxY="1500" >
<COMPONENT type="301" id="231" >
<cdparam x="186" y="591" />
<sizeparam width="300" height="51" minWidth="20" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<sizeparam width="335" height="51" minWidth="20" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<hidden value="false" />
<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
<infoparam name="UML Note" value="The statement of the other bank is unciphered
......@@ -416,7 +416,7 @@ Banque courtois has no access to this statement.
<COMPONENT type="301" id="248" >
<cdparam x="889" y="478" />
<sizeparam width="198" height="27" minWidth="20" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<sizeparam width="214" height="27" minWidth="20" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<hidden value="false" />
<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
<infoparam name="UML Note" value="The statement is ciphered with
......@@ -446,7 +446,7 @@ the public key of the client
<COMPONENT type="301" id="265" >
<cdparam x="966" y="281" />
<sizeparam width="192" height="27" minWidth="20" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<sizeparam width="209" height="27" minWidth="20" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<hidden value="false" />
<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
<infoparam name="UML Note" value="Creation of a token specific to
......@@ -536,7 +536,7 @@ the Banque Courtois
<SUBCOMPONENT type="602" id="274" >
<father id="324" num="0" />
<cdparam x="869" y="285" />
<sizeparam width="131" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<sizeparam width="141" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<hidden value="false" />
<cdrectangleparam minX="5" maxX="5" minY="10" maxY="470" />
<infoparam name="action state" value="m = {Id_BC}_BCpubK" />
......@@ -612,7 +612,7 @@ the Banque Courtois
<SUBCOMPONENT type="602" id="333" >
<father id="383" num="0" />
<cdparam x="538" y="521" />
<sizeparam width="216" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<sizeparam width="235" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<hidden value="false" />
<cdrectangleparam minX="5" maxX="5" minY="10" maxY="470" />
<infoparam name="action state" value="m1 = s1, statementBanqueCourtois" />
......
......@@ -2199,7 +2199,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe
}
JDialogLoadingNetworkModel jdlnm = new JDialogLoadingNetworkModel(frame, this, "Opening a network model", ConfigurationTTool.URL_MODEL);
GraphicLib.centerOnParent(jdlnm, 600, 800);
GraphicLib.centerOnParent(jdlnm, 700, 800);
jdlnm.setVisible(true); // blocked until dialog has been closed
}
......
......@@ -47,23 +47,20 @@
package ui.networkmodelloader;
import myutil.*;
import ui.ConfigurationTTool;
import ui.IconManager;
import ui.JTextAreaWriter;
import ui.MainGUI;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedReader;
import java.awt.event.*;
import java.io.File;
import java.util.ArrayList;
import java.util.*;
import javax.swing.*;
import java.net.*;
import java.io.*;
import ui.*;
import myutil.*;
public class JDialogLoadingNetworkModel extends javax.swing.JFrame implements ActionListener, Runnable, LoaderFacilityInterface, CallbackLoaderInterface {
public final static String [] FEATURES = {"all", "requirements", "attacktrees", "properties", "partitioning", "analysis", "design", "prototyping", "security protocol"};
public final static String [] FEATURES = {"all", "diplodocus", "avatar", "sysml-sec", "assumptions", "requirements", "attacktrees", "properties", "partitioning", "analysis", "design", "prototyping", "security protocol"};
public final static String [] PROPS = {"safety", "security", "performance"};
......@@ -140,6 +137,7 @@ public class JDialogLoadingNetworkModel extends javax.swing.JFrame implements Ac
jta = new ScrolledJTextArea();
jta.setEditable(false);
jta.setLineWrap(true);
jta.setMargin(new Insets(10, 10, 10, 10));
jta.setTabSize(3);
jta.append("Connecting to " + url + ".\n Please wait ...\n\n");
......@@ -268,6 +266,12 @@ public class JDialogLoadingNetworkModel extends javax.swing.JFrame implements Ac
//nm.type = NetworkModel.stringToNetworkModelType(inputLine.substring(5, inputLine.length()).trim());
}
}
if (inputLine.startsWith("-AUTHOR")) {
if (nm != null) {
nm.author = inputLine.substring(7, inputLine.length()).trim();
}
}
if (inputLine.startsWith("-DESCRIPTION")) {
......
......@@ -47,7 +47,9 @@
package ui.networkmodelloader;
import java.awt.image.BufferedImage;
import javax.swing.*;
import java.io.File;
import java.awt.image.*;
public class NetworkModel {
......@@ -55,7 +57,8 @@ public class NetworkModel {
public String fileName;
public boolean [] features;
public boolean [] props;
public String description;
public String author = "";
public String description = "";
public String image;
public BufferedImage bi;
public BufferedImage scaledImg;
......
......@@ -47,20 +47,15 @@
package ui.networkmodelloader;
import myutil.GraphicLib;
import myutil.ImageManager;
import myutil.LoaderFacilityInterface;
import myutil.TraceManager;
import ui.ColorManager;
import javax.swing.*;
import javax.swing.border.BevelBorder;
import java.awt.*;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.util.ArrayList;
import java.awt.event.*;
import java.awt.image.*;
import javax.swing.*;
import javax.swing.border.*;
import java.util.*;
import myutil.*;
import ui.*;
......@@ -288,7 +283,7 @@ public class NetworkModelPanel extends JPanel implements MouseListener, MouseMot
if (indexOfSelected != previousIndex) {
if (indexOfSelected != -1) {
NetworkModel nm = listOfModels.get(indexOfSelected);
jta.append("\n--- " + nm.fileName + "---\n" + nm.description + "\n-------------\n\n");
jta.append("\n--- " + nm.fileName + "---\n" + "by: " + nm.author + "\n" + nm.description + "\n-------------\n\n");
}
repaint();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment