Changeset 350


Ignore:
Timestamp:
Apr 6, 2012, 1:07:39 PM (5 years ago)
Author:
tim.te.beek@…
Message:

If attribute selection is empty, select all attributes so we can plot something
Update test & launchers accordingly
Remove protected getter on plottingParams in PlotDialog?, as it's now no longer needed

Location:
trunk/expression-data-viewer/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/expression-data-viewer/src/main/java/nl/nbic/brs/expview/model/SelectedAttributesModel.java

    r348 r350  
    5959                }
    6060
    61                 // TODO If selection is empty, select all so we can plot something
     61                // If selection is empty, select all so we can plot something
     62                if (isSelectionEmpty())
     63                        addSelectionInterval(0, availableAttributesModel.getSize() - 1);
    6264
    6365                // Done updating: Store all attributes for future use
  • trunk/expression-data-viewer/src/main/java/nl/nbic/brs/expview/view/PlotDialog.java

    r349 r350  
    2121import javax.swing.event.ChangeListener;
    2222
    23 import lombok.AccessLevel;
    24 import lombok.Getter;
    25 
    2623import org.apache.commons.lang.StringUtils;
    2724import org.jfree.chart.ChartFactory;
     
    3734
    3835public class PlotDialog extends JDialog implements ChangeListener {
    39         @Getter(value = AccessLevel.PROTECTED)
    4036        PlottingParams                                          plottingParams  = new PlottingParams();
    4137
  • trunk/expression-data-viewer/src/test/java/nl/nbic/brs/expview/model/TestPlottingParams.java

    r348 r350  
    5353
    5454                // Wait for dataset change to come through from background thread
    55                 waitFor.changeReceived = false;
    56                 attributesModel.setSelectionInterval(0, attributesModel.getSize() - 1);
    5755                while (!waitFor.changeReceived) {
    5856                        System.out.println("Sleeping");
     
    6967                // Switch to plotting edge attributes: Allow all attribute names, select all attributes
    7068                plottingParams.getAttributesFromNodes().setSelected(false);
    71                 plottingParams.getOnlyExpressionAttributes().setSelected(false);
    7269
    7370                // Wait for dataset change to come through from background thread
    7471                waitFor.changeReceived = false;
    75                 attributesModel.setSelectionInterval(0, attributesModel.getSize() - 1);
     72                plottingParams.getOnlyExpressionAttributes().setSelected(false);
    7673                while (!waitFor.changeReceived) {
    7774                        System.out.println("Sleeping");
  • trunk/expression-data-viewer/src/test/java/nl/nbic/brs/expview/view/LaunchPlotDialog.java

    r344 r350  
    99import cytoscape.Cytoscape;
    1010import cytoscape.init.CyInitParams;
    11 
    12 import nl.nbic.brs.expview.model.AttributesModel;
    13 import nl.nbic.brs.expview.model.PlottingParams;
    1411
    1512public class LaunchPlotDialog {
     
    3835                        public void run() {
    3936                                PlotDialog dialog = new PlotDialog(new JFrame());
    40                                 // Set all the correct options on the PlottingParams contained in PlotDialog
    41                                 PlottingParams plottingParams = dialog.getPlottingParams();
    42                                 // plottingParams.getNetworkModel().setSelectedItem(network);
    43                                 AttributesModel attributeModel = plottingParams.getAttributesModel();
    44                                 // Select all the attributes for the plot
    45                                 attributeModel.setSelectionInterval(0, attributeModel.getSize() - 1);
    46 
    4737                                // Exit when window closes
    4838                                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
Note: See TracChangeset for help on using the changeset viewer.