Skip to content

Commit

Permalink
bug fix for time parsing where logged time is in float numbers
Browse files Browse the repository at this point in the history
added file name display in Log Stats
replaced some magical numbers/strings in Log View with variables
  • Loading branch information
vimsh committed Aug 20, 2015
1 parent 132ecb6 commit c072905
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 51 deletions.
Binary file modified MafScaling.jar
Binary file not shown.
19 changes: 17 additions & 2 deletions src/com/vgi/mafscaling/LogStats.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import javax.swing.JTable;
import javax.swing.JTextPane;
import javax.swing.ListSelectionModel;
import javax.swing.SwingConstants;
import javax.swing.UIDefaults;
import javax.swing.border.LineBorder;
import javax.swing.table.DefaultTableColumnModel;
Expand Down Expand Up @@ -118,6 +119,7 @@ protected void processFocusEvent(final FocusEvent e) {
private JButton filter3Button = null;
private JTable dataTable = null;
private JPanel cntlPanel = null;
private JLabel labelFileName = null;
private ExcelAdapter excelAdapter = null;
private HashMap<Double, HashMap<Double, ArrayList<Double>>> xData = null;
private Plot3DPanel plot = null;
Expand Down Expand Up @@ -191,9 +193,9 @@ private void createControlPanel(JPanel dataPanel) {

GridBagLayout gbl_cntlPanel = new GridBagLayout();
gbl_cntlPanel.columnWidths = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
gbl_cntlPanel.rowHeights = new int[]{0, 0, 0};
gbl_cntlPanel.rowHeights = new int[]{0, 0, 0, 0};
gbl_cntlPanel.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0};
gbl_cntlPanel.rowWeights = new double[]{0.0, 0.0, 0.0};
gbl_cntlPanel.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0};
cntlPanel.setLayout(gbl_cntlPanel);

JButton selectLogButton = addButton(0, 0, 2, "<html><center>Select<br>Log</center></html>", "selectlog");
Expand Down Expand Up @@ -245,6 +247,17 @@ private void createControlPanel(JPanel dataPanel) {
filter2TextBox = addTextFilter(1, 10, 5, doubleFmtFilters, false);
filter3TextBox = addTextFilter(2, 10, 5, doubleFmtFilters, false);

labelFileName = new JLabel("");
labelFileName.setHorizontalAlignment(SwingConstants.CENTER);
GridBagConstraints gbc_label = new GridBagConstraints();
gbc_label.anchor = GridBagConstraints.WEST;
gbc_label.fill = GridBagConstraints.HORIZONTAL;
gbc_label.insets = insets3;
gbc_label.gridx = 0;
gbc_label.gridy = 3;
gbc_label.gridwidth = gbl_cntlPanel.columnWidths.length;
cntlPanel.add(labelFileName, gbc_label);

JButton clearFiltersButton = addButton(0, 11, 2, "<html><center>Clear<br>Filters</center></html>", "clearfilters");
clearFiltersButton.setMargin(new Insets(3, 5, 3, 5));
clearFiltersButton.putClientProperty("Nimbus.Overrides", buttonInsets6);
Expand Down Expand Up @@ -505,6 +518,7 @@ private void getLogColumns() {
filter1Column.removeAllItems();
filter2Column.removeAllItems();
filter3Column.removeAllItems();
labelFileName.setText("");
logFile = fileChooser.getSelectedFile();
BufferedReader br = null;
try {
Expand Down Expand Up @@ -552,6 +566,7 @@ private void getLogColumns() {
filter2Column.setSelectedItem(filter2);
if (filter3 != null)
filter3Column.setSelectedItem(filter3);
labelFileName.setText("[" + logFile.getName() + "]");
}

private Statistics getStatId() {
Expand Down
Loading

0 comments on commit c072905

Please sign in to comment.