Package java.awt

Examples of java.awt.Shape


    }

    final double y = area.getCenterY();

    final Stroke outlineStroke = getOutlineStroke();
    final Shape defaultShape = getDefaultShape();

    g2.setPaint(getFillPaint());
    for (int i = 0; i < values.length; i++)
    {
      final Number n = values[i];
      if (n == null)
      {
        continue;
      }

      final double v = n.doubleValue();
      final double x = valueToJava2D(v, area);
      Shape valueShape = getShape(i);
      if (valueShape == null)
      {
        valueShape = defaultShape;
      }
      if (isShapeFilled(i))
View Full Code Here


    helper.writeObject(borderPaint, out);
    final int size = shapes.size();
    out.writeInt(size);
    for (int i = 0; i < size; i++)
    {
      final Shape s = (Shape) shapes.get(i);
      helper.writeObject(s, out);
    }
  }
View Full Code Here

    shapes = new ArrayList();

    final int size = in.readInt();
    for (int i = 0; i < size; i++)
    {
      final Shape s = (Shape) helper.readObject(in);
      shapes.add(s);
    }

  }
View Full Code Here

      {
        processText(value, rawValue, parentRenderBox, element, stateKey);
      }
      else if (value instanceof Shape)
      {
        final Shape shape = (Shape) value;
        final ReportDrawable reportDrawable = new ShapeDrawable
            (shape, element.getStyle().getBooleanStyleProperty(ElementStyleKeys.KEEP_ASPECT_RATIO));
        final ProcessingContext processingContext = runtime.getProcessingContext();
        reportDrawable.setConfiguration(processingContext.getConfiguration());
        reportDrawable.setResourceBundleFactory(processingContext.getResourceBundleFactory());
View Full Code Here

     * Return true of current bounds covers the projection area.
     */
    public boolean isOnMap(Projection proj) {
        OMRect bds = getBounds();
        bds.generate(proj);
        Shape s = bds.getShape();
        return s.intersects(0, 0, proj.getWidth(), proj.getHeight());
    }
View Full Code Here

            if (DEBUG_SHAPE) {
                Debug.output("OMGraphicUtil.createShape3D():  adding shape...");
            }

            Shape shape = graphic.getShape();

            if (shape != null) {
                // Handle the shapes, depending on if they should
                // be filled or not...
View Full Code Here

                        _popup.show(this,e.getX(),e.getY());
                    }

                } else if (isMouseButton2(e)){

                    Shape selectedShape = _elementContainer.getSelection().getSelectedShapeAt(_selX,_selY);
                    if (selectedShape instanceof ContextualDrawingProvider && getContextualDrawing()==null) {
                        setContextualDrawing(((ContextualDrawingProvider)selectedShape).getContextualDrawing(_elementContainer.getSelection()));
                        getContextualDrawing().consumeMouseEvent(e);
                    }
View Full Code Here

                    return;
                }
            }

            if (isMouseButton2(e)) {
                Shape selectedShape = _elementContainer.getSelection().getSelectedShapeAt(_selX,_selY);
                if (selectedShape instanceof ContextualDrawingProvider && getContextualDrawing()==null) {
                    setContextualDrawing(((ContextualDrawingProvider)selectedShape).getContextualDrawing(_elementContainer.getSelection()));
                    getContextualDrawing().consumeMouseEvent(e);
                }
          
View Full Code Here

             if (_translatingPoint){
                 res = (ss instanceof ConnectionPathSelection) && ((ConnectionPathSelection)ss).isOneEndSelected();

             } else if (_translatingShapes){
                 Shape s = ss.element;
                 res = (s instanceof Connection) || (s instanceof GatedComponent) ;
             }
         }      
         return res;
     }
View Full Code Here

                if (gate != null){
                    _currentTrackedGates.add(new TrackedGate(connection, isFirstEndSelected, gate));
                }

            }  else if (_translatingShapes){
                Shape s = ss.element;

                // For each  connection ends, look up for a gate
                if (ss instanceof ConnectionPathSelection){
                    Connection connection = ((ConnectionPathSelection)ss).getConnection();
                    Path connectionPath = connection.getPath();
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.