Object p = getResolveParent(); if (p != null && p instanceof AttributeSet) return (((AttributeSet)p).getAttribute(name));
AttributeSet p = getResolveParent(); if (p != null) return p.getAttribute(name);
  public Object getAttribute(Object name)  {    Object val = tab.get(name);    if (val != null)       return val;    Object p = getResolveParent();    if (p != null && p instanceof AttributeSet)      return (((AttributeSet)p).getAttribute(name));    return null;  }