[fix] Added details toggle to DebugLogDialog
This commit is contained in:
parent
42270276d5
commit
cfc1715cf4
@ -157,6 +157,7 @@ bugreport.dlg.provideDescription.title = Bug description missing
|
|||||||
debuglogdlg.but.clear = Clear
|
debuglogdlg.but.clear = Clear
|
||||||
debuglogdlg.OpenRocketdebuglog = OpenRocket debug log
|
debuglogdlg.OpenRocketdebuglog = OpenRocket debug log
|
||||||
debuglogdlg.Displayloglines = Display log lines:
|
debuglogdlg.Displayloglines = Display log lines:
|
||||||
|
debuglogdlg.ToggleDetails = Details
|
||||||
debuglogdlg.Follow = Follow
|
debuglogdlg.Follow = Follow
|
||||||
debuglogdlg.col.Time = Time
|
debuglogdlg.col.Time = Time
|
||||||
debuglogdlg.col.Level = Level
|
debuglogdlg.col.Level = Level
|
||||||
|
@ -96,7 +96,8 @@ public class DebugLogDialog extends JDialog {
|
|||||||
private final JCheckBox followBox;
|
private final JCheckBox followBox;
|
||||||
private final Timer timer;
|
private final Timer timer;
|
||||||
|
|
||||||
|
private final JSplitPane split;
|
||||||
|
private final JPanel bottomPanel;
|
||||||
private final JTable table;
|
private final JTable table;
|
||||||
private final ColumnTableModel model;
|
private final ColumnTableModel model;
|
||||||
private final TableRowSorter<TableModel> sorter;
|
private final TableRowSorter<TableModel> sorter;
|
||||||
@ -108,7 +109,6 @@ public class DebugLogDialog extends JDialog {
|
|||||||
private final SelectableLabel messageLabel;
|
private final SelectableLabel messageLabel;
|
||||||
private final JTextArea stackTraceLabel;
|
private final JTextArea stackTraceLabel;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
public DebugLogDialog(Window parent) {
|
public DebugLogDialog(Window parent) {
|
||||||
//// OpenRocket debug log
|
//// OpenRocket debug log
|
||||||
super(parent, trans.get("debuglogdlg.OpenRocketdebuglog"));
|
super(parent, trans.get("debuglogdlg.OpenRocketdebuglog"));
|
||||||
@ -137,7 +137,7 @@ public class DebugLogDialog extends JDialog {
|
|||||||
// Create the UI
|
// Create the UI
|
||||||
this.setLayout( new MigLayout("fill"));
|
this.setLayout( new MigLayout("fill"));
|
||||||
|
|
||||||
JSplitPane split = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
|
split = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
|
||||||
split.setDividerLocation(0.7);
|
split.setDividerLocation(0.7);
|
||||||
this.add(split, "grow, pushy 200, growprioy 200");
|
this.add(split, "grow, pushy 200, growprioy 200");
|
||||||
|
|
||||||
@ -160,7 +160,25 @@ public class DebugLogDialog extends JDialog {
|
|||||||
topPanel.add(box, "gapright unrel");
|
topPanel.add(box, "gapright unrel");
|
||||||
filterButtons.put(l, box);
|
filterButtons.put(l, box);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//// Toggle Bottom Details Pane
|
||||||
|
JCheckBox toggleDetailsBox = new JCheckBox(trans.get("debuglogdlg.ToggleDetails"));
|
||||||
|
toggleDetailsBox.setSelected(true);
|
||||||
|
topPanel.add(toggleDetailsBox, "gapright unrel");
|
||||||
|
toggleDetailsBox.addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
boolean isActive = ((JCheckBox)e.getSource()).isSelected();
|
||||||
|
log.info(" toggled to: "+isActive );
|
||||||
|
bottomPanel.setEnabled(isActive);
|
||||||
|
if(isActive) {
|
||||||
|
split.setDividerLocation(0.5);
|
||||||
|
}else {
|
||||||
|
split.setDividerLocation(1.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
//// Follow
|
//// Follow
|
||||||
followBox = new JCheckBox(trans.get("debuglogdlg.Follow"));
|
followBox = new JCheckBox(trans.get("debuglogdlg.Follow"));
|
||||||
followBox.setSelected(true);
|
followBox.setSelected(true);
|
||||||
@ -298,7 +316,7 @@ public class DebugLogDialog extends JDialog {
|
|||||||
"px, height 400px, growy, pushy 200, growprioy 200");
|
"px, height 400px, growy, pushy 200, growprioy 200");
|
||||||
|
|
||||||
|
|
||||||
JPanel bottomPanel = new JPanel(new MigLayout("fill"));
|
bottomPanel = new JPanel(new MigLayout("fill"));
|
||||||
split.add(bottomPanel);
|
split.add(bottomPanel);
|
||||||
|
|
||||||
//// Log line number:
|
//// Log line number:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user