/[alph]/alph/org/nongnu/alph/xml/SpanSerializer.java
ViewVC logotype

Diff of /alph/org/nongnu/alph/xml/SpanSerializer.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by tjl, Wed Apr 16 03:44:23 2003 UTC revision 1.7 by benja, Fri Apr 25 14:29:19 2003 UTC
# Line 32  public class SpanSerializer { Line 32  public class SpanSerializer {
32                          "ts b=\""+s.getScrollId()+                          "ts b=\""+s.getScrollId()+
33                          "\" s=\""+s.offset()+                          "\" s=\""+s.offset()+
34                          "\" e=\""+(s.offset()+s.length())+"\"/>";                          "\" e=\""+(s.offset()+s.length())+"\"/>";
35            } else if(s0 instanceof PageSpan) {
36                PageSpan s = (PageSpan)s0;
37                return "<" + (namespace == null ? "" :
38                                                  namespace+":") +
39                            "ps b=\""+s.getScrollId()+
40                            "\" s=\""+s.offset()+
41                            "\" e=\""+(s.offset()+s.length())+"\"/>";
42            } else if(s0 instanceof PageImageSpan) {
43                PageImageSpan s = (PageImageSpan)s0;
44                java.awt.Point p = s.getLocation();
45                java.awt.Dimension d = s.getSize();
46                return "<" + (namespace == null ? "" :
47                                                  namespace+":") +
48                            "pis b=\""+s.getScrollId()+
49                            "\" p=\""+s.getPageIndex()+
50                            "\" x=\""+p.x+"\" y=\""+p.y+
51                            "\" width=\""+d.width+
52                            "\" height=\""+d.height+"\"/>";
53          } else {          } else {
54              throw new Error("Don't know how to serialize "+s0+" yet");              throw new Error("Don't know how to serialize "+s0+" yet");
55          }          }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26