Examples of MarginBorder


Examples of org.eclipse.draw2d.MarginBorder

  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

Examples of org.eclipse.draw2d.MarginBorder

      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

Examples of org.eclipse.draw2d.MarginBorder

    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

Examples of org.eclipse.draw2d.MarginBorder

    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

Examples of org.eclipse.draw2d.MarginBorder

 
  @Override
  public void render()
  {
    Figure f = new FreeformLayer();
    f.setBorder(new MarginBorder(3));
    f.setLayoutManager(new FreeformLayout());
    setFigure(f);   
  }
View Full Code Here

Examples of org.eclipse.draw2d.MarginBorder

      LightweightSystem lws = new LightweightSystem(overview);
 
      // create thumbnail
      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

Examples of org.eclipse.draw2d.MarginBorder

    LightweightSystem lws = new LightweightSystem(_overview);
    ScalableFreeformRootEditPart rootEditPart = (ScalableFreeformRootEditPart) _graphicalViewer
        .getRootEditPart();
    _thumbnail = new FixedScrollableThumbnail(
        (Viewport) rootEditPart.getFigure());
    _thumbnail.setBorder(new MarginBorder(3));
    _thumbnail.setSource(rootEditPart
        .getLayer(LayerConstants.PRINTABLE_LAYERS));
    lws.setContents(_thumbnail);
  }
View Full Code Here

Examples of org.eclipse.draw2d.MarginBorder

    LightweightSystem lws = new LightweightSystem(overview);
    RootEditPart rep = getGraphicalViewer().getRootEditPart();
    if (rep instanceof ScalableFreeformRootEditPart) {
      ScalableFreeformRootEditPart root = (ScalableFreeformRootEditPart)rep;
      thumbnail = new ScrollableThumbnail((Viewport)root.getFigure());
      thumbnail.setBorder(new MarginBorder(3));
      thumbnail.setSource(root.getLayer(LayerConstants.PRINTABLE_LAYERS));
      lws.setContents(thumbnail);
      disposeListener = new DisposeListener() {
        public void widgetDisposed(DisposeEvent e) {
          if (thumbnail != null) {
View Full Code Here

Examples of org.eclipse.draw2d.MarginBorder

*/
protected IFigure createFigure() {
  Figure f = new FreeformLayer();
//  f.setBorder(new GroupBoxBorder("Diagram"));
  f.setLayoutManager(new FreeformLayout());
  f.setBorder(new MarginBorder(5));
  return f;
}
View Full Code Here

Examples of org.eclipse.draw2d.MarginBorder

* FlowPage containing a TextFlow with the style WORD_WRAP_SOFT.
*
* @param borderSize the size of the MarginBorder
*/
public StickyNoteFigure(int borderSize) {
  setBorder(new MarginBorder(borderSize));
  FlowPage flowPage = new FlowPage();

  textFlow = new TextFlow();

  textFlow.setLayoutManager(new ParagraphTextLayout(textFlow,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.