'writing logs' label

This commit is contained in:
rusefi 2017-02-22 18:03:45 -05:00
parent d3ebdfdc91
commit 973d1de4d9
4 changed files with 9 additions and 5 deletions

View File

@ -15,6 +15,7 @@ public enum FileLog {
SIMULATOR_CONSOLE;
public static final String DIR = "out/";
public static final String LOG_INFO_TEXT = "Writing logs to '" + DIR + "'";
public static String currentLogName;
public static final String END_OF_TIMESTAND_TAG = "<EOT>: ";
public static final Logger LOGGER = new Logger() {

View File

@ -44,7 +44,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
* @see EngineSnifferPanel
*/
public class Launcher {
public static final int CONSOLE_VERSION = 20170218;
public static final int CONSOLE_VERSION = 20170222;
public static final boolean SHOW_STIMULATOR = false;
private static final String TAB_INDEX = "main_tab";
protected static final String PORT_KEY = "port";

View File

@ -1,5 +1,6 @@
package com.rusefi.ui;
import com.rusefi.FileLog;
import com.rusefi.Launcher;
import com.rusefi.core.MessagesCentral;
import com.rusefi.ui.util.UiUtils;
@ -13,7 +14,7 @@ public class WarningPanel {
private static final String WARNING = "WARNING";
private static final String ERROR = "firmware error";
private final JPanel panel = new JPanel(new BorderLayout());
private final JPanel panel = new JPanel(new FlowLayout());
private final JLabel label = new JLabel();
private final JButton reset = new JButton("clear warning");
@ -27,7 +28,7 @@ public class WarningPanel {
public WarningPanel() {
label.setForeground(Color.red);
panel.add(label, BorderLayout.WEST);
panel.add(label);
Font currentFont = label.getFont();
label.setFont(currentFont.deriveFont((float) (currentFont.getSize() * 1.5)));
@ -61,7 +62,9 @@ public class WarningPanel {
}
}
});
panel.add(reset, BorderLayout.EAST);
panel.add(reset);
// todo: only display label if logs are being recorded
panel.add(new JLabel(FileLog.LOG_INFO_TEXT));
}
private void clear() {

View File

@ -37,7 +37,7 @@ public class LogViewer extends JPanel {
return pathname.getName().contains("MAIN_rfi_report");
}
};
public static final String DEFAULT_LOG_LOCATION = "out";
public static final String DEFAULT_LOG_LOCATION = FileLog.DIR;
private final JLabel folderLabel = new JLabel();
private final JLabel fileLabel = new JLabel();
private final DefaultListModel<FileItem> fileListModel = new DefaultListModel<FileItem>();