• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.clients
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • ← Previous Changeset
  • Next Changeset →

Changeset 5545

Show
Ignore:
Timestamp:
07/22/08 14:00:27 (3 months ago)
Author:
donald
Message:

Fixed bug in displaying polyline text.

Files:
1 modified

  • trunk/SRC/org/openmicroscopy/shoola/util/roi/figures/MeasureBezierFigure.java (modified) (7 diffs)

Legend:

Unmodified
Added
Removed
  • trunk/SRC/org/openmicroscopy/shoola/util/roi/figures/MeasureBezierFigure.java

    r5544 r5545  
    3434import java.text.NumberFormat; 
    3535import java.util.ArrayList; 
     36import java.util.HashMap; 
     37import java.util.HashSet; 
    3638import java.util.Iterator; 
    3739import java.util.LinkedHashMap; 
    … …  
    4042 
    4143//Application-internal dependencies 
     44import org.jhotdraw.draw.AttributeKey; 
     45import org.jhotdraw.draw.BezierFigure; 
     46import org.jhotdraw.geom.BezierPath; 
    4247import org.openmicroscopy.shoola.util.math.geom2D.PlanePoint2D; 
    4348import org.openmicroscopy.shoola.util.roi.model.annotation.AnnotationKeys; 
    … …  
    9499        public MeasureBezierFigure() 
    95100        { 
    96                 super("Text"); 
     101                super("Text",false); 
    97102                c = true; 
    98103                shape = null; 
    … …  
    122127        public MeasureBezierFigure(String text) 
    123128        { 
    124                 super(text, true); 
     129                super(text, false); 
    125130                c = true; 
    126131                pointArrayX = new ArrayList<Double>(); 
    … …  
    176181                                bounds = g.getFontMetrics().getStringBounds(polygonLength, g); 
    177182                                 
    178                                 if(getPointCount() > 1) 
     183                                if(super.getNodeCount() > 1) 
    179184                                { 
    180                                         int midPoint = this.getPointCount()/2-1; 
     185                                        int midPoint = this.getNodeCount()/2-1; 
    181186                                        if(midPoint<0) 
    182187                                                midPoint = 0; 
    … …  
    394399                for (int i = 0 ; i < path.size(); i++) 
    395400                { 
    396                         pointArrayX.add(path.get(i).getControlPoint(0).getX()); 
    397401                        pointArrayY.add(path.get(i).getControlPoint(0).getY()); 
    398402                } 
    399403                AnnotationKeys.POINTARRAYX.set(shape, pointArrayX); 
    400404                AnnotationKeys.POINTARRAYY.set(shape, pointArrayY); 
    401                 if (isClosed()) 
     405                if (super.isClosed()) 
    402406                { 
    403407                        AnnotationKeys.AREA.set(shape,getArea()); 
    … …  
    420424        } 
    421425         
     426        public MeasureBezierFigure clone() 
     427        { 
     428                 
     429                MeasureBezierFigure that = (MeasureBezierFigure)super.clone(); 
     430                return that; 
     431        } 
     432         
    422433        /** 
    423434         * Implemented as specified by the {@link ROIFigure} interface. 

Download in other formats:

  • Unified Diff
  • Zip Archive

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/