1 7 8 package javax.swing.text.html.parser; 9 10 import javax.swing.text.html.HTML ; 11 18 19 public class TagElement { 20 21 Element elem; 22 HTML.Tag htmlTag; 23 boolean insertedByErrorRecovery; 24 25 public TagElement ( Element elem ) { 26 this(elem, false); 27 } 28 29 public TagElement (Element elem, boolean fictional) { 30 this.elem = elem; 31 htmlTag = HTML.getTag(elem.getName()); 32 if (htmlTag == null) { 33 htmlTag = new HTML.UnknownTag (elem.getName()); 34 } 35 insertedByErrorRecovery = fictional; 36 } 37 38 public boolean breaksFlow() { 39 return htmlTag.breaksFlow(); 40 } 41 42 public boolean isPreformatted() { 43 return htmlTag.isPreformatted(); 44 } 45 46 public Element getElement() { 47 return elem; 48 } 49 50 public HTML.Tag getHTMLTag() { 51 return htmlTag; 52 } 53 54 public boolean fictional() { 55 return insertedByErrorRecovery; 56 } 57 } 58 59 60 61 62 | Popular Tags |