Java Code Examples for javax.swing.text.html.CSS

The following examples show how to use javax.swing.text.html.CSS. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
private boolean isInvisible( final javax.swing.text.Element textElement ) {
  final HTMLDocument htmlDocument = (HTMLDocument) textElement.getDocument();
  final StyleSheet sheet = htmlDocument.getStyleSheet();
  final AttributeSet attr = computeStyle( textElement, sheet );
  final Object o = attr.getAttribute( CSS.Attribute.DISPLAY );
  if ( "none".equals( String.valueOf( o ) ) ) {
    return true;
  }
  final Object tag = findTag( textElement.getAttributes() );
  if ( tag == HTML.Tag.COMMENT ) {
    return true;
  }
  if ( tag == HTML.Tag.SCRIPT ) {
    return true;
  }
  if ( tag == HTML.Tag.HEAD ) {
    return true;
  }
  return false;
}