Examples of ImageContainer


Examples of com.tll.client.ui.ImageContainer

  public Option(String text, Image img) {
    super();
    setStyleName(OptionStyles.getOptions().option());
    this.text = text;
    if(img != null) {
      getElement().appendChild((new ImageContainer(img)).getElement());
    }
    final Element txt = DOM.createSpan();
    txt.setInnerText(text);
    getElement().appendChild(txt);
  }
View Full Code Here

Examples of com.tll.client.ui.ImageContainer

  public Option(String text, Image img) {
    super();
    setStyleName(Styles.OPTION);
    this.text = text;
    if(img != null) {
      getElement().appendChild((new ImageContainer(img)).getElement());
    }
    final Element txt = DOM.createSpan();
    txt.setInnerText(text);
    getElement().appendChild(txt);
  }
View Full Code Here

Examples of com.tll.client.ui.ImageContainer

      mlp = (HorizontalPanel) o;
      if(show && mlp.getWidgetCount() == 1) {
        // no image so create it
        final MsgLevel level = MsgLevel.values()[mlp.getElement().getPropertyInt(ELEM_PROP_MSG_LEVEL)];
        // NOTE: since this is a clipped image, the width/height should be known
        mlp.insert(new ImageContainer(MsgStyles.getMsgLevelImage(level)), 0);
      }
      if(mlp.getWidgetCount() == 2) {
        mlp.getWidget(0).setVisible(show);
      }
    }
View Full Code Here

Examples of com.tll.client.ui.ImageContainer

    initWidget(container);

    final ImageResource img = MsgStyles.getMsgLevelImage(mlevel);
    // NOTE: since this is a clipped image, the width/height should be known
    final FlowPanel fp = new FlowPanel();
    fp.add(new ImageContainer(img));
    String title;
    switch(mlevel) {
      case ERROR:
        title = "Errors";
        break;
View Full Code Here

Examples of com.tll.client.ui.ImageContainer

      mlp = (HorizontalPanel) o;
      if(show && mlp.getWidgetCount() == 1) {
        // no image so create it
        final MsgLevel level = MsgLevel.values()[mlp.getElement().getPropertyInt(ELEM_PROP_MSG_LEVEL)];
        // NOTE: since this is a clipped image, the width/height should be known
        mlp.insert(new ImageContainer(Util.getMsgLevelImage(level)), 0);
      }
      if(mlp.getWidgetCount() == 2) {
        mlp.getWidget(0).setVisible(show);
      }
    }
View Full Code Here

Examples of com.tll.client.ui.ImageContainer

    initWidget(container);

    final Image img = Util.getMsgLevelImage(mlevel);
    // NOTE: since this is a clipped image, the width/height should be known
    final FlowPanel fp = new FlowPanel();
    fp.add(new ImageContainer(img));
    String title;
    switch(mlevel) {
      case ERROR:
        title = "Errors";
        break;
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ImageContainer

    if (rawObject instanceof DrawableWrapper)
    {
      // render it into an Buffered image and make it a PNG file.
      final DrawableWrapper drawable = (DrawableWrapper) rawObject;
      final StrictBounds cb = new StrictBounds(node.getX(), node.getY(), node.getWidth(), node.getHeight());
      final ImageContainer image = RenderUtility.createImageFromDrawable(drawable, cb, node,
          metaData);
      if (image == null)
      {
        //xmlWriter.writeComment("Drawable content [No image generated]:" + source);
        return;
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ImageContainer

    if (value instanceof Image)
    {
      try
      {
        final ImageContainer imageContainer = new DefaultImageReference((Image) value);
        final RenderNode rawSource = textExtractor.getRawSource();
        final StrictBounds contentBounds =
            new StrictBounds(content.getX(), content.getY() + contentOffset, content.getWidth(), content.getHeight());
        createImageCell(rawSource, imageContainer, sheetLayout, rectangle, contentBounds);
      }
      catch (IOException ioe)
      {
        // Should not happen.
        ExcelPrinter.logger.warn("Failed to process AWT-Image in Excel-Export", ioe);
      }
      return false;
    }
    else if (value instanceof ImageContainer)
    {
      final ImageContainer imageContainer = (ImageContainer) value;
      // todo: this is wrong ..
      final RenderNode rawSource = textExtractor.getRawSource();
      final StrictBounds contentBounds =
          new StrictBounds(content.getX(), content.getY() + contentOffset, content.getWidth(), content.getHeight());
      createImageCell(rawSource, imageContainer, sheetLayout, rectangle, contentBounds);
      return false;
    }
    else if (value instanceof DrawableWrapper)
    {
      final DrawableWrapper drawable = (DrawableWrapper) value;
      final RenderNode rawSource = textExtractor.getRawSource();
      final StrictBounds contentBounds = new StrictBounds
          (rawSource.getX(), rawSource.getY() + contentOffset, rawSource.getWidth(), rawSource.getHeight());
      final ImageContainer imageFromDrawable =
          RenderUtility.createImageFromDrawable(drawable, contentBounds, content, metaData);
      createImageCell(rawSource, imageFromDrawable, sheetLayout, rectangle, contentBounds);
      return false;
    }
    else if (value instanceof Shape)
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ImageContainer

      }
      else if (rawObject instanceof DrawableWrapper)
      {
        final StrictBounds rect = new StrictBounds
            (node.getX(), node.getY(), node.getWidth(), node.getHeight());
        final ImageContainer ic =
            RenderUtility.createImageFromDrawable((DrawableWrapper) rawObject, rect, node, metaData);
        if (ic == null)
        {
          return;
        }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ImageContainer

    {
      this.imageResolutionMapping = metaData.isFeatureSupported(OutputProcessorFeature.IMAGE_RESOLUTION_MAPPING);
      final double displayResolution = metaData.getNumericFeatureValue(OutputProcessorFeature.DEVICE_RESOLUTION);
      final double correctionFactorPxToPoint = 72.0 / displayResolution;

      final ImageContainer ir = (ImageContainer) content;
      final double scaleX = ir.getScaleX();
      final double scaleY = ir.getScaleY();
      if (imageResolutionMapping)
      {
        contentWidth = StrictGeomUtility.toInternalValue(ir.getImageWidth() * scaleX * correctionFactorPxToPoint);
        contentHeight = StrictGeomUtility.toInternalValue(ir.getImageHeight() * scaleY * correctionFactorPxToPoint);
      }
      else
      {
        contentWidth = StrictGeomUtility.toInternalValue(ir.getImageWidth() * scaleX);
        contentHeight = StrictGeomUtility.toInternalValue(ir.getImageHeight() * scaleY);
      }
    }
    else if (content instanceof DrawableWrapper)
    {
      final DrawableWrapper edr = (DrawableWrapper) content;
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.