Package de.lessvoid.nifty.tools

Examples of de.lessvoid.nifty.tools.SizeValue


    BoxConstraints constraint = firstChild.getBoxConstraints();
    if (constraint == null) {
      return null;
    }
    return
      new SizeValue(
          constraint.getWidth().getValueAsInt(0) +
          root.getBoxConstraints().getPaddingLeft().getValueAsInt(root.getBox().getWidth()) +
          root.getBoxConstraints().getPaddingRight().getValueAsInt(root.getBox().getWidth()) + "px");
  }
View Full Code Here


    BoxConstraints constraint = firstChild.getBoxConstraints();
    if (constraint == null) {
      return null;
    }
    return
      new SizeValue(
          constraint.getHeight().getValueAsInt(0) +
          root.getBoxConstraints().getPaddingTop().getValueAsInt(root.getBox().getHeight()) +
          root.getBoxConstraints().getPaddingBottom().getValueAsInt(root.getBox().getHeight()) + "px");

  }
View Full Code Here

    this.y = null;
    this.width = null;
    this.height = null;
    this.horizontalAlign = HorizontalAlign.left;
    this.verticalAlign = VerticalAlign.top;
    paddingLeft = new SizeValue("0px");
    paddingRight = new SizeValue("0px");
    paddingTop = new SizeValue("0px");
    paddingBottom = new SizeValue("0px");
  }
View Full Code Here

        - e.getBoxConstraints().getPaddingBottom().getValueAsInt(root.getBox().getHeight());
      if (partHeight > newHeight) {
        newHeight = partHeight;
      }
    }
    return new SizeValue(newHeight + "px");
  }
View Full Code Here

      newWidth += e.getBoxConstraints().getWidth().getValueAsInt(0);
    }
    newWidth += root.getBoxConstraints().getPaddingLeft().getValueAsInt(root.getBox().getWidth());
    newWidth += root.getBoxConstraints().getPaddingRight().getValueAsInt(root.getBox().getWidth());

    return new SizeValue(newWidth + "px");
  }
View Full Code Here

      newHeight += e.getBoxConstraints().getHeight().getValueAsInt(0);
    }
    newHeight += root.getBoxConstraints().getPaddingTop().getValueAsInt(root.getBox().getHeight());
    newHeight += root.getBoxConstraints().getPaddingBottom().getValueAsInt(root.getBox().getHeight());

    return new SizeValue(newHeight + "px");
  }
View Full Code Here

      return null;
    }
    if (value.length() == 0) {
      return null;
    }
    return new SizeValue(value);
  }
View Full Code Here

    return new SizeValue(value);
  }

  public SizeValue paddingSizeValue(final String value) {
    if (value == null) {
      return new SizeValue(DEFAULT_PADDING);
    }
    return new SizeValue(value);
  }
View Full Code Here

    return new SizeValue(value);
  }

  public SizeValue paddingSizeValue(final String value, final String defaultValue) {
    if (value == null) {
      return new SizeValue(defaultValue);
    }
    return new SizeValue(value);
  }
View Full Code Here

  public int insetSizeValue(final String value, final int imageHeight) {
    if (value == null) {
      return 0;
    }
    SizeValue sizeValue = new SizeValue(value);
    return sizeValue.getValueAsInt(imageHeight);
  }
View Full Code Here

TOP

Related Classes of de.lessvoid.nifty.tools.SizeValue

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.