From c57034b0ee7b1bc794e01fed91301af154970a1d Mon Sep 17 00:00:00 2001 From: "John M. Penn" Date: Tue, 11 Feb 2025 16:06:27 -0600 Subject: [PATCH] Add Trick Logo and Buttons that will be activated in the near future. --- .../java/trick/jobperf/JobSpecificationMap.java | 10 ++++++++++ .../trick/jobperf/TraceViewInputToolBar.java | 16 +++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/trick_source/java/src/main/java/trick/jobperf/JobSpecificationMap.java b/trick_source/java/src/main/java/trick/jobperf/JobSpecificationMap.java index af6996bd..973b01ff 100644 --- a/trick_source/java/src/main/java/trick/jobperf/JobSpecificationMap.java +++ b/trick_source/java/src/main/java/trick/jobperf/JobSpecificationMap.java @@ -34,6 +34,16 @@ public class JobSpecificationMap { } } } +// TODO: +// Sometimes job specifications, and therefore their IDs are not recorded in the S_job_execution file. +// So, when we attempt to find one of these unrecorded Job specs by ID, we get null. +// +// Job IDs are of the form XX.YY (e.g., 12.03). The XX part is associated with +// a particular component sim object. The YY part identifies a specific job from that +// sim object. +// If an unknown ID shares the XX part of the ID, then perhaps we could at least report which +// simobject the job came from. + in.close(); } diff --git a/trick_source/java/src/main/java/trick/jobperf/TraceViewInputToolBar.java b/trick_source/java/src/main/java/trick/jobperf/TraceViewInputToolBar.java index 6caf3470..0b528f41 100644 --- a/trick_source/java/src/main/java/trick/jobperf/TraceViewInputToolBar.java +++ b/trick_source/java/src/main/java/trick/jobperf/TraceViewInputToolBar.java @@ -2,7 +2,10 @@ package trick.jobperf; import java.awt.*; import java.awt.event.*; +import java.awt.image.BufferedImage; import java.io.*; + +import javax.imageio.ImageIO; import javax.swing.*; import java.net.URL; @@ -86,13 +89,13 @@ public class TraceViewInputToolBar extends JToolBar implements ActionListener { } }); - advanceRangeButton = new JButton("Advance"); + advanceRangeButton = new JButton("\u25bc"); advanceRangeButton.addActionListener(this); advanceRangeButton.setActionCommand("advance-frame-range"); advanceRangeButton.setToolTipText("Advance the selected range of frames to be displayed."); add(advanceRangeButton); - advanceRangeButton = new JButton("Retreat"); + advanceRangeButton = new JButton("\u25b2"); advanceRangeButton.addActionListener(this); advanceRangeButton.setActionCommand("retreat-frame-range"); advanceRangeButton.setToolTipText("Retreat the selected range of frames to be displayed."); @@ -100,7 +103,14 @@ public class TraceViewInputToolBar extends JToolBar implements ActionListener { add( new JLabel(" ")); - // Add Trick LOGO here. + // Add Trick LOGO. + try { + BufferedImage image = ImageIO.read(getClass().getResource("/trick/common/resources/trick_small.gif")); + add( new JLabel( new ImageIcon(image))); + } catch (IOException e) { + System.out.println("Failed to load image."); + } + } @Override