// Constructor for the daemon only!!!!! public TracesViewer( String port, String logFile, HashMap<String, MessageLogList> traces, String logName, String logDescription, String auxInfo, String title, String back, String faces, String actors, String aLogoNist) { super(title); this.logFile = logFile; try { Toolkit toolkit = Toolkit.getDefaultToolkit(); URL url = TracesViewer.class.getResource(back); backgroundImage = toolkit.getImage(url); url = TracesViewer.class.getResource(actors); actorsImage = toolkit.getImage(url); url = TracesViewer.class.getResource(faces); facesImage = toolkit.getImage(url); url = TracesViewer.class.getResource(aLogoNist); logoNist = toolkit.getImage(url); } catch (Exception e) { backgroundImage = null; actorsImage = null; facesImage = null; logoNist = null; System.out.println("Images are not loaded."); e.printStackTrace(); } TracesSessions tss = new TracesSessions(); tss.setName(logName); if (traces != null) { Enumeration elements = traces.elements(); while (elements.hasMoreElements()) { MessageLogList mll = (MessageLogList) elements.nextElement(); TracesSession ts = new TracesSession(mll); ts.setName(logName); ts.setInfo(auxInfo); ts.setLogDescription(logDescription); tss.add(ts); } } if (tss.isEmpty()) { TracesSession ts = new TracesSession(); ts.setName("No available session, refresh"); tss.add(ts); } listenerTracesViewer = new ListenerTracesViewer(this); this.tracesSessions = tss; initComponents(); // Initialisation of the tracesSessionsList: tracesSessionsList.setTracesSessions(this.tracesSessions); // Initialisation of the Thread for the animations: animationThread = new TracesAnimationThread(tracesCanvas); // width, height this.setSize(670, 620); this.setLocation(0, 0); try { // Try to open a connection: TracesSocket ts = new TracesSocket(logFile, port); ts.start(); } catch (Exception e) { e.printStackTrace(); } this.setVisible(true); }