Examples of Polyline


Examples of org.eclipse.graphiti.mm.algorithms.Polyline

  private void addLineToBox(ContainerShape containerShape) {
    // create shape for line
    Shape shape = Graphiti.getPeCreateService().createShape(
        containerShape, false);
    // create and set graphics algorithm
    Polyline polyline = Graphiti.getGaService().createPolyline(
        shape, new int[] { 0, 40, BOX_WIDTH, 40 });
    polyline.setStyle(StyleUtil.getStyleForPE(getDiagram()));
  }
View Full Code Here

Examples of org.eclipse.graphiti.mm.algorithms.Polyline

            if (containerWidth != size.getWidth()) {

                if (graphicsAlgorithm instanceof Polyline) {

                    Polyline polyline = (Polyline) graphicsAlgorithm;
                    Point secondPoint = polyline.getPoints().get(1);
                    Point newSecondPoint =
                        gaService.createPoint(containerWidth,
                            secondPoint.getY());
                    polyline.getPoints().set(1, newSecondPoint);
                    anythingChanged = true;

                } else if (graphicsAlgorithm instanceof Rectangle){
                 
                  Rectangle r = (Rectangle) graphicsAlgorithm;
View Full Code Here

Examples of org.eclipse.graphiti.mm.algorithms.Polyline

            .createFreeFormConnection(getDiagram());
        connection.setStart(addConContext.getSourceAnchor());
        connection.setEnd(addConContext.getTargetAnchor());

        IGaService gaService = Graphiti.getGaService();
        Polyline polyline = gaService.createPolyline(connection);
        polyline.setStyle(StyleUtil.getStyleForConn(getDiagram()));
        ConnectionDecorator cd = peCreateService.createConnectionDecorator(
            connection, false, 1.0, true);

        createArrow(cd);
View Full Code Here

Examples of org.eclipse.graphiti.mm.algorithms.Polyline

     * @return
     */
    private Polyline createArrow(GraphicsAlgorithmContainer gaContainer) {

      IGaService gaService = Graphiti.getGaService();
      Polyline polyline = gaService.createPolygon(
          gaContainer, new int[] { -9, 6, 0, 0, -9, -6 });
      polyline.setForeground(manageColor(IColorConstant.BLACK));
      polyline.setBackground(manageColor(IColorConstant.BLACK));
      polyline.setLineWidth(1);

      return polyline;
    }
View Full Code Here

Examples of org.freehep.graphicsio.emf.gdi.Polyline

    public EMFTagSet(int version) {
        if (version >= 1) {
            // Set for Windows 3
            addTag(new PolyBezier()); // 2 02
            addTag(new EMFPolygon()); // 3 03
            addTag(new Polyline()); // 4 04
            addTag(new PolyBezierTo()); // 5 05
            addTag(new PolylineTo()); // 6 06
            addTag(new PolyPolyline()); // 7 07
            addTag(new PolyPolygon()); // 8 08
            addTag(new SetWindowExtEx()); // 9 09
View Full Code Here

Examples of org.primefaces.model.map.Polyline

    MapModel model = map.getModel();
   
    writer.write(",polylines:[");
   
    for(Iterator<Polyline> lines = model.getPolylines().iterator(); lines.hasNext();) {
      Polyline polyline = (Polyline) lines.next();
     
      writer.write("new google.maps.Polyline({");
      writer.write("id:'" + polyline.getId() + "'");
     
      encodePaths(facesContext, polyline.getPaths());
     
      writer.write(",strokeOpacity:" + polyline.getStrokeOpacity());
      writer.write(",strokeWeight:" + polyline.getStrokeWeight());
     
      if(polyline.getStrokeColor() != null) writer.write(",strokeColor:'" + polyline.getStrokeColor() + "'");
     
      writer.write("})");
     
      if(lines.hasNext())
        writer.write(",");
View Full Code Here

Examples of org.primefaces.model.map.Polyline

    MapModel mapModel = new DefaultMapModel();
    List<Point> pointList = getPointsForTrip(trip);
    if (pointList.isEmpty()) {
      pointList = this.loadAndPersistGoogleData(trip);
    }
    Polyline polyline = new Polyline();
    polyline.getPaths().addAll(pointList);

    Marker beginMarker = new Marker(pointList.get(0), trip.getWaypoint()
        .getFromLocation().getCity());
    Marker endMarker = new Marker(pointList.get(pointList.size() - 1), trip
        .getWaypoint().getToLocation().getCity());

    polyline.setStrokeWeight(10);
    polyline.setStrokeColor("#FF9900");
    polyline.setStrokeOpacity(0.7);

    mapModel.addOverlay(beginMarker);
    mapModel.addOverlay(polyline);
    mapModel.addOverlay(endMarker);
    return mapModel;
View Full Code Here

Examples of org.primefaces.model.map.Polyline

    MapModel model = map.getModel();
   
    writer.write(",polylines:[");
   
    for(Iterator<Polyline> lines = model.getPolylines().iterator(); lines.hasNext();) {
      Polyline polyline = (Polyline) lines.next();
     
      writer.write("new google.maps.Polyline({");
      writer.write("id:'" + polyline.getId() + "'");
     
      encodePaths(context, polyline.getPaths());
     
      writer.write(",strokeOpacity:" + polyline.getStrokeOpacity());
      writer.write(",strokeWeight:" + polyline.getStrokeWeight());
     
      if(polyline.getStrokeColor() != null) writer.write(",strokeColor:'" + polyline.getStrokeColor() + "'");
      if(polyline.getZindex() > Integer.MIN_VALUE) writer.write(",zIndex:" + polyline.getZindex());

      writer.write("})");
     
      if(lines.hasNext())
        writer.write(",");
View Full Code Here

Examples of org.primefaces.model.map.Polyline

    MapModel model = map.getModel();
   
    writer.write(",polylines:[");
   
    for(Iterator<Polyline> lines = model.getPolylines().iterator(); lines.hasNext();) {
      Polyline polyline = (Polyline) lines.next();
     
      writer.write("new google.maps.Polyline({");
      writer.write("id:'" + polyline.getId() + "'");
     
      encodePaths(context, polyline.getPaths());
     
      writer.write(",strokeOpacity:" + polyline.getStrokeOpacity());
      writer.write(",strokeWeight:" + polyline.getStrokeWeight());
     
      if(polyline.getStrokeColor() != null) writer.write(",strokeColor:'" + polyline.getStrokeColor() + "'");
     
      writer.write("})");
     
      if(lines.hasNext())
        writer.write(",");
View Full Code Here

Examples of project.gluebooster.graphics.PolyLine

            result.getFirst().put((Vertex) keyRef, entry.getValue());
         } else if (EDGE.equals(key.getInternalInformation().getType()))
         {
            Pair<RectangularShape, PolyLine> pair = new Pair<RectangularShape, PolyLine>();
            pair.setFirst(entry.getValue());
            pair.setSecond(new PolyLine());
            result.getSecond().put((Edge) keyRef, pair);
         } else
            throw new IllegalStateException();
      }
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.