/** * Returns the value of the given length as int. * @param length the <code>int</code> value should be obtained from * @return Returns a <code>int</code> value representing the specified Length value. */ public static int parseInt(String length) { return (int) parseDouble(length, null); }
/** * Maps the a length string to a different unit * * @param length The value to be mapped * @param destinationUnit The unit to be converted to * @return The converted value without unit suffix as Double */ public static long parseLong(String length, Unit destinationUnit) { return (long) parseDouble(length, destinationUnit); }
/** * Returns the value of the given length as double. * @param length the <code>double</code> value should be obtained from * @return Returns a <code>double</code> value representing the specified Length value. */ public static double parseDouble(String length) { return parseDouble(length, null); }
/** * Returns the value of the given length as int. * @param length the <code>int</code> value should be obtained from * @return Returns a <code>int</code> value representing the specified Length value. */ public static int parseInt(String length) { return (int) parseDouble(length, null); }
/** * Returns the value of the given length as int. * @param length the <code>int</code> value should be obtained from * @param destinationUnit The unit to be converted to * @return Returns a <code>int</code> value representing the specified Length value. */ public static int parseInt(String length, Unit destinationUnit) { return (int) parseDouble(length, destinationUnit); }
/** * Returns the value of the given length as long. * @param length the <code>long</code> value should be obtained from * @return Returns a <code>long</code> value representing the specified Length value. */ public static long parseLong(String length) { return (long) parseDouble(length, null); }
/** * Returns the value of the given length as int. * @param length the <code>int</code> value should be obtained from * @param destinationUnit The unit to be converted to * @return Returns a <code>int</code> value representing the specified Length value. */ public static int parseInt(String length, Unit destinationUnit) { return (int) parseDouble(length, destinationUnit); }
/** * Returns the value of the given length as long. * @param length the <code>long</code> value should be obtained from * @return Returns a <code>long</code> value representing the specified Length value. */ public static long parseLong(String length) { return (long) parseDouble(length, null); }
/** * Maps the a length string to a different unit * * @param length The value to be mapped * @param destinationUnit The unit to be converted to * @return The converted value without unit suffix as Double */ public static long parseLong(String length, Unit destinationUnit) { return (long) parseDouble(length, destinationUnit); }
/** * Returns the value of the given length as double. * @param length the <code>double</code> value should be obtained from * @return Returns a <code>double</code> value representing the specified Length value. */ public static double parseDouble(String length) { return parseDouble(length, null); }
/** * Returns the value of the given length as double. * @param length the <code>double</code> value should be obtained from * @return Returns a <code>double</code> value representing the specified Length value. */ public static double parseDouble(String length) { return parseDouble(length, null); }
/** * Returns the value of the given length as int. * @param length the <code>int</code> value should be obtained from * @return Returns a <code>int</code> value representing the specified Length value. */ public static int parseInt(String length) { return (int) parseDouble(length, null); }
/** * Returns the value of the given length as int. * @param length the <code>int</code> value should be obtained from * @param destinationUnit The unit to be converted to * @return Returns a <code>int</code> value representing the specified Length value. */ public static int parseInt(String length, Unit destinationUnit) { return (int) parseDouble(length, destinationUnit); }
/** * Returns the value of the given length as long. * @param length the <code>long</code> value should be obtained from * @return Returns a <code>long</code> value representing the specified Length value. */ public static long parseLong(String length) { return (long) parseDouble(length, null); }
/** * Maps the a length string to a different unit * * @param length The value to be mapped * @param destinationUnit The unit to be converted to * @return The converted value without unit suffix as Double */ public static long parseLong(String length, Unit destinationUnit) { return (long) parseDouble(length, destinationUnit); }
/** * Get the max height of a footnote area on a page. * * @return the value of max height of footnote area. */ public double getFootnoteMaxHeight() { String valueString = mElement.getStyleFootnoteMaxHeightAttribute(); // check if a value was returned if (valueString == null) { // if not use the default length valueString = DEFAULT_LENGTH; } // return the converted value return Length.parseDouble(valueString, Unit.MILLIMETER); }
/** * Get the page width of this <code>PageLayoutProperties</code> * * @return the size of page width (in Millimeter) */ public double getPageWidth() { // get the value String valueString = mElement.getFoPageWidthAttribute(); // check if a value was returned if (valueString == null) { // if not use the default length valueString = DEFAULT_LENGTH; } // return the converted value return Length.parseDouble(valueString, Unit.MILLIMETER); }
/** * Get the size of the bottom margin of this * <code>PageLayoutProperties</code> * * @return the size of the bottom margin (in Millimeter) */ public double getMarginBottom() { // get the value String valueString = mElement.getFoMarginBottomAttribute(); // check if a value was returned if (valueString == null) { // if not use the default length valueString = DEFAULT_LENGTH; } // return the converted value return Length.parseDouble(valueString, Unit.MILLIMETER); }
/** * Get the size of the top margin of this <code>ParagraphProperties</code> * * @return the size of the top margin (in Millimeter) * @since 0.7 */ public double getMarginTop() { // get the value String valueString = mElement.getFoMarginTopAttribute(); // check if a value was returned if (valueString == null) { // if not use the default length valueString = DEFAULT_LENGTH; } // return the converted value return Length.parseDouble(valueString, Unit.MILLIMETER); }
/** * Get the thickness of a footnote separator line. * <p> * If there is no <code>style:footnote-sep</code> element, the default value * 0 will be returned. * * @return the thickness a footnote separator line. */ public double getFootnoteSepThickness() { if (mFootnoteSepElement == null) { return 0; } else { String value = mFootnoteSepElement.getStyleWidthAttribute(); if (value == null) value = DEFAULT_LENGTH; return Length.parseDouble(value, Unit.MILLIMETER); } }