Package org.eclipse.jst.pagedesigner.css2.layout.table

Examples of org.eclipse.jst.pagedesigner.css2.layout.table.CSSTRGroupLayout


  /**
   * @param node
   * @return the css style on the node
   */
  protected ICSSStyle getCSSStyle(Element node) {
    ICSSStyle style = null;
    if (node instanceof IDOMElement) {
      style = (ICSSStyle) ((IDOMElement) node)
          .getAdapterFor(ICSSStyle.class);
    }
    if (style == null) {
View Full Code Here


    if (rootNode instanceof Element) {
      element = (Element) rootNode;
    } else if (rootNode.getParentNode() != null) {
      element = (Element) rootNode.getParentNode();
    }
    ICSSStyle style = CSSUtil.getCSSStyle(element);

    Node node = EditModelQuery.getDocumentNode(rootNode).createElement(
        "span"); //$NON-NLS-1$
    for (int i = 0, n = result.size(); i < n; i++) {
      node.appendChild((Node) result.elementAt(i));
View Full Code Here

  static boolean isTableCell(Node node) {
    if (node instanceof INodeNotifier) {
      Object adapter = ((INodeNotifier) node)
          .getAdapterFor(ICSSStyle.class);
      if (adapter != null) {
        ICSSStyle style = (ICSSStyle) adapter;
        String display = style.getDisplay();
        return display.equalsIgnoreCase(ICSSPropertyID.VAL_TABLE_CELL);
      }
    }
    return false;
  }
View Full Code Here

      return true;
    } else if (node instanceof INodeNotifier) {
      Object adapter = ((INodeNotifier) node)
          .getAdapterFor(ICSSStyle.class);
      if (adapter != null) {
        ICSSStyle style = (ICSSStyle) adapter;
        String display = style.getDisplay();
        return (display.equalsIgnoreCase(ICSSPropertyID.VAL_INLINE)
            || //
            display
                .equalsIgnoreCase(ICSSPropertyID.VAL_INLINE_TABLE)
            || //
View Full Code Here

        parentFigure.add(childFigure, position.getIndex());
        figureAdded = true;
      }
      // link up style
      if (parent instanceof INodeNotifier) {
        ICSSStyle parentStyle = (ICSSStyle) ((INodeNotifier) parent)
            .getAdapterFor(ICSSStyle.class);
        if (parentStyle != null) {
          ICSSStyle childStyle = (ICSSStyle) ((INodeNotifier) childNode)
              .getAdapterFor(ICSSStyle.class);
          if (childStyle instanceof AbstractStyle) {
            ((AbstractStyle) childStyle)
                .setParentStyle(parentStyle);
          }
View Full Code Here

        // this only applies to visual edit parts
        else
        {
        // de-link style
        Node childNode = (Node) childEditPart.getModel();
        ICSSStyle childStyle = (ICSSStyle) ((INodeNotifier) childNode)
            .getAdapterFor(ICSSStyle.class);
        if (childStyle instanceof AbstractStyle) {
          ((AbstractStyle) childStyle).setParentStyle(null);
        }
        // de-link nodeForFigure
View Full Code Here

  public static boolean isListItem(Node node) {
    if (node instanceof INodeNotifier) {
      Object adapter = ((INodeNotifier) node)
          .getAdapterFor(ICSSStyle.class);
      if (adapter != null) {
        ICSSStyle style = (ICSSStyle) adapter;
        String display = style.getDisplay();
        return (display.equalsIgnoreCase(ICSSPropertyID.VAL_LIST_ITEM));
      }
    }
    return false;
  }
View Full Code Here

    for (int i = 0, size = childNodes.getLength(); i < size; i++) {
      refreshChildStyles((IDOMNode) childNodes.item(i));
    }
    if (node instanceof IDOMElement) {
      // only refresh style on element.
      ICSSStyle a = (ICSSStyle) node.getAdapterFor(ICSSStyle.class);
      if (a != null) {
        a.reset();
      }
    }
  }
View Full Code Here

    // width/height style setting don't include border padding, then we need
    // to set the element's width/height
    // style property a little smaller.
    if (part.getFigure() instanceof CSSFigure) {
      CSSFigure cssfigure = (CSSFigure) part.getFigure();
      ICSSStyle style = cssfigure.getCSSStyle();
      if (style != null && !style.isSizeIncludeBorderPadding()) {
        width -= (style.getBorderInsets().getWidth() + style
            .getPaddingInsets().getWidth());
        height -= (style.getBorderInsets().getHeight() + style
            .getPaddingInsets().getHeight());
      }
    }

    //make sure to only change the dimensions for the direction of the resize request.
View Full Code Here

    for (int i = 0, size = childNodes.getLength(); i < size; i++) {
      refreshChildStyles((IDOMNode) childNodes.item(i));
    }
    if (node instanceof IDOMElement) {
      // only refresh style on element.
      ICSSStyle a = (ICSSStyle) node.getAdapterFor(ICSSStyle.class);
      if (a != null) {
        a.reset();
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jst.pagedesigner.css2.layout.table.CSSTRGroupLayout

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.