Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.XYLayout


   
//    private GraphLayoutManager graphLayoutManager;

    protected IFigure createFigure() {
        Figure f = new Figure();
        f.setLayoutManager(new XYLayout());
//        graphLayoutManager = new GraphLayoutManager(this);
//        f.setLayoutManager(graphLayoutManager);
//        graphLayoutManager.layout(f);
        return f;
    }
View Full Code Here


    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

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

    XYLayout layout = new XYLayout();
    figure.setLayoutManager(layout);
    figure.setForegroundColor(ColorConstants.black);

    Border line = new LineBorder(new Color(null, 0, 0, 0));
    figure.setBorder(line);
View Full Code Here

  @Override
  protected IFigure createFigure() {
    // TODO provide custom Ellipse with elliptical border
    IFigure figure = new Ellipse();

    XYLayout layout = new XYLayout();
    figure.setLayoutManager(layout);
    figure.setForegroundColor(ColorConstants.black);

    return figure;
  }
View Full Code Here

    image.dispose();

    final ImageFigure fig = new ImageFigure(img);
    final Rectangle bounds = img.getBounds();
    fig.setBounds(new org.eclipse.draw2d.geometry.Rectangle(bounds));
    fig.setLayoutManager(new XYLayout());
    fig.setAlignment(PositionConstants.NORTH | PositionConstants.WEST);
    return fig;
  }
View Full Code Here

    final LayeredPane tmp = super.createPrintableLayers();
    // tmp.setPreferredSize(1800, 1800);
    int z = 0;
    for (final String l : MapEditor.LAYERS) {
      final Layer layer = new Layer();
      layer.setLayoutManager(new XYLayout());
      final Label lab = new Label(l);
      lab.setLocation(new Point(10, 10 + z * 20));
      lab.setSize(100, 20);
      layer.add(lab);
      tmp.add(layer, l, 0);
View Full Code Here

    final ScannedMap m = (ScannedMap) getModel();
    final Image image = new Image(Display.getDefault(), m.getFileName());
    final ImageFigure fig = new ImageFigure(image);
    final Rectangle bounds = image.getBounds();
    fig.setBounds(new org.eclipse.draw2d.geometry.Rectangle(bounds));
    fig.setLayoutManager(new XYLayout());
    fig.setAlignment(PositionConstants.NORTH | PositionConstants.WEST);
    if (m.getUpperleft().equals(m.getUpperright()) && m.getUpperleft().equals(m.getLowerleft())) {
      m.setUpperleft(new Point(25, 25));
      m.setUpperright(new Point(bounds.width - 25, 25));
      m.setLowerleft(new Point(25, bounds.height - 25));
View Full Code Here

    final CoordinateSystem cs = getCoordinateSystem();
    final Point p = cs.toPoint(obj.getCenter().getNode().getPosition());
    bounds.x = p.x - bounds.width / 2;
    bounds.y = p.y - bounds.height / 2;
    fig.setBounds(new org.eclipse.draw2d.geometry.Rectangle(bounds));
    fig.setLayoutManager(new XYLayout());
    return fig;
  }
View Full Code Here

    /**
     * @generated
     */
    public NeuronTypeFigure() {
      this.setLayoutManager(new XYLayout());
      this.setLineWidth(3);
      this.setForegroundColor(THIS_FORE);
      this.setBackgroundColor(THIS_BACK);
      this.setPreferredSize(new Dimension(getMapMode().DPtoLP(100),
          getMapMode().DPtoLP(100)));
View Full Code Here

    /**
     * @generated
     */
    public NeuralInputsTypeFigure() {
      this.setLayoutManager(new XYLayout());
      this.setCornerDimensions(new Dimension(getMapMode().DPtoLP(0),
          getMapMode().DPtoLP(0)));
      this.setOutline(false);
      this.setLineWidth(0);
      this.setBackgroundColor(THIS_BACK);
View Full Code Here

TOP

Related Classes of org.eclipse.draw2d.XYLayout

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.