Package org.locationtech.udig.ui.graphics

Examples of org.locationtech.udig.ui.graphics.ViewportGraphics.fillOval()


        for( Node node : waypoints ){
            Point point = (Point) node.getObject();
            java.awt.Point pixel = context.worldToPixel( point.getCoordinate() );
           
            graphics.setColor( Color.YELLOW );               
            graphics.fillOval(pixel.x-3, pixel.y-3, 7, 7 );

            graphics.setColor( Color.BLACK );
            graphics.drawOval(pixel.x-3, pixel.y-3, 7, 7 );
        }
    }
View Full Code Here


      final int halfsize = EXTENT_SIZE / 2;

      this.extent = new Rectangle((int) (point.getX() - halfsize), (int) (point.getY() - halfsize), EXTENT_SIZE,
            EXTENT_SIZE);

      graphics.fillOval(extent.x, extent.y, extent.width, extent.height);
      Rectangle2D stringBounds = graphics.getStringBounds(String.valueOf(getMarkModel().getID()));
      graphics.drawString(String.valueOf(getMarkModel().getID()), (int) point.getX(),
            (int) (point.getY() + stringBounds.getHeight()), ViewportGraphics.ALIGN_MIDDLE,
            ViewportGraphics.ALIGN_BOTTOM);
    }
View Full Code Here

            EXTENT_SIZE);

      if (this.feedback) {
        Color yellow = Color.YELLOW;
        graphics.setColor(yellow);       
        graphics.fillOval(extent.x , extent.y, extent.width, extent.height);
        Color orange = Color.ORANGE;
        graphics.setColor(orange);
        graphics.drawOval(extent.x, extent.y, extent.width, extent.height);
        // set back to his default color
        graphics.setColor(createColor(mark.hashCode()));
View Full Code Here

        graphics.setColor(orange);
        graphics.drawOval(extent.x, extent.y, extent.width, extent.height);
        // set back to his default color
        graphics.setColor(createColor(mark.hashCode()));
      } else {
        graphics.fillOval(extent.x, extent.y, extent.width, extent.height);
      }

      Rectangle2D stringBounds = graphics.getStringBounds(String.valueOf(mark.getID()));
      graphics.drawString(String.valueOf(mark.getID()), (int) point.getX(),
            (int) (point.getY() + stringBounds.getHeight()), ViewportGraphics.ALIGN_MIDDLE,
View Full Code Here

        } catch (TransformException e) {
            throw (RuntimeException) new RuntimeException( ).initCause( e );
        }               
             
        java.awt.Point p = context.worldToPixel(worldLocation);
        g.fillOval(p.x, p.y, 10, 10);
        String name = getDisplayName().toString();
        g.drawString(name, p.x + 15, p.y + 15,
                ViewportGraphics.ALIGN_MIDDLE, ViewportGraphics.ALIGN_MIDDLE);

        // draw an ellipse for this seagull
View Full Code Here

        graphics.fillRect(0,
                0,
                EDGE_WIDTH*2,
                EDGE_WIDTH*2);
        graphics.setColor(Color.black);
        graphics.fillOval(EDGE_WIDTH/2+1, EDGE_WIDTH/2+1, EDGE_WIDTH, EDGE_WIDTH);
        graphics.drawRect(0,
                0,
                EDGE_WIDTH*2,
                EDGE_WIDTH*2);
       
View Full Code Here

        graphics.fillRect(0,
                0,
                EDGE_WIDTH*2,
                EDGE_WIDTH*2);
        graphics.setColor(Color.black);
        graphics.fillOval(EDGE_WIDTH/2+1, EDGE_WIDTH/2+1, EDGE_WIDTH, EDGE_WIDTH);
        graphics.drawRect(0,
                0,
                EDGE_WIDTH*2,
                EDGE_WIDTH*2);
       
View Full Code Here

        graphics.fillRect(0,
                0,
                EDGE_WIDTH*2,
                EDGE_WIDTH*2);
        graphics.setColor(Color.black);
        graphics.fillOval(EDGE_WIDTH/2+1, EDGE_WIDTH/2+1, EDGE_WIDTH, EDGE_WIDTH);
        graphics.drawRect(0,
                0,
                EDGE_WIDTH*2,
                EDGE_WIDTH*2);
       
View Full Code Here

                0,
                EDGE_WIDTH*2,
                EDGE_WIDTH*2);
        graphics.setColor(Color.black);
        graphics.drawOval(EDGE_WIDTH/4, EDGE_WIDTH/4, EDGE_WIDTH*2 - EDGE_WIDTH/2, EDGE_WIDTH*2 - EDGE_WIDTH/2);
        graphics.fillOval(EDGE_WIDTH - 1, EDGE_WIDTH - 1, 2, 2);
        graphics.drawRect(0,
                0,
                EDGE_WIDTH*2,
                EDGE_WIDTH*2);
        graphics.setTransform(origTrans);
View Full Code Here

            }
            Object obj = node.getObject();
            if( obj instanceof Point ){
                Point point = (Point) obj;
                java.awt.Point pixel = context.worldToPixel( point.getCoordinate() );
                graphics.fillOval(pixel.x-2, pixel.y-2, 5, 5 );
            }
            if( waypoints.contains(node)){
                graphics.setColor( Color.LIGHT_GRAY );                               
            }
        }
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.