Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.MarginBorder


    /* (non-Javadoc)
     * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
     */
    protected IFigure createFigure() {
        Figure f = new FreeformLayer();
        f.setBorder( new MarginBorder( 3 ) );
        f.setLayoutManager( new FreeformLayout() );
        return f;
    }
View Full Code Here


    /* (non-Javadoc)
     * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
     */
    protected IFigure createFigure() {
        Figure f = new FreeformLayer();
        f.setBorder( new MarginBorder( 3 ) );
        f.setLayoutManager( new FreeformLayout() );
        return f;
    }
View Full Code Here

    private void createOverview(Composite parent) {
        ScalableFreeformRootEditPart rootEditPart = (ScalableFreeformRootEditPart) editor.getGraphicalViewer().getRootEditPart();
        overview = new Canvas(parent, SWT.NONE);
        LightweightSystem lws = new LightweightSystem(overview);
        thumbnail = new ScrollableThumbnail((Viewport) rootEditPart.getFigure());
        thumbnail.setBorder(new MarginBorder(3));
        thumbnail.setSource(rootEditPart.getLayer(LayerConstants.PRINTABLE_LAYERS));
        lws.setContents(thumbnail);
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
     */
    protected IFigure createFigure() {
        Figure f = new FreeformLayer();
        f.setBorder( new MarginBorder( 3 ) );
        f.setLayoutManager( new FreeformLayout() );
        return f;
    }
View Full Code Here

  @Override
  protected IFigure createFigure() {
    Figure f = new MusicDiagramDrawableFreeformLayer(
        (MusicDiagram) getModel());
    f.setLayoutManager(new FreeformLayout());
    f.setBorder(new MarginBorder(10));   
    return f;
  }
View Full Code Here

     *
     * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
     */
    protected IFigure createFigure() {
        Figure f = new FreeformLayer();
        f.setBorder(new MarginBorder(3));
        f.setLayoutManager(new FreeformLayout());

        // Create the static router for the connection layer
        ConnectionLayer connLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
        connLayer.setConnectionRouter(new ShortestPathConnectionRouter(f));
View Full Code Here

  public TrayCategoryEntryFigure(IFigure labelPositionReference, TrayCategoryEntryEditPart part) {
    super();
    this.labelPositionReference = labelPositionReference;
    this.part = part;
    setLayoutManager(new EntryLayout());
    setBorder(new MarginBorder(BORDER) {
      public void paint(IFigure figure, Graphics graphics, Insets in) {
        Rectangle rect = figure.getBounds().getCopy();
        Color color = CommonUIPlugin.getDefault().getColorRegistry().get(IDetailsColors.COLOR_LIGHT_BACKGROUND);
        graphics.setForegroundColor(color);
        graphics.drawLine(rect.x, rect.y + rect.height - 1, rect.x + rect.width, rect.y + rect.height - 1);
View Full Code Here

      titleLayout.setHorizontal(true);
      titleLayout.setHorizontalSpacing(2);
      titleLayout.setVerticalAlignment(AlignedFlowLayout.ALIGN_CENTER);
      titleLayout.setHorizontalAlignment(AlignedFlowLayout.ALIGN_CENTER);
      setLayoutManager(titleLayout);
      setBorder(new MarginBorder(new Insets(3)));
    }
View Full Code Here

    setOpaque(true);
  }

  @Override
  protected Border createBorder() {
    MarginBorder marginBorder = new MarginBorder(PADDING - 1);
    LineBorder lineBorder = new LineBorder(1);
    lineBorder.setColor(ColorConstants.black);
    return new CompoundBorder(lineBorder, marginBorder);
  }
View Full Code Here

    public void createControl(Composite parent) {
        overview = new Canvas(parent, SWT.NONE);
        LightweightSystem lws = new LightweightSystem(overview);
        thumbnail = new ScrollableThumbnail((Viewport) rootEditPart.getFigure());
        thumbnail.setBorder(new MarginBorder(3));
        thumbnail.setSource(rootEditPart
                .getLayer(LayerConstants.PRINTABLE_LAYERS));
        lws.setContents(thumbnail);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.draw2d.MarginBorder

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.