diff --git a/trick_source/java/src/trick/tv/TVApplication.java b/trick_source/java/src/trick/tv/TVApplication.java index f9df7ab5..c87d78d8 100644 --- a/trick_source/java/src/trick/tv/TVApplication.java +++ b/trick_source/java/src/trick/tv/TVApplication.java @@ -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; }