mirror of
https://github.com/nasa/trick.git
synced 2025-06-17 14:48:19 +00:00
Added menu options to toggle the visibility of Trick View panes.
This currently doesn't work 100% properly. It will toggle fine, but when showing the panels it starts them collapsed. Resizing the pane causes them to appear for some reason.
This commit is contained in:
committed by
dbankieris
parent
7171288aa8
commit
70369fdb71
@ -370,6 +370,22 @@ public class TVApplication extends RunTimeTrickApplication implements VariableLi
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// CTL Actions
|
||||||
|
protected void toggleTreePane() {
|
||||||
|
if(variableTree.getParent().getParent().isVisible()) {
|
||||||
|
variableTree.getParent().getParent().setVisible(false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
variableTree.getParent().getParent().setVisible(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void toggleSearchPane() {
|
||||||
|
if(searchPanel.isVisible())
|
||||||
|
searchPanel.setVisible(false);
|
||||||
|
else
|
||||||
|
searchPanel.setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initialize(final String[] args) {
|
protected void initialize(final String[] args) {
|
||||||
@ -1599,6 +1615,25 @@ public class TVApplication extends RunTimeTrickApplication implements VariableLi
|
|||||||
add(new JMenuItem(clearLogsAction));
|
add(new JMenuItem(clearLogsAction));
|
||||||
}}, 1);
|
}}, 1);
|
||||||
|
|
||||||
|
//CTL
|
||||||
|
menuBar.add(new JMenu("View") {{
|
||||||
|
add(new JMenuItem("Toggle Tree Pane") {{
|
||||||
|
addActionListener(new ActionListener() {
|
||||||
|
public void actionPerformed(ActionEvent actionEvent) {
|
||||||
|
toggleTreePane();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}});
|
||||||
|
|
||||||
|
add(new JMenuItem("Toggle Search Pane") {{
|
||||||
|
addActionListener(new ActionListener() {
|
||||||
|
public void actionPerformed(ActionEvent actionEvent) {
|
||||||
|
toggleSearchPane();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}});
|
||||||
|
}}, 1);
|
||||||
|
|
||||||
return menuBar;
|
return menuBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user