Examples of SizeUnit


Examples of org.apache.metamodel.data.Style.SizeUnit

          if (style.isUnderline()) {
            font.get().setUnderline(Font.U_SINGLE);
          }
          if (style.getFontSize() != null) {
            Integer fontSize = style.getFontSize();
            SizeUnit sizeUnit = style.getFontSizeUnit();
            if (sizeUnit == SizeUnit.PERCENT) {
              fontSize = convertFontPercentageToPt(fontSize);
            }
            font.get().setFontHeightInPoints(fontSize.shortValue());
          }
View Full Code Here

Examples of org.nasutekds.server.admin.SizeUnit

    public Message visitSize(SizePropertyDefinition pd, Long v, Void p) {
      if (pd.isAllowUnlimited() && v < 0) {
        return INFO_VALUE_UNLIMITED.get();
      }

      SizeUnit unit = sizeUnit;
      if (unit == null) {
        if (isScriptFriendly) {
          // Assume users want a more accurate value.
          unit = SizeUnit.getBestFitUnitExact(v);
        } else {
          unit = SizeUnit.getBestFitUnit(v);
        }
      }

      MessageBuilder builder = new MessageBuilder();
      builder.append(numberFormat.format(unit.fromBytes(v)));
      builder.append(' ');
      builder.append(unit.getShortName());

      return builder.toMessage();
    }
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.