Examples of Shape


Examples of java.awt.Shape

    }

    final Rectangle2D b = this.shape.getBounds2D();
    double x = area.getMinX() + b.getWidth() / 2.0 + 1.0;
    final double y = area.getCenterY();
    final Shape s = getShape();
    g2.translate(x, y);
    g2.setPaint(Color.black);
    if (this.draw)
    {
      g2.setStroke(new BasicStroke(0.5f));
View Full Code Here

Examples of java.awt.Shape

    if (rawbackend instanceof ShapeDrawable == false)
    {
      return;
    }
    final ShapeDrawable drawable = (ShapeDrawable) rawbackend;
    final Shape shape = drawable.getShape();

    final StyleSheet styleSheet = node.getStyleSheet();
    final boolean draw = styleSheet.getBooleanStyleProperty(ElementStyleKeys.DRAW_SHAPE);
    if (draw && shape instanceof Line2D)
    {
View Full Code Here

Examples of java.awt.Shape

        contentHeight = StrictGeomUtility.toInternalValue(preferredSize.getHeight());
      }
    }
    else if (content instanceof Shape)
    {
      final Shape s = (Shape) content;
      final Rectangle2D bounds2D = s.getBounds2D();
      contentWidth = StrictGeomUtility.toInternalValue(bounds2D.getWidth());
      contentHeight = StrictGeomUtility.toInternalValue(bounds2D.getHeight());
    }
  }
View Full Code Here

Examples of java.awt.Shape

        return result;
      }

      int series = 0;
      final Iterator iterator = keys.iterator();
      final Shape shape = getLegendItemShape();
      while (iterator.hasNext())
      {
        final Comparable key = (Comparable) iterator.next();
        if (key instanceof GridCategoryItem)
        {
View Full Code Here

Examples of java.awt.Shape

        if ( (pass == 1) && !isItemLabelVisible(row, column) )  {
          return;
        }

        // setup for collecting optional entity info...
        Shape entityArea = null;
        final EntityCollection entities = state.getEntityCollection();

        double y1 = 0.0;
        Number n = dataset.getValue(row, column);
        if (n != null) {
View Full Code Here

Examples of java.awt.Shape

      if (sampleValue != null)
      {
        Graphics2D g2d = (Graphics2D) g;
        Stroke origStroke = g2d.getStroke();
        Color origColor = g2d.getColor();
        Shape origClip = g2d.getClip();

        g2d.setStroke(sampleValue);

        g2d.drawLine(getInsets().left + 1, (getHeight() / 2) + 1, getWidth() - (getInsets().right + 1), (getHeight() / 2) + 1);
View Full Code Here

Examples of java.awt.Shape

            if (currentEditable != null) {

                currentEditable.getStateMachine().setSelected();
                currentEditable.redraw(me, true);

                Shape ces = currentEditable.getGraphic().getShape();
                if (ces != null) {
                    Rectangle rect = ces.getBounds();
                    windowx = (int) rect.getX();
                    windowy = (int) rect.getY() - 50;
                }
            }
View Full Code Here

Examples of java.awt.Shape

    }

    public boolean isOnMap(Projection proj) {
        generate(proj); // Should only generate if needed...

        Shape shape = getShape();
        if (shape == null) {
            return false;
        }

        Point p1 = proj.forward(proj.getUpperLeft());
        Point p2 = proj.forward(proj.getLowerRight());
        int h = (int) (p2.getY() - p1.getY());
        int w = (int) (p2.getX() - p1.getX());

        Rectangle mapRect = new Rectangle((int) p1.getX(), (int) p1.getY(), w, h);

        return mapRect.intersects(shape.getBounds());
    }
View Full Code Here

Examples of java.awt.Shape

     * Called from the OMGrid.generate() method to tell the generator
     * to create something to represent the grid contents.
     */
    public OMGraphic generate(OMGrid grid, Projection proj) {

        Shape gridShape = grid.getShape();

        // Don't generate the raster if the grid is off-map...
        if (gridShape == null
                || !gridShape.intersects(0,
                        0,
                        proj.getWidth(),
                        proj.getHeight())) {
            if (Debug.debugging("grid")) {
                Debug.output("SlopeGenerator: OMGrid does not overlap map, skipping generation.");
View Full Code Here

Examples of java.awt.Shape

            float transx = (float) x1;
            float transy = (float) y1;
            float x = transx - fwidth / 2f;
            float y = transy - fheight / 2f;

            Shape arcShape = createArcShape(x, y, fwidth, fheight);

            if (rotationAngle != DEFAULT_ROTATIONANGLE) {
                af = new AffineTransform();
                af.rotate(rotationAngle, transx, transy);
            }
            pi = arcShape.getPathIterator(af);
            gp = new GeneralPath();
            gp.append(pi, false);
            // In X/Y or Offset RenderType, there is only one shape.
            setShape(gp);
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.