Package org.eclipse.draw2d.geometry

Examples of org.eclipse.draw2d.geometry.Point


    /**
     * @generated
     */
    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);
View Full Code Here


    /**
     * @generated
     */
    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);
View Full Code Here

     */
    public void setPropertyValue(Object propertyId,
                                 Object value) {
        if ( XPOS_PROP.equals( propertyId ) ) {
            int x = Integer.parseInt( (String) value );
            setLocation( new Point( x,
                                    location.y ) );
        } else if ( YPOS_PROP.equals( propertyId ) ) {
            int y = Integer.parseInt( (String) value );
            setLocation( new Point( location.x,
                                    y ) );
        } else if ( HEIGHT_PROP.equals( propertyId ) ) {
            int height = Integer.parseInt( (String) value );
            setSize( new Dimension( size.width,
                                    height ) );
View Full Code Here

            double y = (row * (rowHeightPx * LayoutCalculator.ROW_HEIGHT_MULTIPLIER));

            x = x + (columnWidthPx / 2) - ((rowWidth - 1) * (columnWidthPx / 2));
            y = y + (rowHeightPx / 2) + 3;

            vertex.setLocation( new Point( x,
                                           y ) );
        }
View Full Code Here

        int minx = 0, miny = 0, maxx = 0, x = dim.width;

        final Iterator<BaseVertex> nodeIter = graph.getChildren().iterator();
        while ( nodeIter.hasNext() ) {
            Point loc = nodeIter.next().getLocation();
            minx = Math.min( loc.x,
                             minx );
            maxx = Math.max( loc.x,
                             maxx );
            miny = Math.min( loc.y,
                             miny );
        }

        int delta = (x - (maxx - minx + 20)) / 2;
        minx = minx - (delta);

        final Iterator<BaseVertex> nodeIter2 = graph.getChildren().iterator();
        while ( nodeIter2.hasNext() ) {
            final BaseVertex vertex = nodeIter2.next();
            Point loc = vertex.getLocation();
            vertex.setLocation( new Point( loc.x - minx,
                                           loc.y - miny ) );
        }
    }
View Full Code Here

  public void setLocationInLayout(double x, double y) {
    double oldX = this.x;
    this.x = x;
    double oldY = this.x;
    this.y = y;
    firePropertyChange(Properties.LOCATION.toString(), new Point(oldX, oldY), new Point(x, y));
  }
View Full Code Here

      refreshLayout();
    } else if (INode.Properties.SIZE.represents(evt)) {
      projectFigure.setSize((Dimension) evt.getNewValue());
      refreshLayout();
    } else if (INode.Properties.X.represents(evt)) {
      projectFigure.setLocation(new Point((Double) evt.getNewValue(), projectFigure.getLocation().y));
      refreshLayout();
    } else if (INode.Properties.Y.represents(evt)) {
      projectFigure.setLocation(new Point(projectFigure.getLocation().x, (Double) evt.getNewValue()));
      refreshLayout();
    } else if (INode.Properties.WIDTH.represents(evt)) {
      projectFigure.setSize(((Double) evt.getNewValue()).intValue(), projectFigure.getSize().width);
      refreshLayout();
    } else if (INode.Properties.HEIGHT.represents(evt)) {
View Full Code Here

        ((Box) getModel()).eAdapters().remove(this.listener);
    }
   
    protected void refreshVisuals() {
        Box scalebarBox = (Box) this.getModel();
        Point loc = scalebarBox.getLocation();
        Dimension size = scalebarBox.getSize();
        Rectangle rectangle = new Rectangle(loc, size);
       
        ((BoxFigure) getFigure()).setBox((Box) getModel());
       
View Full Code Here

     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public String getText(Object object) {
        Point labelValue = ((Element)object).getLocation();
        String label = labelValue == null ? null : labelValue.toString();
        return label == null || label.length() == 0 ?
            getString("_UI_Element_type") :
            getString("_UI_Element_type") + " " + label;
    }
View Full Code Here

     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public String getText(Object object) {
        Point labelValue = ((Connection)object).getLocation();
        String label = labelValue == null ? null : labelValue.toString();
        return label == null || label.length() == 0 ?
            getString("_UI_Connection_type") :
            getString("_UI_Connection_type") + " " + label;
    }
View Full Code Here

TOP

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

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.