Changeset 565 for trunk/loci/visbio/view


Ignore:
Timestamp:
11/03/05 16:12:34 (15 years ago)
Author:
curtis
Message:

Fix X and Y ranges according to first transform using those maps.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/visbio/view/TransformHandler.java

    r503 r565  
    3636import javax.swing.event.ChangeListener; 
    3737import loci.visbio.VisBioFrame; 
    38 import loci.visbio.data.DataCache; 
    39 import loci.visbio.data.DataTransform; 
     38import loci.visbio.data.*; 
    4039import loci.visbio.state.*; 
    4140import loci.visbio.util.DisplayUtil; 
     
    450449            if (textControl != null) textControl.setFont(font); 
    451450          } 
     451          else if (map.getDisplayScalar().equals(Display.XAxis)) { 
     452            // fix X range according to first transform (if it is an image) 
     453            if (trans instanceof ImageTransform) { 
     454              ImageTransform it = (ImageTransform) trans; 
     455              map.setRange(0, it.getImageWidth() - 1); 
     456            } 
     457          } 
     458          else if (map.getDisplayScalar().equals(Display.YAxis)) { 
     459            // fix Y range according to first transform (if it is an image) 
     460            if (trans instanceof ImageTransform) { 
     461              ImageTransform it = (ImageTransform) trans; 
     462              map.setRange(0, it.getImageHeight() - 1); 
     463            } 
     464          } 
    452465        } 
    453466        doCustomMaps(); 
Note: See TracChangeset for help on using the changeset viewer.