Package org.eclipse.jst.pagedesigner.css2.provider

Examples of org.eclipse.jst.pagedesigner.css2.provider.DimensionInfo


    }
    if (height <= 0) {
      height = getDefaultHeight();
    }
    return new DimensionInfo(new Dimension(width, height), -1);
  }
View Full Code Here


   */
  public DimensionInfo getPreferredDimension(int width, int height) {
    if (width <= 0 && height <= 0) {
      // we are free, so use image size
      org.eclipse.swt.graphics.Rectangle a = _image.getBounds();
      return new DimensionInfo(a.width, a.height, -1);
    } else if (width > 0 && height > 0) {
      return new DimensionInfo(width, height, -1);
    } else if (height > 0) {
      width = (int) ((double) _imageWidth * height / _imageHeight);
      return new DimensionInfo(width, height, -1);
    } else {
      height = (int) ((double) _imageHeight * width / _imageWidth);
      return new DimensionInfo(width, height, -1);
    }
  }
View Full Code Here

      width = getDefaultWidth();
    }
    if (height <= 0) {
      height = getDefaultWidth();
    }
    return new DimensionInfo(width, height, height * 4 / 5);
  }
View Full Code Here

      width = getDefaultWidth();
    }
    if (height <= 0) {
      height = getDefaultWidth();
    }
    return new DimensionInfo(new Dimension(width, height), height * 4 / 5);
  }
View Full Code Here

      preWidth = getLabelWidth() + _imageWidth;
    }
    if (height <= 0) {
      preHeight = Math.max(getLabelHeight(), _imageHeight);
    }
    return new DimensionInfo(preWidth, preHeight, -1);
  }
View Full Code Here

      width = getDefaultWidth();
    }
    if (height <= 0) {
      height = getDefaultHeight();
    }
    return new DimensionInfo(new Dimension(width, height), -1);
  }
View Full Code Here

      if (data.trim().length() == 0) {
        return;
      }
      // XXX: currently creating of CSSTextFigure is distributed both here
      // and TextEditPart. We may want to unify them later.
      CSSTextFigure figure = new CSSTextFigure(new ICSSTextProvider() {
        /*
         * (non-Javadoc)
         *
         * @see org.eclipse.jst.pagedesigner.css2.provider.ICSSTextProvider#getCSSStyle()
         */
 
View Full Code Here

    // browsebutton.setValue("Browse...");
    // CompositeWidgetProvider provider = new
    // 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(
View Full Code Here

    super();
  }

  public void updateFigure(Element node, CSSFigure oldFigure) {
    setCurrentFigure(oldFigure);
    ICSSWidgetProvider provider = initializeWidgetProvider(node);
    oldFigure.setCSSStyle(provider.getCSSStyle());
    oldFigure
        .setFixedLayoutManager(new CSSWidgetLayout(oldFigure, provider));
  }
View Full Code Here

   * (non-Javadoc)
   *
   * @see org.eclipse.jst.pagedesigner.css2.layout.CSSBlockFlowLayout#isInlineBlock()
   */
  public boolean isInlineBlock() {
    ICSSWidgetProvider provider = getProvider();
    return provider.isInline();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jst.pagedesigner.css2.provider.DimensionInfo

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.