Package org.eclipse.draw2d.geometry

Examples of org.eclipse.draw2d.geometry.Point


    return super.getAdapter(key);
  }

  protected void refreshVisuals() {
        Box labelBox = (Box) this.getModel();
        Point loc = labelBox.getLocation();
        Dimension size = labelBox.getSize();
        Rectangle rectangle = new Rectangle(loc, size);

        ((BoxFigure) this.getFigure()).setBox((Box) this.getModel());
View Full Code Here


    }

    protected void refreshVisuals() {
        Page page = getModel();

        Point loc = new Point(0, 0);
        Dimension size = page.getSize();
        Rectangle rectangle = new Rectangle(loc, size);

        // this should trigger all the resize in PageImpl
        IFigure fig = getFigure();
View Full Code Here

       
        mapBox.setSize(new Dimension(400, 400));
        imageBox.setSize(new Dimension(200, 162));
        labelBox.setSize(new Dimension(150, 30));
       
        imageBox.setLocation(new Point(43, 10));
        mapBox.setLocation(new Point(143, 210));
        labelBox.setLocation(new Point(100, 612));
       
        LabelBoxPrinter lbPrinter = new LabelBoxPrinter();
        MapBoxPrinter mbPrinter = new MapBoxPrinter();
        ImageBoxPrinter ibPrinter = new ImageBoxPrinter();
       
View Full Code Here

     *
     * @generated NOT
     */
    public Point createPointFromString( EDataType eDataType, String initialValue ) {
        String[] parts = initialValue.split(","); //$NON-NLS-1$
        Point point;
        try {
            point = new Point(Integer.parseInt(parts[0].trim()), Integer.parseInt(parts[1].trim()));
        } catch (Exception e) {
            PrintingModelPlugin.log("", e); //$NON-NLS-1$
            point = new Point(0, 0);
        }
        return point;
    }
View Full Code Here

     * <!-- begin-user-doc --> <!-- end-user-doc -->
     *
     * @generated NOT
     */
    public String convertPointToString( EDataType eDataType, Object instanceValue ) {
        Point point = (Point) instanceValue;
        return point.x + "," + point.y; //$NON-NLS-1$
    }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setLocation(Point newLocation) {
        Point oldLocation = location;
        location = newLocation;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.ELEMENT__LOCATION, oldLocation, location));
    }
View Full Code Here

        Box scaleBox = ModelFactory.eINSTANCE.createBox();
        MapGraphicBoxPrinter scale = new MapGraphicBoxPrinter(null);
        scale.setMapGraphic(MapGraphicChooserDialog.findResource(ScalebarMapGraphic.class));
        scaleBox.setBoxPrinter(scale);
        scaleBox.setID("Scalebar Box"); //$NON-NLS-1$
        scaleBox.setLocation(new Point(MARGIN, height - MARGIN - scaleHeight));
        scaleBox.setSize(new Dimension(scaleWidth, scaleHeight));
        boxes.add(scaleBox);
    }
View Full Code Here

        labelBox.setBoxPrinter(labelBoxPrinter);
        labelBox.setID("Standard Label"); //$NON-NLS-1$
        // TODO base it on the font
        int labelHeight = 30+LabelBoxPrinter.INSET*2;
        labelBox.setSize(new Dimension(labelWidth, labelHeight));
        labelBox.setLocation(new Point((width - labelWidth) / 2, MARGIN));
        boxes.add(labelBox);
        return labelHeight;
    }
View Full Code Here

                mapY,
                mapWidth,
                mapHeight);
        mapBox.setSize(new Dimension(mapBounds.width, mapBounds.height));

        mapBox.setLocation(new Point(mapBounds.x, mapBounds.y));
        boxes.add(mapBox);
        return mapBounds;
    }
View Full Code Here

        Box legendBox = ModelFactory.eINSTANCE.createBox();
        MapGraphicBoxPrinter legend = new MapGraphicBoxPrinter(null);
        legend.setMapGraphic(MapGraphicChooserDialog.findResource(LegendGraphic.class));
        legendBox.setBoxPrinter(legend);
        legendBox.setID("Legend Box"); //$NON-NLS-1$
        legendBox.setLocation(new Point(MARGIN + mapBounds.width + SPACING, MARGIN+labelHeight+MARGIN));
        legendBox.setSize(new Dimension(legendWidth, legendHeight));
        boxes.add(legendBox);
    }
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.