From eea0b725c26dc1d49f12e1f2255170795f3d3b25 Mon Sep 17 00:00:00 2001 From: Nigel Hawkins Date: Thu, 28 Oct 2010 09:45:33 +0100 Subject: Fix javadoc comments in Format.java --- .../xmerge/converter/xml/sxc/Format.java | 66 +++++++++------------- 1 file changed, 28 insertions(+), 38 deletions(-) (limited to 'xmerge') diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java index 2bb836a7303d..7d142e0d69d0 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java @@ -98,6 +98,9 @@ public class Format implements Cloneable { * Constructor that creates a new Format object * by setting all the format attributes. * + * @param attributes Attributes flags (alignment, bold, etc.) + * @param fontSize Size of the font in points. + * @param fontName Name of the font to use. */ public Format(int attributes, int fontSize, String fontName) { @@ -129,7 +132,6 @@ public class Format implements Cloneable { sizeInPoints = fmt.sizeInPoints; } - /** * Reset this Format description. */ @@ -149,9 +151,10 @@ public class Format implements Cloneable { } /** - * Set one or more text attributes to on. + * Set one or more text attributes. * - * @param flags Flag attributes to set on. + * @param flags Flag attributes to set. + * @param toggle True to set flags, false to clear them. */ public void setAttribute(int flags, boolean toggle) { mask |= flags; @@ -192,7 +195,6 @@ public class Format implements Cloneable { return (!((mask & attribute) == 0)); } - /** * Set the formatting category of this object, ie number, date, * currency.The OfficeConstants class contains string @@ -236,7 +238,6 @@ public class Format implements Cloneable { value = newValue; } - /** * Set the Format specifier for this category. * @@ -246,7 +247,6 @@ public class Format implements Cloneable { formatSpecifier = formatString; } - /** * Get the Format specifier for this category. * @@ -256,7 +256,6 @@ public class Format implements Cloneable { return formatSpecifier; } - /** * Set the precision of the number to be displayed. * @@ -266,7 +265,6 @@ public class Format implements Cloneable { decimalPlaces = precision; } - /** * Get the number of decimal places displayed. * @@ -276,7 +274,6 @@ public class Format implements Cloneable { return decimalPlaces; } - /** * Set the font used for this cell. * @@ -286,7 +283,6 @@ public class Format implements Cloneable { this.fontName = fontName; } - /** * Get the font used for this cell. * @@ -297,65 +293,63 @@ public class Format implements Cloneable { } /** - * Set the font used for this cell. + * Set the font size (in points) used for this cell. * - * @param fontName The name of the font. + * @param fontSize The font size in points. */ public void setFontSize(int fontSize) { sizeInPoints = fontSize; } - /** - * Get the font used for this cell. + * Get the font size (in points) used for this cell. * - * @return The font name. + * @return The font size in points. */ public int getFontSize() { return sizeInPoints; } /** - * Set the alignmen used for this cell. + * Set the vertical alignment used for this cell. * - * @param fontName The name of the font. + * @param vertAlign The vertical alignment. */ public void setVertAlign(int vertAlign) { this.vertAlign = vertAlign; } - /** - * Get the alignment used for this cell. + * Get the vertical alignment used for this cell. * - * @return The font name. + * @return The vertical alignment. */ public int getVertAlign() { return vertAlign; } /** - * Set the alignmen used for this cell. + * Set the alignment used for this cell. * - * @param fontName The name of the font. + * @param align The alignment to use. */ public void setAlign(int align) { this.align = align; } - /** * Get the alignment used for this cell. * - * @return The font name. + * @return The alignment. */ public int getAlign() { return align; } + /** * Set the Foreground Color for this cell. * - * @param color A Color object representing the + * @param c A Color object representing the * foreground color. */ public void setForeground(Color c) { @@ -363,7 +357,6 @@ public class Format implements Cloneable { foreground = new Color(c.getRGB()); } - /** * Get the Foreground Color for this cell. * @@ -373,11 +366,10 @@ public class Format implements Cloneable { return foreground; } - /** * Set the Background Color for this cell * - * @param color A Color object representing + * @param c A Color object representing * the background color. */ public void setBackground(Color c) { @@ -385,9 +377,8 @@ public class Format implements Cloneable { background = new Color(c.getRGB()); } - /** - * Get the Foreground Color for this cell + * Get the Background Color for this cell * * @return Background Color value */ @@ -396,9 +387,9 @@ public class Format implements Cloneable { } /** - * Get the Foreground Color for this cell + * Get a string representation of this Format * - * @return Background Color value + * @return A string indicating the value and category. */ public String toString() { return new String("Value : " + getValue() + " Category : " + getCategory()); @@ -433,13 +424,13 @@ public class Format implements Cloneable { } /** - * Return true if style specifies as much or less - * than this Style, and nothing it specifies - * contradicts this Style. + * Return true if passed Format specifies as much or less + * than this Format, and nothing it specifies + * contradicts this Format. * - * @param style The Style to check. + * @param rhs The Format to check. * - * @return true if style is a subset, false + * @return true if rhs is a subset, false * otherwise. */ public boolean isSubset(Format rhs) { @@ -472,4 +463,3 @@ public class Format implements Cloneable { return true; } } - -- cgit