KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > javax > swing > text > html > HTMLEditorKit.ParserCallback

javax.swing.text.html
Class HTMLEditorKit.ParserCallback

java.lang.Object
  extended by javax.swing.text.html.HTMLEditorKit.ParserCallback
Direct Known Subclasses:
HTMLDocument.HTMLReader
Enclosing class:
HTMLEditorKit
See Also:
Top Examples, Source Code, DocumentParser

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


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


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


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


public void handleError(String errorMsg,
                        int pos)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


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


[1314]_
By suneetha_n2000 { at } yahoo { dot } com on 2005/02/22 00:34:44  Rate
public class BadLocationException 
 extends Exception 
 This exception is to report bad locations within a document model  ( that is, attempts to reference a location that doesn't exist ) .  
  
  
 Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.  
 public BadLocationException ( String s, 
                             int offs )  
 Creates a new BadLocationException object. 
 Parameters: 
 s - a string indicating what was wrong with the arguments 
  
  
 offs - offset within the document that was requested  > = 0 
 handleText 
 public void handleText ( char [  ]  data, 
                        int pos )  
 


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


[355]Handle Html Start Tag
By wayoutuk { at } hotmail { dot } com on 2003/08/19 06:20:57  Rate
public void handleStartTag  ( HTML.Tag tag,MutableAttributeSet attributes,int position )   {  
         int newLevel=0; 
         if ( tag==HTML.Tag.DIV )  {  
             newLevel=1; 
              Enumeration e=attributes.getAttributeNames (  ) ; 
         while ( e.hasMoreElements (  )  )  {  
             Object name=e.nextElement (  ) ; 
             String value= ( String ) attributes.getAttribute ( name ) ; 
             if ( name==HTML.Attribute.CLASS && value=="flightBoxHead" )  {  
                 date_start=true; }  
             else if  ( name==HTML.Attribute.CLASS && value=="flightBoxInfo" )  {  
                  info_start=true; }  
             
          }      }  
         else return; 
         this.flag=true; 
        if  ( date_start&&info_start&&tag==HTML.Tag.STRONG )  
          {  this.flag=true; }  
         if  ( date_start&&info_start&&tag==HTML.Tag.BR )  
          {  this.flag=true; }           
           try  {  
             if  ( newLevel > this.level )  {  
                   for  ( int i=0;i < newLevel-this.level;i++ )  {  
                       out.write ( ""+lineBreaker+"" ) ; 
                   }  
                }  
               else if  ( newLevel < this.level )   {  
                   for  ( int i=0;i < this.level-newLevel;i++ )  {  
                       out.write  ( lineBreaker+""+lineBreaker ) ; 
                    }  
                
               out.write ( lineBreaker+"" ) ; 
                }  
               else  {  
                   out.write ( lineBreaker+"" ) ; 
                }  
               this.level=newLevel; 
               out.flush (  ) ;       
            }  
           catch  ( IOException e )  {  
               System.err.print ( e ) ; 
            }  
      } 


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


public HTMLEditorKit.ParserCallback()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object IMPLIED
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags