Package org.wicketstuff.yui.helper

Examples of org.wicketstuff.yui.helper.ImageResourceInfo


    /*
     * calculate the width and height
     */

    ImageResourceInfo bgInfo = new ImageResourceInfo(background);
    ImageResourceInfo thumbInfo = new ImageResourceInfo(thumb);

    int height = bgInfo.getHeight();
    int thumbWidth = thumbInfo.getWidth();
    int left = leftUp - thumbWidth;
    int bgLength = leftUp + rightDown;
    String width = Integer.toString(bgLength - thumbWidth);

    setLeftUp(Integer.toString(leftUp));
View Full Code Here


      if (list.get(i).getClass().getSimpleName().equals("YuiImage")) {
        YuiImage aImage = (YuiImage) list.get(i);
        ResourceReference aResourceReference = new ResourceReference(
            Selection.class, aImage.getFileName());

        ImageResourceInfo backgroundInfo = new ImageResourceInfo(
            aResourceReference);
        int width = backgroundInfo.getWidth();
        int height = backgroundInfo.getHeight();

        CSSInlineStyle aCSSInlineStyle = new CSSInlineStyle();

        aCSSInlineStyle.add("background", "url("
            + RequestCycle.get().urlFor(aResourceReference) + ")");
View Full Code Here

  @Override
  protected String getBackgroundStyle()
  {
    YuiSliderSettings settings = getSliderSettings();

    ImageResourceInfo bgInfo = new ImageResourceInfo(settings.getBackgroundResource());
    ImageResourceInfo thumbInfo = new ImageResourceInfo(settings.getThumbResource());

    int width = bgInfo.getWidth();
    int thumbHeight = thumbInfo.getHeight();
    int bgLength = settings.getLength();

    String height = Integer.toString(bgLength - thumbHeight);

    CSSInlineStyle background = new CSSInlineStyle();
View Full Code Here

  @Override
  protected String getThumbStyle()
  {
    YuiSliderSettings settings = getSliderSettings();
    ImageResourceInfo thumbInfo = new ImageResourceInfo(settings.getThumbResource());
    CSSInlineStyle thumb = new CSSInlineStyle();
    thumb.add("height", thumbInfo.getHeight() + "px");
    thumb.add("top", 0 - thumbInfo.getHeight() + "px");
    return thumb.getStyle();
  }
View Full Code Here

  @Override
  protected String getLeftUpStyle()
  {
    YuiSliderSettings settings = getSliderSettings();
    ImageResourceInfo leftUp = new ImageResourceInfo(settings.getLeftUpResource());
    CSSInlineStyle background = new CSSInlineStyle();
    background.add("background", "url("
        + RequestCycle.get().urlFor(settings.getLeftUpResource()) + ") no-repeat");
    background.add("height", leftUp.getHeight() + "px");
    return background.getStyle();
  }
View Full Code Here

  @Override
  protected String getRightDownStyle()
  {
    YuiSliderSettings settings = getSliderSettings();
    ImageResourceInfo rightDown = new ImageResourceInfo(settings.getRightDownResource());
    CSSInlineStyle background = new CSSInlineStyle();
    background.add("background", "url("
        + RequestCycle.get().urlFor(settings.getRightDownResource()) + ") no-repeat");
    background.add("height", rightDown.getHeight() + "px");
    return background.getStyle();
  }
View Full Code Here

      YuiImage img = slot.getImage();

      ResourceReference imgRR = new ResourceReference(
          DragDropSettings.class, img.getFileName());

      ImageResourceInfo imgInfo = new ImageResourceInfo(imgRR);
      int imgWidth = imgInfo.getWidth();
      int imgHeight = imgInfo.getHeight();

      CSSInlineStyle imgStyle = new CSSInlineStyle();

      imgStyle.add("background", "url("
          + RequestCycle.get().urlFor(imgRR) + ")");
View Full Code Here

      YuiImage img = slot.getSlot();

      ResourceReference imgRR = new ResourceReference(
          DragDropSettings.class, img.getFileName());

      ImageResourceInfo imgInfo = new ImageResourceInfo(imgRR);
      int imgWidth = imgInfo.getWidth();
      int imgHeight = imgInfo.getHeight();

      CSSInlineStyle imgStyle = new CSSInlineStyle();
      imgStyle.add("background", "url("
          + RequestCycle.get().urlFor(imgRR) + ")");
      imgStyle.add("width", imgWidth + "px");
View Full Code Here

      YuiImage img = slot.getSlot();

      ResourceReference imgRR = new ResourceReference(
          DragDropSettings.class, img.getFileName());

      ImageResourceInfo imgInfo = new ImageResourceInfo(imgRR);
      int imgWidth = imgInfo.getWidth();
      int imgHeight = imgInfo.getHeight();

      CSSInlineStyle imgStyle = new CSSInlineStyle();
      imgStyle.add("background", "url("
          + RequestCycle.get().urlFor(imgRR) + ")");
      imgStyle.add("width", imgWidth + "px");
View Full Code Here

  @Override
  protected String getBackgroundStyle()
  {
    YuiSliderSettings settings = getSliderSettings();

    ImageResourceInfo bgInfo = new ImageResourceInfo(settings.getBackgroundResource());
    ImageResourceInfo thumbInfo = new ImageResourceInfo(settings.getThumbResource());

    int height = bgInfo.getHeight();
    int thumbWidth = thumbInfo.getWidth();
    int bgLength = settings.getLength();

    String width = Integer.toString(bgLength - thumbWidth);

    CSSInlineStyle background = new CSSInlineStyle();
View Full Code Here

TOP

Related Classes of org.wicketstuff.yui.helper.ImageResourceInfo

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.