Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.LayeredPane


      super.addChildVisual(childEditPart, index);
  }

  @Override
  protected org.eclipse.draw2d.LayeredPane createPrintableLayers() {
    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);
      z++;
    }
    return tmp;
  }
View Full Code Here


   * @param figure The figure to be decorated
   * @return the created figure.
   */
 
  public IFigure createFigure(IFigure figure) {
    LayeredPane pane = new LayeredPane();
    Layer layer = new Layer();
    if (figureLayout == null) {
        if (fillParent) {
            figureLayout = new FillParentLayout();
        } else {
        figureLayout = new AlignedFlowLayout() {
         
          @Override
          protected void setBoundsOfChild(IFigure parent,  IFigure child,  Rectangle bounds) {
            parent.getClientArea(Rectangle.SINGLETON);
            bounds.translate(Rectangle.SINGLETON.x, Rectangle.SINGLETON.y);
            if (resizeChildren)
              child.setBounds(bounds);
            else
              child.setLocation(bounds.getLocation());
          }
        };
        }
    }
    layer.setLayoutManager(figureLayout);
    pane.add(layer);
    layer.add(figure);
    if (decorationLayer == null) {
      decorationLayer = new Layer();
    }
    decorationLayer.setLayoutManager(decorationLayout);
   
    pane.add(decorationLayer);
   
    return pane;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.draw2d.LayeredPane

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.