mirror of
https://github.com/nasa/trick.git
synced 2025-01-29 15:43:57 +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:
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
|
||||
protected void initialize(final String[] args) {
|
||||
@ -1599,6 +1615,25 @@ public class TVApplication extends RunTimeTrickApplication implements VariableLi
|
||||
add(new JMenuItem(clearLogsAction));
|
||||
}}, 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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user