Package java.awt

Examples of java.awt.Shape


        // stroke
        g.setStroke(stroke);
        Color c = getDrawColor();
        if (c != null) {
            g.setColor(c);
            Shape s = getDelegateShape();
            if (s != null) {
                g.draw(s);
            }
        }
        drawHook(g, true);
View Full Code Here


                double pxmin=0, pxmax=0, sxmin=0, sxmax=0;

                // Get current selected plot  X range  
                Plot firstPlot = null;
                for (int i = 0; i < sel.getShapeCount() && firstPlot == null; i++) {
                    Shape s = sel.getShape(i);
                    if ((s.contains(x,y)) && (s instanceof Plot) ){
                        firstPlot = (Plot)s;
                    }
                }

                if (firstPlot == null) {
View Full Code Here

   * doesn't need to care.
     * @param g the Graphics2D object in which to render
     */
    public void render(Graphics2D g) {
    Rectangle bounds = getBounds();
    Shape clip = g.getClip();
    g.setClip((int)bounds.getX(), (int)bounds.getY(), (int)bounds.getWidth(), (int)bounds.getHeight());
    renderChart(g);
    g.setClip(clip);
  }
View Full Code Here

  }
 
 
  protected Shape createAWTShape()
  {
    Shape awtShape;
    switch (shape)
    {
      case SHAPE_RECTANGLE:
        awtShape = createAWTRectangle();
        break;
View Full Code Here

     *   is less than 0 or greater than or equal to the number
     *   of glyphs in this <code>GlyphVector</code>
     * @since 1.4
     */
    public Shape getGlyphOutline(int glyphIndex, float x, float y) {
  Shape s = getGlyphOutline(glyphIndex);
  AffineTransform at = AffineTransform.getTranslateInstance(x,y);
  return at.createTransformedShape(s);
  }
View Full Code Here

        TextHitInfo hit = TextHitInfo.afterOffset(offset);

        int hitCaret = hitToCaret(hit);

        LayoutPathImpl lp = textLine.getLayoutPath();
        Shape hitShape = pathToShape(getCaretPath(hit, bounds), false, lp);
        TextHitInfo otherHit = hit.getOtherHit();
        int otherCaret = hitToCaret(otherHit);

        if (hitCaret == otherCaret) {
            result[0] = hitShape;
        }
        else { // more than one caret
            Shape otherShape = pathToShape(getCaretPath(otherHit, bounds), false, lp);

            TextHitInfo strongHit = policy.getStrongCaret(hit, otherHit, this);
            boolean hitIsStrong = strongHit.equals(hit);

            if (hitIsStrong) {// then other is weak
View Full Code Here

     * @return a <code>Shape</code> that is the outline of this
     *     <code>TextLayout</code>.  This is in standard coordinates.
     */
    public Shape getOutline(AffineTransform tx) {
        ensureCache();
        Shape result = textLine.getOutline(tx);
        LayoutPathImpl lp = textLine.getLayoutPath();
        if (lp != null) {
            result = lp.mapShape(result);
        }
        return result;
View Full Code Here

     * @return a <code>Shape</code> representing this graphic attribute,
     *   suitable for stroking or filling.
     * @since 1.6
     */
    public Shape getOutline(AffineTransform tx) {
        Shape b = getBounds();
        if (tx != null) {
            b = tx.createTransformedShape(b);
        }
        return b;
    }
View Full Code Here

    grx.transform(atrans);

    java.util.List pages = jasperPrint.getPages();
    if (pages != null)
    {
      Shape oldClipShape = grx.getClip();
 
      grx.clip(new Rectangle(0, 0, jasperPrint.getPageWidth(), jasperPrint.getPageHeight()));
 
      try
      {
View Full Code Here

        case CLIP :
        {
          int xoffset = (int)(xalignFactor * (availableImageWidth - normalWidth));
          int yoffset = (int)(yalignFactor * (availableImageHeight - normalHeight));

          Shape oldClipShape = grx.getClip();

          grx.clip(
            new Rectangle(
              printImage.getX() + leftPadding + offsetX,
              printImage.getY() + topPadding + offsetY,
View Full Code Here

TOP

Related Classes of java.awt.Shape

Copyright © 2018 www.massapicom. 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.