49 TimeComboBox timeComboBox;
50 JTabbedPane threadListTabbedPane;
51 DefaultListModel<Long> listModel;
52 JTextField filterTF;
53 JLabel messageLabel;
54 JSplitPane threadsSplitPane;
55 HashMap<Long, String> nameCache = new HashMap<Long, String>();
56
57 private ThreadOverviewPanel overviewPanel;
58 private boolean plotterListening = false;
59
60
61 private static final String threadCountKey = "threadCount";
62 private static final String peakKey = "peak";
63
64 private static final Color threadCountColor = Plotter.defaultColor;
65 private static final Color peakColor = Color.red;
66
67 private static final Border thinEmptyBorder = new EmptyBorder(2, 2, 2, 2);
68
69 private static final String infoLabelFormat = "ThreadTab.infoLabelFormat";
70
71
72 /*
73 Hierarchy of panels and layouts for this tab:
74
75 ThreadTab (BorderLayout)
76
77 North: topPanel (BorderLayout)
78
79 Center: controlPanel (FlowLayout)
80 timeComboBox
81
82 Center: plotterPanel (BorderLayout)
83
84 Center: plotter
85
86 */
87
88
89 public static String getTabName() {
90 return Messages.THREADS;
91 }
675 }
676 }
677
678 }
679
680 OverviewPanel[] getOverviewPanels() {
681 if (overviewPanel == null) {
682 overviewPanel = new ThreadOverviewPanel();
683 }
684 return new OverviewPanel[] { overviewPanel };
685 }
686
687
688 private static class ThreadOverviewPanel extends OverviewPanel {
689 ThreadOverviewPanel() {
690 super(Messages.THREADS, threadCountKey, Messages.LIVE_THREADS, null);
691 }
692
693 private void updateThreadsInfo(long tlCount, long tpCount, long ttCount, long timeStamp) {
694 getPlotter().addValues(timeStamp, tlCount);
695 getInfoLabel().setText(Resources.format(infoLabelFormat, tlCount, tpCount, ttCount));
696 }
697 }
698 }
|
49 TimeComboBox timeComboBox;
50 JTabbedPane threadListTabbedPane;
51 DefaultListModel<Long> listModel;
52 JTextField filterTF;
53 JLabel messageLabel;
54 JSplitPane threadsSplitPane;
55 HashMap<Long, String> nameCache = new HashMap<Long, String>();
56
57 private ThreadOverviewPanel overviewPanel;
58 private boolean plotterListening = false;
59
60
61 private static final String threadCountKey = "threadCount";
62 private static final String peakKey = "peak";
63
64 private static final Color threadCountColor = Plotter.defaultColor;
65 private static final Color peakColor = Color.red;
66
67 private static final Border thinEmptyBorder = new EmptyBorder(2, 2, 2, 2);
68
69 /*
70 Hierarchy of panels and layouts for this tab:
71
72 ThreadTab (BorderLayout)
73
74 North: topPanel (BorderLayout)
75
76 Center: controlPanel (FlowLayout)
77 timeComboBox
78
79 Center: plotterPanel (BorderLayout)
80
81 Center: plotter
82
83 */
84
85
86 public static String getTabName() {
87 return Messages.THREADS;
88 }
672 }
673 }
674
675 }
676
677 OverviewPanel[] getOverviewPanels() {
678 if (overviewPanel == null) {
679 overviewPanel = new ThreadOverviewPanel();
680 }
681 return new OverviewPanel[] { overviewPanel };
682 }
683
684
685 private static class ThreadOverviewPanel extends OverviewPanel {
686 ThreadOverviewPanel() {
687 super(Messages.THREADS, threadCountKey, Messages.LIVE_THREADS, null);
688 }
689
690 private void updateThreadsInfo(long tlCount, long tpCount, long ttCount, long timeStamp) {
691 getPlotter().addValues(timeStamp, tlCount);
692 getInfoLabel().setText(Resources.format(Messages.THREAD_TAB_INFO_LABEL_FORMAT, tlCount, tpCount, ttCount));
693 }
694 }
695 }
|