KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > cyberneko > html > HTMLEventInfo


1 /*
2  * (C) Copyright 2002-2005, Andy Clark. All rights reserved.
3  *
4  * This file is distributed under an Apache style license. Please
5  * refer to the LICENSE file for specific details.
6  */

7
8 package org.cyberneko.html;
9
10 /**
11  * This interface is used to pass augmentated information to the
12  * application through the XNI pipeline.
13  *
14  * @author Andy Clark
15  *
16  * @version $Id: HTMLEventInfo.java,v 1.4 2005/02/14 03:56:54 andyc Exp $
17  */

18 public interface HTMLEventInfo {
19
20     //
21
// HTMLEventInfo methods
22
//
23

24     // location information
25

26     /** Returns the line number of the beginning of this event.*/
27     public int getBeginLineNumber();
28
29     /** Returns the column number of the beginning of this event.*/
30     public int getBeginColumnNumber();
31
32     /** Returns the line number of the end of this event.*/
33     public int getEndLineNumber();
34
35     /** Returns the column number of the end of this event.*/
36     public int getEndColumnNumber();
37
38     // other information
39

40     /** Returns true if this corresponding event was synthesized. */
41     public boolean isSynthesized();
42
43     /**
44      * Synthesized infoset item.
45      *
46      * @author Andy Clark
47      */

48     public static class SynthesizedItem
49         implements HTMLEventInfo {
50
51         //
52
// HTMLEventInfo methods
53
//
54

55         // location information
56

57         /** Returns the line number of the beginning of this event.*/
58         public int getBeginLineNumber() {
59             return -1;
60         } // getBeginLineNumber():int
61

62         /** Returns the column number of the beginning of this event.*/
63         public int getBeginColumnNumber() {
64             return -1;
65         } // getBeginColumnNumber():int
66

67         /** Returns the line number of the end of this event.*/
68         public int getEndLineNumber() {
69             return -1;
70         } // getEndLineNumber():int
71

72         /** Returns the column number of the end of this event.*/
73         public int getEndColumnNumber() {
74             return -1;
75         } // getEndColumnNumber():int
76

77         // other information
78

79         /** Returns true if this corresponding event was synthesized. */
80         public boolean isSynthesized() {
81             return true;
82         } // isSynthesized():boolean
83

84         //
85
// Object methods
86
//
87

88         /** Returns a string representation of this object. */
89         public String JavaDoc toString() {
90             return "synthesized";
91         } // toString():String
92

93     } // class SynthesizedItem
94

95 } // interface HTMLEventInfo
96
Popular Tags