add toString() and isEmpty() to ShadingDescriptor

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1144661 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sergey Vladimirov 2011-07-09 12:10:09 +00:00
parent 83f87437c0
commit de7cdb2540

View File

@ -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 ) + ")";
}
}