Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.LayoutManager


        if (editPart.getParent() != null) {
            IFigure figure = ((GraphicalEditPart) editPart.getParent())
                    .getFigure();
            if (figure instanceof CSSFigure) {
                CSSFigure cssFigure = (CSSFigure) figure;
                LayoutManager layoutManager = cssFigure.getLayoutManager();
                if (layoutManager instanceof CSSTableLayout2) {
                    CSSTableLayout2 tableLayout = (CSSTableLayout2) layoutManager;
                    bounds.y = tableLayout.getHSpacing();
                    bounds.height = figure.getClientArea().height
                            - tableLayout.getHSpacing() * 2;
 
View Full Code Here


   * @return the adapter
   */
  public static ITableEditAdapter getTableEditAdapter(
      GraphicalEditPart tablePart) {
    IFigure figure = tablePart.getFigure();
    LayoutManager layout = figure.getLayoutManager();
    if (layout instanceof CSSTableLayout2) {
      return new TableEditAdapter((CSSTableLayout2) layout);
    }
    return null;
  }
View Full Code Here

     * corresponding table layout.
   */
  public CSSTableLayout2 getTableLayoutContext() {
    IFigure parent = getCSSFigure().getParent();
    if (parent != null) {
      LayoutManager parentLayout = parent.getLayoutManager();
      if (parentLayout instanceof CSSTableLayout2) {
        return (CSSTableLayout2) parentLayout;
      }
    }

View Full Code Here

  /**
   * @return the max cell dimensions
   */
  public Dimension getMaxCWDimension() {
    ICSSFigure figure = getFigure();
    LayoutManager layout = figure.getLayoutManager();
    if (layout instanceof CSSTableCellLayout) {
      Dimension d = ((CSSTableCellLayout) layout).getMaxContentWidthSize(
          figure, _cellWidth, _cellHeight);
      return d;
    }
View Full Code Here

   * @return the table layout context
   */
  public CSSTableLayout2 getTableLayoutContext() {
    IFigure parent = getCSSFigure().getParent();
    if (parent != null) {
      LayoutManager parentLayout = parent.getLayoutManager();
      if (parentLayout instanceof CSSTRLayout) {
        return ((CSSTRLayout) parentLayout).getTableLayoutContext();
      }
    }

View Full Code Here

   * (non-Javadoc)
   *
   * @see org.eclipse.draw2d.Figure#setLayoutManager(org.eclipse.draw2d.LayoutManager)
   */
  public void setLayoutManager(LayoutManager manager) {
    LayoutManager old = getLayoutManager();
    if (old != manager) {
      FlowContext context = null;
      if (old instanceof FlowFigureLayout) {
        context = ((FlowFigureLayout) old).getOriginalFlowContext();
      }
View Full Code Here

      g.setClip(bounds);
      g.drawImage((Image)bgImage, bounds.x, bounds.y);
      g.restoreState();
    }

    LayoutManager layout = getLayoutManager();
    if (layout instanceof ICSSPainter) {
      if (useLocalCoordinates()) {
        g.translate(getBounds().x + getInsets().left, getBounds().y
            + getInsets().top);
        ((ICSSPainter) layout).paintFigure(g);
View Full Code Here

     * corresponding table layout.
   */
  public CSSTableLayout2 getTableLayoutContext() {
    IFigure parent = getCSSFigure().getParent();
    if (parent != null) {
      LayoutManager parentLayout = parent.getLayoutManager();
      if (parentLayout instanceof CSSTableLayout2) {
        return (CSSTableLayout2) parentLayout;
      } else if (parentLayout instanceof CSSTRGroupLayout) {
        return ((CSSTRGroupLayout) parentLayout)
            .getTableLayoutContext();
View Full Code Here

   * @return the group layout or null
   */
  public CSSTRGroupLayout getTRGroupLayout() {
    IFigure parent = getCSSFigure().getParent();
    if (parent != null) {
      LayoutManager parentLayout = parent.getLayoutManager();
      if (parentLayout instanceof CSSTRGroupLayout) {
        return ((CSSTRGroupLayout) parentLayout);
      }
    }

View Full Code Here

   * @return the css table layout context or null if none.
   */
  public CSSTableLayout2 getTableLayoutContext() {
    IFigure parent = getCSSFigure().getParent();
    if (parent != null) {
      LayoutManager parentLayout = parent.getLayoutManager();
      if (parentLayout instanceof CSSTableLayout2) {
        return (CSSTableLayout2) parentLayout;
      }
    }
    return null;
View Full Code Here

TOP

Related Classes of org.eclipse.draw2d.LayoutManager

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.