mirror of
https://github.com/nasa/trick.git
synced 2025-06-02 07:31:01 +00:00
Added a button & menu item for resetting the variable table to its default order (#1867)
* Added a button&menu item to reset var table to its default order Added a button&menu item to reset var table to its default order. * Updated the comment of the action of resetting var table sorting Updated the comment of the action of resetting var table sorting * Added a mnemonic key for resetting the var table to its default order Added a mnemonic key for resetting the var table to its default order
This commit is contained in:
parent
957682f68b
commit
ec4d6d1b7b
@ -368,6 +368,18 @@ public class TVApplication extends RunTimeTrickApplication implements VariableLi
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** reset the variable table to its default order */
|
||||||
|
protected AbstractAction resetSortingAction = new AbstractAction("Reset Table Sorting",
|
||||||
|
new ImageIcon(TVApplication.class.getResource("resources/resetsorting.png"))) {
|
||||||
|
{
|
||||||
|
putValue(SHORT_DESCRIPTION, "Reset the variable table to its default order.");
|
||||||
|
putValue(MNEMONIC_KEY, KeyEvent.VK_B);
|
||||||
|
}
|
||||||
|
public void actionPerformed(ActionEvent actionEvent) {
|
||||||
|
variableTable.getRowSorter().setSortKeys(null);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/** clear logs action */
|
/** clear logs action */
|
||||||
protected AbstractAction clearLogsAction = new AbstractAction("Clear All Logged Values") {
|
protected AbstractAction clearLogsAction = new AbstractAction("Clear All Logged Values") {
|
||||||
{
|
{
|
||||||
@ -1621,6 +1633,7 @@ public class TVApplication extends RunTimeTrickApplication implements VariableLi
|
|||||||
add(new JMenuItem(monitorAction));
|
add(new JMenuItem(monitorAction));
|
||||||
add(new JMenuItem(stripChartAction));
|
add(new JMenuItem(stripChartAction));
|
||||||
add(new JMenuItem(removeAction));
|
add(new JMenuItem(removeAction));
|
||||||
|
add(new JMenuItem(resetSortingAction));
|
||||||
add(new JMenuItem(clearLogsAction));
|
add(new JMenuItem(clearLogsAction));
|
||||||
}}, 1);
|
}}, 1);
|
||||||
|
|
||||||
@ -1679,6 +1692,7 @@ public class TVApplication extends RunTimeTrickApplication implements VariableLi
|
|||||||
add(Box.createHorizontalGlue());
|
add(Box.createHorizontalGlue());
|
||||||
add(stripChartAction);
|
add(stripChartAction);
|
||||||
add(removeAction);
|
add(removeAction);
|
||||||
|
add(resetSortingAction);
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 794 B |
Loading…
x
Reference in New Issue
Block a user