Examples of Polyline


Examples of net.helipilot50.stocktrade.displayproject.controls.PolyLine

        l.setFocusable(false);
        l.setOpaque(false);
        return l;
    }
    public static PolyLine newPolyLine(int x, int y){
        PolyLine l = new PolyLine();
        l.setFocusable(false);
        l.setOpaque(false);
        l.setLocation(x, y);
        return l;
    }
View Full Code Here

Examples of nu.fw.jeti.plugins.drawing.shapes.Polyline

  /**
   * The polyline is drawn, memorized in the history and sent to
   * the other users.
   */
  public void mouseReleased(Double point, int scaleX, int scaleY) { 
    Shape shape = new Polyline(points, color, chat.getMyJID());
    chat.draw(shape);
    points.clear();
    board.setCurrentShape(null);
  }
View Full Code Here

Examples of nu.fw.jeti.plugins.drawing.shapes.Polyline

  public void mouseDragged(Double point) {
    points.add(point);
    if (board.getCurrentShape() != null) {
      (board.getCurrentShape()).setCoordinates(PointsOperations.pointsToString(points));
    } else {
      board.setCurrentShape(new Polyline(points, color, chat.getMyJID()));
    }
    board.repaint();
  }
View Full Code Here

Examples of org.eclipse.draw2d.Polyline

public class SVGPolylinePart extends ElementRecordPart {

  @Override
  protected IFigure createFigure() {
    Polyline figure = new Polyline();

    SVGPolylineRecord record = (SVGPolylineRecord) getElementRecord();
    figure.setPoints(record.getPoints().getCopy());

    XYLayout layout = new XYLayout();
    figure.setLayoutManager(layout);
    figure.setForegroundColor(new Color(null, 0, 0, 0));

    return figure;
  }
View Full Code Here

Examples of org.eclipse.draw2d.Polyline

    return figure;
  }

  @Override
  protected void refreshVisuals() {
    Polyline line = (Polyline) getFigure();
    SVGPolylineRecord record = (SVGPolylineRecord) getElementRecord();
    line.setPoints(record.getPoints());

    super.refreshVisuals();

    // hack because selection handle does not update
    if (getViewer().getSelectedEditParts().contains(this)
View Full Code Here

Examples of org.eclipse.draw2d.Polyline

        LOW_HEIGHT - 2 * inset));
    return ellipse;
  }

  private static Polyline getPencilIconFigure() {
    Polyline line = new Polyline();
    int[] rawPoints = { 11, 3, 6, 3, 6, 4, 3, 4, 3, 5, 2, 5, 1, 6, 1, 8, 2,
        8, 2, 9, 3, 9, 4, 9, 5, 8, 7, 8, 7, 7, 8, 7, 8, 6, 13, 6, 14,
        7, 14, 10, 13, 10, 13, 11, 9, 11, 9, 12, 7, 12 };
    PointList points = new PointList(rawPoints);
    line.setPoints(points);
    line.setForegroundColor(black);
    return line;
  }
View Full Code Here

Examples of org.eclipse.draw2d.Polyline

   * @return a polyline figure, already being initialized to the feedback
   *         layer
   */
  protected AbstractPointListShape getPolylineFeedback() {
    if (shape == null) {
      shape = new Polyline();
      shape.setForegroundColor(ColorConstants.black);
      addFeedback(shape);
    }
    return shape;
  }
View Full Code Here

Examples of org.eclipse.draw2d.Polyline

  /**
   * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
   */
  @Override
  protected IFigure createFigure() {
    final Polyline polyline = new Polyline();
    polyline.setForegroundColor(Display.getDefault().getSystemColor(SWT.COLOR_CYAN));
    polyline.setLineWidth(5);
    polyline.setLineStyle(SWT.LINE_SOLID);
    polyline.setBackgroundColor(Display.getDefault().getSystemColor(SWT.COLOR_RED));
    for (final MapNodeRef ref : ((MapObjectNodes) getModel()).getObject().getNodes()) {
      final MapNode node = ref.getNode();
      final Point p = getCoordinateSystem().toPoint(node.getPosition());
      polyline.addPoint(p);
    }
    polyline.setPreferredSize(polyline.getBounds().width, polyline.getBounds().height);
    return polyline;
  }
View Full Code Here

Examples of org.eclipse.draw2d.Polyline

      refreshVisuals();
    }
  }

  protected void refreshFigure() {
    final Polyline polyline = (Polyline) getFigure();
    polyline.removeAllPoints();
    for (final MapNodeRef ref : ((MapObjectNodes) getModel()).getObject().getNodes()) {
      final MapNode node = ref.getNode();
      final Point p = getCoordinateSystem().toPoint(node.getPosition());
      polyline.addPoint(p);
    }
    polyline.setPreferredSize(polyline.getBounds().width, polyline.getBounds().height);
  }
View Full Code Here

Examples of org.eclipse.draw2d.Polyline

      if (event instanceof MoveEvent) {
        _matched=true;
        Tortoise _tortoise = ((MoveEvent)event).getTortoise();
        boolean _isPaint = _tortoise.isPaint();
        if (_isPaint) {
          final Polyline line = new Polyline();
          Tortoise _tortoise_1 = ((MoveEvent)event).getTortoise();
          Color _lineColor = _tortoise_1.getLineColor();
          line.setForegroundColor(_lineColor);
          Tortoise _tortoise_2 = ((MoveEvent)event).getTortoise();
          int _lineWidth = _tortoise_2.getLineWidth();
          line.setLineWidth(_lineWidth);
          Point _oldPosition = ((MoveEvent)event).getOldPosition();
          Point _oldPosition_1 = ((MoveEvent)event).getOldPosition();
          line.setEndpoints(_oldPosition, _oldPosition_1);
          Point _oldPosition_2 = ((MoveEvent)event).getOldPosition();
          Tortoise _tortoise_3 = ((MoveEvent)event).getTortoise();
          Point _position = _tortoise_3.getPosition();
          Tortoise _tortoise_4 = ((MoveEvent)event).getTortoise();
          int _delay = _tortoise_4.getDelay();
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.