diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | javax/print/attribute/ResolutionSyntax.java | 6 |
2 files changed, 10 insertions, 1 deletions
@@ -1,5 +1,10 @@ 2005-11-19 Wolfgang Baer <WBaer@gmx.de> + * javax/print/attribute/ResolutionSyntax.java (toString): + Changed to not append the unitsName if null. Clarified api docs. + +2005-11-19 Wolfgang Baer <WBaer@gmx.de> + * javax/print/attribute/TextSyntax.java: Added and enhanced api docs for this class. (TextSyntax): If locale is null use the default locale. diff --git a/javax/print/attribute/ResolutionSyntax.java b/javax/print/attribute/ResolutionSyntax.java index be8c94d56..aca4c0188 100644 --- a/javax/print/attribute/ResolutionSyntax.java +++ b/javax/print/attribute/ResolutionSyntax.java @@ -254,12 +254,16 @@ public abstract class ResolutionSyntax * </p> * * @param units the units to use - * @param unitsName the name of the units + * @param unitsName the name of the units. If <code>null</code> + * it is ommitted from the string representation. * * @return The string representation. */ public String toString(int units, String unitsName) { + if (unitsName == null) + return getCrossFeedResolution(units) + "x" + getFeedResolution(units); + return ("" + getCrossFeedResolution(units) + "x" + getFeedResolution(units) + " " + unitsName); |