Package org.rascalmpl.library.vis.graphics

Examples of org.rascalmpl.library.vis.graphics.SWTGraphicsContext$Route


    int figureWidth = (int)Math.ceil(figure.size.getX());
    int figureHeight = (int)Math.ceil(figure.size.getY());
   
    Image image = new Image(getDisplay(), figureWidth, figureHeight);
    GC gc = new GC(image);
    SWTGraphicsContext swtGC = new SWTGraphicsContext();
    swtGC.setGC(gc);
   
    gc.setBackground(getDisplay().getSystemColor(SWT.COLOR_WHITE));

    figure.draw(new Coordinate(1.0, 1.0), swtGC, new Rectangle(0, 0, figureWidth, figureHeight), new SWTElementsVisibilityManager().getVisibleSWTElementsVector());
 
View Full Code Here


    }
    scrollBarsVisible = new TwoDimensional<Boolean>(false, false);
    scrollableMinSize = new BoundingBox(MIN_SIZE + scrollbarSize.getX(), MIN_SIZE+ scrollbarSize.getY());
    swtVisiblityMangager = new SWTElementsVisibilityManager();
    zorderManager = new SWTZOrderManager(parent,overlapFigures);
    gc = new SWTGraphicsContext();
    topLevel = new TransformMatrix();
    viewPortRectangle = new Rectangle(viewPortLocation, viewPortSize);
  }
View Full Code Here

        }
        return new NmnRoute(this, Route, route.getName(), positions);
    }

    public void read(InputStream source, CompactCalendar startDate, ParserContext<NmnRoute> context) throws Exception {
        Route route = unmarshal(source);
        context.appendRoute(process(route));
    }
View Full Code Here

        throw new UnsupportedOperationException();
    }

    private Route createNmn(NmnRoute route, int startIndex, int endIndex) {
        ObjectFactory objectFactory = new ObjectFactory();
        Route result = objectFactory.createRoute();
        result.setName(asRouteName(route.getName()));
        for (int i = startIndex; i < endIndex; i++) {
            NmnPosition position = route.getPosition(i);
            Route.Point point = objectFactory.createRoutePoint();
            point.setX(formatBigDecimal(position.getLongitude(), 7));
            point.setY(formatBigDecimal(position.getLatitude(), 7));
            point.setName(position.getDescription());
            result.getPoint().add(point);
        }
        return result;
    }
View Full Code Here

        }
        return marshaller;
    }

    public static Route unmarshal(InputStream in) throws JAXBException {
        Route result = null;
        try {
            result = (Route) newUnmarshaller().unmarshal(in);
        } catch (ClassCastException e) {
            throw new JAXBException("Parse error: " + e, e);
        }
View Full Code Here

TOP

Related Classes of org.rascalmpl.library.vis.graphics.SWTGraphicsContext$Route

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.