public static final Box getBox(View v)
    {
        if (v instanceof CSSBoxView) return getBox((CSSBoxView) v);

        AttributeSet attr = v.getAttributes();
        if (attr == null)
        {
            throw new NullPointerException("AttributeSet of " + v.getClass().getName() + "@"
                                + Integer.toHexString(v.hashCode()) + " is set to NULL.");
        }
        Object obj = attr.getAttribute(Constants.ATTRIBUTE_BOX_REFERENCE);
        if (obj != null && obj instanceof Box)
        {
            return (Box) obj;
        }
        else
        {
            throw new IllegalArgumentException("Box reference in attributes is not an instance of a Box.");
        }

    }
public static final Box getBox ( View v ) { if ( v instanceof CSSBoxView ) return getBox ( ( CSSBoxView ) v ) ; AttributeSet attr = v . getAttributes ( ) ; if ( attr == null ) { throw new NullPointerException ( "AttributeSet of " + v . getClass ( ) . getName ( ) + "@" + Integer . toHexString ( v . hashCode ( ) ) + " is set to NULL." ) ; } Object obj = attr . getAttribute ( Constants . ATTRIBUTE_BOX_REFERENCE ) ; if ( obj != null && obj instanceof Box ) { return ( Box ) obj ; } else { throw new IllegalArgumentException ( "Box reference in attributes is not an instance of a Box." ) ; } }
Gets the box reference from properties.

@param v
just a view.
@return the box set in properties, if there is one.