Package org.locationtech.udig.ui.graphics

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


                graphics.drawLine(pixel.x,
                                  0,
                                  pixel.x,
                                  mapPixelHeight - BOTTOM_STRIP_HEIGHT + GRID_LINE_EXTENSION);
                if (showLabels) {
                    graphics.drawString( String.valueOf( (int) coord.y ),
                                    pixel.x,
                                    mapPixelHeight - BOTTOM_STRIP_HEIGHT + GRID_LINE_EXTENSION,
                                    ViewportGraphics.ALIGN_MIDDLE,
                                    ViewportGraphics.ALIGN_TOP);
                }
View Full Code Here


                graphics.drawLine(0,
                                  pixel.y,
                                  mapPixelWidth - RIGHT_STRIP_WIDTH + GRID_LINE_EXTENSION,
                                  pixel.y);
                if (showLabels) {
                    graphics.drawString( String.valueOf( (int)coord.x) ,
                                    mapPixelWidth - RIGHT_STRIP_WIDTH + GRID_LINE_EXTENSION,
                                    pixel.y,
                                    ViewportGraphics.ALIGN_LEFT,
                                    ViewportGraphics.ALIGN_MIDDLE);
                }
View Full Code Here

                graphics.drawLine(pixel.x,
                                  0,
                                  pixel.x,
                                  mapPixelHeight - BOTTOM_STRIP_HEIGHT + GRID_LINE_EXTENSION);
                if (showLabels) {
                    graphics.drawString((int)(coord.y)+"",
                                    pixel.x,
                                    mapPixelHeight - BOTTOM_STRIP_HEIGHT + GRID_LINE_EXTENSION,
                                    ViewportGraphics.ALIGN_MIDDLE,
                                    ViewportGraphics.ALIGN_TOP);
                }
View Full Code Here

                graphics.drawLine(0,
                                  pixel.y,
                                  mapPixelWidth - RIGHT_STRIP_WIDTH + GRID_LINE_EXTENSION,
                                  pixel.y);
                if (showLabels) {
                    graphics.drawString((int)(coord.x)+"",
                                    mapPixelWidth - RIGHT_STRIP_WIDTH + GRID_LINE_EXTENSION,
                                    pixel.y,
                                    ViewportGraphics.ALIGN_LEFT,
                                    ViewportGraphics.ALIGN_MIDDLE);
                }
View Full Code Here

        int yText = y + (height - barWidth) - 4;
        int xText = x + (int) (width * 0.5) - (int) (msgBounds.getWidth() * 0.5);

        // Draw the string denoting kilometres (or metres)
        graphics.setColor(c);
        graphics.drawString(msg, xText, yText, ViewportGraphics.ALIGN_LEFT,
                ViewportGraphics.ALIGN_BOTTOM);
    }

    /**
     * draws the interval labels
View Full Code Here

                    File mapsetFile = windFile.getParentFile();
                    StringBuilder sb = new StringBuilder();
                    sb.append(mapsetFile.getParentFile().getName());
                    sb.append("/");
                    sb.append(mapsetFile.getName());
                    g.drawString(sb.toString(), 10, 10,
                            ViewportGraphics.ALIGN_LEFT, ViewportGraphics.ALIGN_MIDDLE);
                }
            }

        } catch (Exception e) {
View Full Code Here

                double x = xCoords.get(xCoords.size() - 1).doubleValue();
                Point pixel = context.worldToPixel(new Coordinate(x,y));
                //line is covered by white overlay
                if (pixel.y > mapPixelHeight - BOTTOM_STRIP_HEIGHT)
                    break;
                 graphics.drawString((int)(y)+"",
                                mapPixelWidth - RIGHT_STRIP_WIDTH + GRID_LINE_EXTENSION,
                                pixel.y,
                                ViewportGraphics.ALIGN_LEFT,
                                ViewportGraphics.ALIGN_MIDDLE);
            }
View Full Code Here

                double y = yCoords.get(yCoords.size() - 1).doubleValue();
                Point pixel = context.worldToPixel(new Coordinate(x,y));
                //line is covered by white overlay
                if (pixel.x > mapPixelWidth - RIGHT_STRIP_WIDTH)
                    break;
                graphics.drawString((int)(x)+"",
                                pixel.x,
                                mapPixelHeight - BOTTOM_STRIP_HEIGHT + GRID_LINE_EXTENSION,
                                ViewportGraphics.ALIGN_MIDDLE,
                                ViewportGraphics.ALIGN_TOP);
            }
View Full Code Here

                graphics.drawLine(pixel.x,
                                  0,
                                  pixel.x,
                                  mapPixelHeight - BOTTOM_STRIP_HEIGHT + GRID_LINE_EXTENSION);
                if (showLabels) {
                    graphics.drawString((int)(coord.y)+"",
                                    pixel.x,
                                    mapPixelHeight - BOTTOM_STRIP_HEIGHT + GRID_LINE_EXTENSION,
                                    ViewportGraphics.ALIGN_MIDDLE,
                                    ViewportGraphics.ALIGN_TOP);
                }
View Full Code Here

                graphics.drawLine(0,
                                  pixel.y,
                                  mapPixelWidth - RIGHT_STRIP_WIDTH + GRID_LINE_EXTENSION,
                                  pixel.y);
                if (showLabels) {
                    graphics.drawString((int)(coord.x)+"",
                                    mapPixelWidth - RIGHT_STRIP_WIDTH + GRID_LINE_EXTENSION,
                                    pixel.y,
                                    ViewportGraphics.ALIGN_LEFT,
                                    ViewportGraphics.ALIGN_MIDDLE);
                }
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.