Changeset 722


Ignore:
Timestamp:
Jun 17, 2008, 11:16:10 AM (15 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #116: Make the MEV launcher extension aware of bioassaysets that store data in file

The fix was easier than expected, we only need to check if there are any spots in the database. This works with BASE 2.7 as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.mev/trunk/src/net/sf/basedb/mev/factory/MevButtonFactory.java

    r666 r722  
    6464    {
    6565      BioAssaySet bas = (BioAssaySet)currentItem;
    66       String ID = String.valueOf(bas.getId());
    67       ButtonBean action = new ButtonBean();
    68       action.setClazz(getClazz());
    69       action.setEnabled(isEnabled());
    70       action.setIcon(getIcon());
    71       action.setId(getId());
    72       action.setOnClick(getOnClick().replace("$ID$", ID));
    73       action.setStyle(getStyle());
    74       action.setTitle(getTitle());
    75       action.setTooltip(getTooltip());
    76       action.setVisible(isVisible());
    77       actions = new ButtonAction[] { action };
     66      if (bas.getNumSpots() > 0)
     67      {
     68        String ID = String.valueOf(bas.getId());
     69        ButtonBean action = new ButtonBean();
     70        action.setClazz(getClazz());
     71        action.setEnabled(isEnabled());
     72        action.setIcon(getIcon());
     73        action.setId(getId());
     74        action.setOnClick(getOnClick().replace("$ID$", ID));
     75        action.setStyle(getStyle());
     76        action.setTitle(getTitle());
     77        action.setTooltip(getTooltip());
     78        action.setVisible(isVisible());
     79        actions = new ButtonAction[] { action };
     80      }
    7881    }
    7982    return actions;
Note: See TracChangeset for help on using the changeset viewer.