File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
src-gui/java/pt/lsts/imc/gui Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -76,10 +76,10 @@ public class ImcStatePanel extends JPanel {
7676 private String selectedMessage = null ;
7777
7878 public ImcStatePanel (ImcSystemState state ) {
79- this (state , true );
79+ this (state , true , true );
8080 }
8181
82- public ImcStatePanel (ImcSystemState state , boolean enableScrollBars ) {
82+ public ImcStatePanel (ImcSystemState state , boolean enableScrollBars , boolean addTabsOrdered ) {
8383 this .state = state ;
8484 setLayout (new BorderLayout ());
8585 stateListModel = new StateListModel (state );
@@ -116,8 +116,11 @@ public void valueChanged(ListSelectionEvent e) {
116116 sp .setVerticalScrollBarPolicy (enableScrollBars ? JScrollPane .VERTICAL_SCROLLBAR_AS_NEEDED :
117117 JScrollPane .VERTICAL_SCROLLBAR_NEVER );
118118
119- //tabs.add(m.getKey(), sp);
120- addTabOrdered (tabs , m .getKey (), sp );
119+ if (addTabsOrdered ) {
120+ addTabOrdered (tabs , m .getKey (), sp );
121+ } else {
122+ tabs .add (m .getKey (), sp );
123+ }
121124 if (m .getKey ().equals (selectedItem )) {
122125 tabs .setSelectedComponent (sp );
123126 }
You can’t perform that action at this time.
0 commit comments