Changeset 38


Ignore:
Timestamp:
09/14/04 11:28:35 (15 years ago)
Author:
curtis
Message:

Better data transform changed notification.

Location:
trunk/loci/visbio/data
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/visbio/data/DataControls.java

    r37 r38  
    279279      CellConstraints cc = new CellConstraints(); 
    280280      builder.add(dataControls, cc.xy(1, 1)); 
    281       pane.add(builder.getPanel(), BorderLayout.CENTER); 
     281      JScrollPane scroll = new JScrollPane(builder.getPanel()); 
     282      SwingUtil.configureScrollPane(scroll); 
     283      pane.add(scroll, BorderLayout.CENTER); 
    282284 
    283285      // add data's controls to table 
  • trunk/loci/visbio/data/Dataset.java

    r26 r38  
    271271    } 
    272272    if (!(d instanceof FlatField)) { 
     273      String name = d == null ? "null" : d.getClass().getName(); 
    273274      System.err.println("Data chunk #" + (imgIndex + 1) + " from file " + 
    274         filename + " is not an image (" + d.getClass().getName() + ")"); 
     275        filename + " is not an image (" + name + ")"); 
    275276      return null; 
    276277    } 
  • trunk/loci/visbio/data/SpectralTransform.java

    r26 r38  
    4545 */ 
    4646public class SpectralTransform extends DataTransform 
    47   implements ImageTransform 
     47  implements ImageTransform, TransformListener 
    4848{ 
    4949 
     
    8484 
    8585    initState(null); 
     86    parent.addTransformListener(this); 
    8687  } 
    8788 
     
    318319    System.arraycopy(range, 0, rt, 0, range.length); 
    319320    return rt; 
     321  } 
     322 
     323 
     324  // -- TransformListener API methods -- 
     325 
     326  /** Called when parent data transform's parameters are updated. */ 
     327  public void transformChanged(TransformEvent e) { 
     328    // CTR TODO 
     329    // depending on how parent changed, recompute weights array size 
     330    // if it changes size, need to redo spectral widget layout 
     331    // but always need to notify listeners of spectral transform change 
     332    notifyListeners(new TransformEvent(this)); 
    320333  } 
    321334 
Note: See TracChangeset for help on using the changeset viewer.