Added a button to the left margin of each tabbed pane for quick access to the Learning Table Values dialog (handy on touch screens).

This commit is contained in:
Dale Schultz 2013-07-22 18:31:32 -04:00
parent ae9b6f8fbb
commit 110b4e2a32
1 changed files with 42 additions and 3 deletions

View File

@ -165,6 +165,7 @@ import com.romraider.logger.ecu.ui.paramlist.ParameterRow;
import com.romraider.logger.ecu.ui.playback.PlaybackManagerImpl;
import com.romraider.logger.ecu.ui.swing.layout.BetterFlowLayout;
import com.romraider.logger.ecu.ui.swing.menubar.EcuLoggerMenuBar;
import com.romraider.logger.ecu.ui.swing.menubar.action.LearningTableValuesAction;
import com.romraider.logger.ecu.ui.swing.menubar.action.LogFileNameFieldAction;
import com.romraider.logger.ecu.ui.swing.menubar.action.ToggleButtonAction;
import com.romraider.logger.ecu.ui.swing.vertical.VerticalTextIcon;
@ -856,9 +857,37 @@ public final class EcuLogger extends AbstractFrame implements MessageListener {
}
private JComponent buildTabbedPane() {
addSplitPaneTab("Data", buildSplitPane(buildParamListPane(dataTabParamListTableModel, dataTabSwitchListTableModel, dataTabExternalListTableModel), buildDataTab()), buildUnselectAllButton());
addSplitPaneTab("Graph", buildSplitPane(buildParamListPane(graphTabParamListTableModel, graphTabSwitchListTableModel, graphTabExternalListTableModel), buildGraphTab()), buildUnselectAllButton());
addSplitPaneTab("Dashboard", buildSplitPane(buildParamListPane(dashboardTabParamListTableModel, dashboardTabSwitchListTableModel, dashboardTabExternalListTableModel), buildDashboardTab()), buildUnselectAllButton(), buildToggleGaugeStyleButton());
addSplitPaneTab(
"Data",
buildSplitPane(
buildParamListPane(
dataTabParamListTableModel,
dataTabSwitchListTableModel,
dataTabExternalListTableModel),
buildDataTab()),
buildUnselectAllButton(),
buildLtvButton());
addSplitPaneTab(
"Graph",
buildSplitPane(
buildParamListPane(
graphTabParamListTableModel,
graphTabSwitchListTableModel,
graphTabExternalListTableModel),
buildGraphTab()),
buildUnselectAllButton(),
buildLtvButton());
addSplitPaneTab(
"Dashboard",
buildSplitPane(
buildParamListPane(
dashboardTabParamListTableModel,
dashboardTabSwitchListTableModel,
dashboardTabExternalListTableModel),
buildDashboardTab()),
buildUnselectAllButton(),
buildLtvButton(),
buildToggleGaugeStyleButton());
tabbedPane.add("MAF", mafTab.getPanel());
tabbedPane.add("Injector", injectorTab.getPanel());
tabbedPane.add("Dyno", dynoTab.getPanel());
@ -945,6 +974,16 @@ public final class EcuLogger extends AbstractFrame implements MessageListener {
return button;
}
private JButton buildLtvButton() {
final JButton button = new JButton();
VerticalTextIcon textIcon =
new VerticalTextIcon(button, "Learning Values", ROTATE_LEFT);
button.setIcon(textIcon);
button.setPreferredSize(new Dimension(25, 90));
button.addActionListener(new LearningTableValuesAction(this));
return button;
}
private void addSplitPaneTab(String name, final JSplitPane splitPane, JComponent... extraControls) {
final JToggleButton toggleListButton = new JToggleButton();
toggleListButton.setToolTipText(TOGGLE_LIST_TT_TEXT);