Package org.eclipse.draw2d.geometry

Examples of org.eclipse.draw2d.geometry.PointList


     */
    private RotatableDecoration createTargetDecoration() {
      PolylineDecoration df = new PolylineDecoration();
      df.setLocation(new Point(getMapMode().DPtoLP(-2), getMapMode()
          .DPtoLP(0)));
      PointList pl = new PointList();
      pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
      pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
      df.setTemplate(pl);
      df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
      return df;
    }
View Full Code Here


     */
    private RotatableDecoration createTargetDecoration() {
      PolylineDecoration df = new PolylineDecoration();
      df.setLocation(new Point(getMapMode().DPtoLP(-2), getMapMode()
          .DPtoLP(0)));
      PointList pl = new PointList();
      pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
      pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
      df.setTemplate(pl);
      df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
      return df;
    }
View Full Code Here

  * Paints the figure.
  * <!-- end-user-doc -->
  * @generated NOT
  */
  public void paintFigure(Graphics graphics) {
    PointList losango = new PointList();
    FontData fd[];
    fd = graphics.getFont().getFontData();
    fd[0].setHeight(fd[0].getHeight()/2);
    Font fonte = new Font(null, fd);
    graphics.pushState();
    setTemplate(template);
    losango = getPoints();
    graphics.drawPolygon(losango);
    if (updateFace()) {
      graphics.setBackgroundColor(new Color(null,0,0,0)); // RGB code of object color.
      graphics.fillPolygon(losango);
    }
    else {
      graphics.setBackgroundColor(new Color(null,255,255,255)); // RGB code of object color.
      graphics.fillPolygon(losango);
    }
    graphics.setFont(fonte);
    if(losango.getBounds().height > losango.getBounds().width)
      graphics.drawString("Q", losango.getBounds().x + losango.getBounds().width/4, losango.getBounds().y + losango.getBounds().height*3/8);
    else
      graphics.drawString("Q", losango.getBounds().x + losango.getBounds().width*3/8, losango.getBounds().y + losango.getBounds().height/4);
    graphics.popState();
  }
View Full Code Here

  * Paints the figure.
  * <!-- end-user-doc -->
  * @generated NOT
  */ 
  public void paintFigure(Graphics graphics) {
    PointList losango = new PointList();
    FontData fd[];
    fd = graphics.getFont().getFontData();
    fd[0].setHeight(fd[0].getHeight()/2);
    Font fonte = new Font(null, fd);
    graphics.pushState();
    setTemplate(template);
    losango = getPoints();
    graphics.drawPolygon(losango);
    if (updateFace()) {
      graphics.setBackgroundColor(new Color(null,0,0,0)); // RGB code of object color.
      graphics.fillPolygon(losango);
    }
    else {
      graphics.setBackgroundColor(new Color(null,255,255,255)); // RGB code of object color.
      graphics.fillPolygon(losango);
    }
    graphics.setFont(fonte);
    if(losango.getBounds().height > losango.getBounds().width)
      graphics.drawString("M", losango.getBounds().x + losango.getBounds().width/4, losango.getBounds().y + losango.getBounds().height*3/8);
    else
      graphics.drawString("M", losango.getBounds().x + losango.getBounds().width*3/8, losango.getBounds().y + losango.getBounds().height/4);
    graphics.popState();
  }
View Full Code Here

  * Paints the figure.
  * <!-- end-user-doc -->
  * @generated NOT
  */ 
  public void paintFigure(Graphics graphics) {
    PointList losango = new PointList();
    graphics.pushState();
    setTemplate(template);
    losango = getPoints();
    graphics.drawPolygon(losango);
    if (updateFace()) {
View Full Code Here

  * Paints the figure.
  * <!-- end-user-doc -->
  * @generated NOT
  */ 
  public void paintFigure(Graphics graphics) {
    PointList losango = new PointList();
    graphics.pushState();
    setTemplate(template);
    losango = getPoints();
    graphics.drawPolygon(losango);
    graphics.setBackgroundColor(new Color(null,255,255,255)); // RGB code of object color.
View Full Code Here

  * Paints the figure.
  * <!-- end-user-doc -->
  * @generated NOT
  */ 
  public void paintFigure(Graphics graphics) {
    PointList losango = new PointList();
    FontData fd[];
    fd = graphics.getFont().getFontData();
    fd[0].setHeight(fd[0].getHeight()/2);
    Font fonte = new Font(null, fd);
    graphics.pushState();
    setTemplate(template);
    losango = getPoints();
    graphics.drawPolygon(losango);
    if (updateFace()) {
      graphics.setBackgroundColor(new Color(null,0,0,0)); // RGB code of object color.
      graphics.fillPolygon(losango);
    }
    else {
      graphics.setBackgroundColor(new Color(null,255,255,255)); // RGB code of object color.
      graphics.fillPolygon(losango);
    }
    graphics.setFont(fonte);
    if(losango.getBounds().height > losango.getBounds().width)
      graphics.drawString("C", losango.getBounds().x + losango.getBounds().width/4, losango.getBounds().y + losango.getBounds().height*3/8);
    else
      graphics.drawString("C", losango.getBounds().x + losango.getBounds().width*3/8, losango.getBounds().y + losango.getBounds().height/4);
    graphics.popState();
  }
View Full Code Here

    protected void paintFigure(Graphics g) {
    super.paintFigure(g);

    Rectangle r = getClientArea();
   
    PointList points = new PointList();
    points.addPoint(r.x+20, r.y) ;
    points.addPoint(r.x + r.width - 20, r.y) ;
    points.addPoint(r.x + r.width - 20, r.y +r.height) ;
    points.addPoint(r.x+20 , r.y +r.height) ;

    g.setLineStyle(SWT.LINE_DOT);
       
    g.drawPolygon(points);
View Full Code Here

    protected void paintFigure(Graphics g) {
    super.paintFigure(g);

    Rectangle r = getClientArea();
   
    PointList points = new PointList();
    points.addPoint(r.x, r.y +r.height / 2-1) ;
    points.addPoint(r.x + r.width * 1/64, r.y +r.height*1/4) ;
    points.addPoint(r.x + r.width * 1/16, r.y+r.height*1/16) ;
    points.addPoint(r.x + r.width * 1/8, r.y) ;
    points.addPoint(r.x + r.width * 3/16, r.y) ;
    points.addPoint(r.x + r.width * 1/4, r.y +r.height *1/16) ;
    points.addPoint(r.x + r.width * 7/16, r.y +r.height * 1/8) ;
    points.addPoint(r.x + r.width * 1/2, r.y +r.height * 1/8) ;
    points.addPoint(r.x + r.width * 9/16, r.y +r.height * 1/8) ;
    points.addPoint(r.x + r.width * 3/4, r.y +r.height * 1/16) ;
    points.addPoint(r.x + r.width * 14/16, r.y) ;
    points.addPoint(r.x + r.width * 7/8, r.y) ;
    points.addPoint(r.x + r.width * 15/16, r.y+r.height*1/16) ;
    points.addPoint(r.x + r.width * 63/64, r.y +r.height*1/4) ;
    points.addPoint(r.x + r.width-1, r.y +r.height/2-1) ;
    points.addPoint(r.x + r.width * 63/64, r.y +r.height*3/4-1) ;
    points.addPoint(r.x + r.width * 15/16, r.y +r.height*15/16 -1 ) ;
    points.addPoint(r.x + r.width * 7/8, r.y +r.height-1 ) ;
    points.addPoint(r.x + r.width * 13/16, r.y +r.height-1 ) ;
    points.addPoint(r.x + r.width * 3/4, r.y +r.height * 15/16-1) ;
    points.addPoint(r.x + r.width * 9/16, r.y +r.height * 7/8-1) ;
    points.addPoint(r.x + r.width * 1/2, r.y +r.height * 7/8-1) ;
    points.addPoint(r.x + r.width * 7/16, r.y +r.height * 7/8-1) ;
    points.addPoint(r.x + r.width * 1/4, r.y +r.height *15/16-1) ;
    points.addPoint(r.x + r.width * 3/16, r.y +r.height-1) ;
    points.addPoint(r.x + r.width * 1/8, r.y +r.height-1) ;
    points.addPoint(r.x + r.width * 1/16, r.y +r.height*15/16-1) ;
    points.addPoint(r.x + r.width * 1/64, r.y +r.height*3/4-1) ;
    points.addPoint(r.x, r.y +r.height / 2-1) ;
   

    drawAndFillFigureBorder(g, points);


View Full Code Here

   */
  private static void drawDecompositionConnectionEnd(
      GraphConnection connection) {
    PolygonDecoration decoration = new PolygonDecoration();

    PointList decorationPointList = new PointList();
    decorationPointList.addPoint(0, 0);
    decorationPointList.addPoint(-1, 0);
    decorationPointList.addPoint(-1, -2);
    decorationPointList.addPoint(-1, +2);
    decorationPointList.addPoint(-1, 0);
    decoration.setTemplate(decorationPointList);

    ((PolylineConnection) connection.getConnectionFigure())
        .setTargetDecoration(decoration);

View Full Code Here

TOP

Related Classes of org.eclipse.draw2d.geometry.PointList

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.