Document d = getElement().getDocument(); if (d instanceof HTMLDocument) return ((HTMLDocument) d).getStyleSheet(); else return null;
HTMLDocument doc = (HTMLDocument) getDocument(); return doc.getStyleSheet();
  protected StyleSheet getStyleSheet()  {    Document d = getElement().getDocument();    if (d instanceof HTMLDocument)      return ((HTMLDocument) d).getStyleSheet();    else      return null;  }  