KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > javax > swing > text > html > HTMLDocument.HTMLReader

javax.swing.text.html
Class HTMLDocument.HTMLReader

java.lang.Object
  extended by javax.swing.text.html.HTMLEditorKit.ParserCallback
      extended by javax.swing.text.html.HTMLDocument.HTMLReader
Enclosing class:
HTMLDocument
See Also:
Source Code

protected void addContent(char[] data,
                          int offs,
                          int length)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void addContent(char[] data,
                          int offs,
                          int length,
                          boolean generateImpliedPIfNecessary)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void addSpecialElement(HTML.Tag t,
                                 MutableAttributeSet a)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void blockClose(HTML.Tag t)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void blockOpen(HTML.Tag t,
                         MutableAttributeSet attr)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected MutableAttributeSet charAttr
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void flush()
           throws BadLocationException
See Also:
HTMLEditorKit.ParserCallback
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void handleComment(char[] data,
                          int pos)
See Also:
HTMLEditorKit.ParserCallback
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void handleEndOfLineString(String eol)
See Also:
HTMLEditorKit.ParserCallback
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void handleEndTag(HTML.Tag t,
                         int pos)
See Also:
HTMLEditorKit.ParserCallback
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void handleSimpleTag(HTML.Tag t,
                            MutableAttributeSet a,
                            int pos)
See Also:
HTMLEditorKit.ParserCallback
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void handleStartTag(HTML.Tag t,
                           MutableAttributeSet a,
                           int pos)
See Also:
HTMLEditorKit.ParserCallback
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void handleText(char[] data,
                       int pos)
See Also:
HTMLEditorKit.ParserCallback
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public HTMLDocument.HTMLReader(int offset)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1075]handle Html Tag
By Anonymous on 2005/05/27 04:09:54  Rate
HTMLDocument.HTMLReader ( 0 )   {  
 public final static int 
 /* these are the hash values of the String representation of HTML tags 
  
  
 Whilst parsing, the switch statement is useful... 
  
  
 public void handleSimpleTag ( HTML.Tag t, MutableAttributeSet a, int pos )   {  
 switch  ( t.toString (  ) .hashCode (  )  )   {  
 case BR_h : // < br / >  or  < br >  
 break; 
 case HR_h : //  < hr / >  or  < nr >  
 break; 
 case SPAN_h : //  < span >  and  < /span >  
 // oddly,  < span >  and  < /span >  are handled as simple tags 
 break; 
  } ; 
  }  
  
  
 public void handleEndTag ( HTML.Tag t, int pos )   {  
 switch  ( t.toString (  ) .hashCode (  )  )   {  
 case FORM_h : //  < /form >             break; 
 case STRONG_h : //  < /strong >  
 break; 
 case EM_h : //  < /em >  
 break; 
 case IMG_h : //  < /img >  
 break; 
 case A_h : //  < /a >  
 break; 
  } ; 
  }  
 */
 
  
  
 TEXTAREA_h = -1003243718, 
 STRONG_h = -891980137, 
 A_h = 97, 
 I_h = 105, 
 P_h = 112, 
 BR_h = 3152, 
 EM_h = 3240, 
 HR_h = 3338, 
 TD_h = 3696, 
 TR_h = 3710, 
 IMG_h = 104387, 
 FONT_h = 3148879, 
 FORM_h = 3148996, 
 SPAN_h = 3536714, 
 INPUT_h = 100358090;


public HTMLDocument.HTMLReader(int offset,
                               int popDepth,
                               int pushDepth,
                               HTML.Tag insertTag)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected Vector<DefaultStyledDocument.ElementSpec> parseBuffer
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void popCharacterStyle()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void preContent(char[] data)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void pushCharacterStyle()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void registerTag(HTML.Tag t,
                           HTMLDocument.HTMLReader.TagAction a)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void textAreaContent(char[] data)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags