Changeset 315


Ignore:
Timestamp:
Mar 28, 2012, 12:37:58 PM (5 years ago)
Author:
tim.te.beek@…
Message:

When a table file is selected, replace settings rather than merely setting tableFile, to wipe all previous settings
Add interpretation tooltip whenever it's non string

Location:
trunk/alternative-table-import/src/main/java/nl/nbic/brs/alttableimport/views
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/alternative-table-import/src/main/java/nl/nbic/brs/alttableimport/views/ParseOptionsPanel.java

    r305 r315  
    9393
    9494                                // Only propagate if a file was selected, not if the dialog was canceled
    95                                 if (selectedFile != null)
    96                                         // Invoke setTableFile, which should propagate correctly to the other UI elements
    97                                         tableModel.getSettings().setTableFile(selectedFile);
     95                                if (selectedFile != null) {
     96                                        // Replace settings with a new empty instance that only contains tableFile as argument,so that any
     97                                        // previously selected interactions, interpretations, attributes and parse options are reset
     98                                        ParserSettingsModel replacementSettings = new ParserSettingsModel();
     99                                        replacementSettings.setTableFile(selectedFile);
     100                                        tableModel.replaceSettings(replacementSettings);
     101                                }
    98102
    99103                                // Launch the LoggerDialog if warnings were logged during this conversion
  • trunk/alternative-table-import/src/main/java/nl/nbic/brs/alttableimport/views/PreviewPanel.java

    r312 r315  
    276276                                label.setText(formattedNumber + suffix);
    277277                        }
     278                }
     279
     280                // Add a tooltip for any non-string column classes to warn the user
     281                if (columnClass != String.class)
    278282                        tooltipBuilder.append("Column is interpreted as " + columnClass.getSimpleName() + "\n");
    279                 }
    280283
    281284                // Update background color depending on whether this column is a source, target or edge attribute
Note: See TracChangeset for help on using the changeset viewer.