poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject svn commit: r1144661 - /poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor.java
Date Sat, 09 Jul 2011 12:10:10 GMT
Author: sergey
Date: Sat Jul  9 12:10:09 2011
New Revision: 1144661

URL: http://svn.apache.org/viewvc?rev=1144661&view=rev
Log:
add toString() and isEmpty() to ShadingDescriptor

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor.java?rev=1144661&r1=1144660&r2=1144661&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor.java Sat
Jul  9 12:10:09 2011
@@ -60,4 +60,20 @@ public final class ShadingDescriptor
   {
     return super.clone();
   }
+
+    public boolean isEmpty()
+    {
+        return _info == 0;
+    }
+
+    @Override
+    public String toString()
+    {
+        if ( isEmpty() )
+            return "[SHD] EMPTY]";
+
+        return "[SHD] (cvFore: " + _icoFore.getShortValue( _info )
+                + "; cvBack: " + _icoBack.getShortValue( _info ) + "; iPat: "
+                + _ipat.getShortValue( _info ) + ")";
+    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message