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

Examples of org.eclipse.jst.pagedesigner.css2.layout.CSSTextFigure


   * (non-Javadoc)
   *
   * @see org.eclipse.jst.pagedesigner.css2.layout.FlowFigureLayout#layout()
   */
  protected void layoutChildren() {
    ICSSWidgetProvider provider = getProvider();

    // if we did endLine, then will result in context create a new line, so
    // we may in the new line now.
    // passing in the top margin, and context will consider that when
    // creating the new line.

    int suggestedWith = _blockBox.getContentWidth();
    int suggestedHeight = _blockBox.getContentHeight();
    // int suggestedWith = getSuggestedWidth(line, style, provider);
    // int suggestedHeight = getSuggestedHeight(line, style, provider);

    DimensionInfo resultInfo = provider.getPreferredDimension(
        suggestedWith, suggestedHeight);
    Dimension resultSize = resultInfo.getDimension();

    _widgetBox = new WidgetBox(); // ((CSSWidgetFigure)getFlowFigure()).getWidgetBox();
    // if (provider.isHandlingBorder() || style == null)
View Full Code Here


   * (non-Javadoc)
   *
   * @see org.eclipse.jst.pagedesigner.css2.layout.ICSSPainter#paintFigure(org.eclipse.draw2d.Graphics)
   */
  public void paintFigure(Graphics g) {
    ICSSWidgetProvider provider = this.getProvider();
    if (provider != null && _widgetBox != null) {
      provider.paintFigure(g, new Rectangle(_widgetBox._x, _widgetBox._y,
          _widgetBox.getWidth(), _widgetBox.getHeight()));
    }
  }
View Full Code Here

   * (non-Javadoc)
   *
   * @see org.eclipse.jst.pagedesigner.css2.layout.CSSLayout#handlingBorderForBlock()
   */
  public boolean handlingBorderForBlock() {
    ICSSWidgetProvider provider = this.getProvider();
    if (provider != null) {
      return provider.isHandlingBorder();
    }
    return super.handlingBorderForBlock();
  }
View Full Code Here

   * (non-Javadoc)
   * @seeorg.eclipse.wst.sse.core.internal.provisional.AbstractAdapterFactory#createAdapter(org.eclipse.wst.sse.core.internal.provisional.INodeNotifier)
   */
  protected INodeAdapter createAdapter(INodeNotifier target) {
    if (target instanceof Element) {
      return new AbstractStyle((Element) target, _prefs);
    }
        return null;
  }
View Full Code Here

   * @return
   */
  private int getInsetProperty(String propertyName) {
    Object obj = this.getStyleProperty(propertyName);
    if (obj instanceof Length) {
      Length l = (Length) obj;
      if (l.isPercentage()) {
        return 0; // FIXME:
      }
            return l.getValue();
    }

    return 0;
  }
View Full Code Here

        getCSSStyle(node));
    return provider;
  }

  ICSSWidgetProvider getButtonProvider(Element node) {
    ButtonWidgetProvider provider = new ButtonWidgetProvider(
        getCSSStyle(node));
    provider.setValue(getButtonValue(node));
    return provider;
  }
View Full Code Here

    // CompositeWidgetProvider(getCSSStyle(), textprovider, browsebutton,
    // false);
    // return provider;
    ICSSWidgetProvider textprovider = getTextInputProvider(node);
    // XXX: should we use the defaultstyle for the button?
    ButtonWidgetProvider browsebutton = new ButtonWidgetProvider(
        getCSSStyle(node));
    browsebutton.setValue(Messages.InputFigureHandler_Browse);
    InputFileWidgetProvider provider = new InputFileWidgetProvider(
        getCSSStyle(node), textprovider, browsebutton);
    return provider;
  }
View Full Code Here

      RadioWidgetProvider provider = new RadioWidgetProvider(
          getCSSStyle(node));
      provider.setChecked(node.hasAttribute("checked")); //$NON-NLS-1$
      return provider;
    } else if (type.equalsIgnoreCase(ICSSPropertyID.VAL_CHECKBOX)) {
      CheckboxWidgetProvider provider = new CheckboxWidgetProvider(
          getCSSStyle(node));
      provider.setChecked(node.hasAttribute("checked")); //$NON-NLS-1$
      return provider;
    } else if (type.equalsIgnoreCase(ICSSPropertyID.VAL_HIDDEN)) {
      return getHiddenProvider(node);
    }
    if (type.equalsIgnoreCase(ICSSPropertyID.VAL_PASSWORD)) {
View Full Code Here

          getCSSStyle(node));
      provider.setOptions(labels);
      provider.setRows(rowsInt);
      return provider;
    }
        ComboWidgetProvider provider = new ComboWidgetProvider(
            getCSSStyle(node));
        provider.setOptions(labels);
        provider.setSelectedLabel(getSelectedLabels(node));
        return provider;
  }
View Full Code Here

    return JSFUICommonPlugin.getDefault().getImage(
        JSFSharedImages.DEFAULT_PALETTE_TAG_IMG);
  }

  ICSSWidgetProvider getHiddenProvider(Element node) {
    return new HiddenProvider(getHiddenImage(), node);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jst.pagedesigner.css2.layout.CSSTextFigure

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.