Package java.awt.geom

Examples of java.awt.geom.AffineTransform.transform()


                                        null);
       
        Point2D point1 = yaxis1.transform(new Point2D.Float((float)con.getMinimumColumnValue(),
                                                           con.getMaximumValue().floatValue()),
                                          null);
        Point2D point2 = yaxis1.transform(new Point2D.Float((float)con.getMaximumColumnValue(),
                                                             con.getMaximumValue().floatValue()),
                                          null);
        Point2D value = point1;
       
        int dataunitwidth = (int)((point2.getX() - point1.getX()) / con.getMaximumColumnValue());
View Full Code Here


                else
                    currentvalue = 0.0;
               
                if(currentvalue < 0.0) {
                    minvalue += currentvalue;
                    yaxis1.transform(new Point2D.Float((float)j, (float)minvalue),
                                     value);
                  
                    box =
                        new Rectangle2D.Float((float)(value.getX()),
                                              (float)Math.min(value.getY(), oldminvalue.getY()),
View Full Code Here

                                              (float)Math.abs(oldminvalue.getY() - value.getY()));
                    oldminvalue = (Point2D)value.clone();
                 }
                else {
                    maxvalue += currentvalue;
                    yaxis1.transform(new Point2D.Float((float)j, (float)maxvalue),
                                     value);
                   
                    box =
                        new Rectangle2D.Float((float)(value.getX()),
                                              (float)Math.min(value.getY(), oldmaxvalue.getY()),
View Full Code Here

        g.setFont(f);
        boolean paintLabels = c.isPaintLabels();
       
        for(double d = min; d <= max; d += tick) {
            p.setLocation(d, ypt);
            v = at.transform(p, null);
           
            ticks.setLine(v.getX(), v.getY() - marginOffset/2, v.getX(), v.getY() + marginOffset/2);
            g.draw(ticks);
            if(paint && paintLabels) {
                String sb = df.format(d);
View Full Code Here

        g.setFont(f);
       
        for(int i = min - 1; i < max; i++) {
            p.setLocation(i + 1, ypt);
           
            v = at.transform(p, null);
           
            ticks.setLine(v.getX(), v.getY() - marginOffset/2, v.getX(), v.getY() + marginOffset/2);
           
            if(i + 1 < max)
                g.draw(ticks);
View Full Code Here

        g.setFont(f);
        boolean paintLabels = c.isPaintLabels();
       
        for(double d = min; d <= max; d += tick) {
            p.setLocation(xpt, d);
            v = at.transform(p, null);
           
            ticks.setLine(v.getX() - marginOffset/2, v.getY(), v.getX() + marginOffset/2, v.getY());
           
      g.draw(ticks);
     
View Full Code Here

        else if(constraints.getMaximumValue().doubleValue() < 0)
            ypt = constraints.getMaximumValue().doubleValue();
       
        AffineTransform at = c.getTransform(CoordSystem.FIRST_YAXIS);
       
        Point2D l = at.transform(new Point2D.Double(constraints.getMinimumColumnValue(), ypt), null);
        Point2D r = at.transform(new Point2D.Double(constraints.getMaximumColumnValue(), ypt), null);
       
        return new Line2D.Double(l, r);
    }
   
View Full Code Here

            ypt = constraints.getMaximumValue().doubleValue();
       
        AffineTransform at = c.getTransform(CoordSystem.FIRST_YAXIS);
       
        Point2D l = at.transform(new Point2D.Double(constraints.getMinimumColumnValue(), ypt), null);
        Point2D r = at.transform(new Point2D.Double(constraints.getMaximumColumnValue(), ypt), null);
       
        return new Line2D.Double(l, r);
    }
   
    /** Computes the Line2D object of the y-axis using the DataConstraints.*/
 
View Full Code Here

        else if(constraints.getMaximumColumnValue() < 0 && c.getSecondYAxis() != null)
            xpt = constraints.getMaximumColumnValue();
       
        AffineTransform at = c.getTransform(CoordSystem.FIRST_YAXIS);
       
        Point2D o = at.transform(new Point2D.Double(xpt, constraints.getMaximumValue().doubleValue()), null);
        Point2D u = at.transform(new Point2D.Double(xpt, constraints.getMinimumValue().doubleValue()), null);
        //System.out.println("** Y-Axis ("+o+", "+u+")");
        return new Line2D.Double(o, u);
    }
   
View Full Code Here

            xpt = constraints.getMaximumColumnValue();
       
        AffineTransform at = c.getTransform(CoordSystem.FIRST_YAXIS);
       
        Point2D o = at.transform(new Point2D.Double(xpt, constraints.getMaximumValue().doubleValue()), null);
        Point2D u = at.transform(new Point2D.Double(xpt, constraints.getMinimumValue().doubleValue()), null);
        //System.out.println("** Y-Axis ("+o+", "+u+")");
        return new Line2D.Double(o, u);
    }
   
    /** Computes the Line2D object of the second y-axis using the DataConstraints.*/
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.