Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

Page Class Reference

List of all members.

Public Member Functions

 Page (HttpServletRequest req, HttpServletResponse res, PrintWriter pw)
void p (String str)
void top (String s)
void bottom ()
void pageLink (String caption, String link)
void pageLink (String caption, String link, String extlink, String params)
void pageLink (String caption, String link, boolean islink, String params)

Public Attributes

HttpServletRequest req
HttpServletResponse res

Static Public Attributes

static final String STATIC_PATH = "/"
static final String PATH = "/"
static final String INDEX = "Home"

Package Attributes

PrintWriter pw
String uri

Detailed Description

Definition at line 5 of file Page.java.


Constructor & Destructor Documentation

Page::Page HttpServletRequest  req,
HttpServletResponse  res,
PrintWriter  pw
[inline]
 

Definition at line 16 of file Page.java.

References uri.

00017   {
00018           this.req = req;
00019           this.res = res;
00020           this.pw = pw;
00021           uri = req.getRequestURI();
00022   }


Member Function Documentation

void Page::bottom  )  [inline]
 

Definition at line 55 of file Page.java.

References p().

00056   {
00057     p(
00058 "\n"+
00059 "</td>\n"+
00060 "</tr>\n"+
00061 "</table>\n"+
00062 "</body>\n"+
00063 "</html>\n"+
00064 ""
00065     );
00066   }

void Page::p String  str  )  [inline]
 

Definition at line 24 of file Page.java.

References pw.

00025   {
00026     pw.print(str);
00027   }

void Page::pageLink String  caption,
String  link,
boolean  islink,
String  params
[inline]
 

Definition at line 83 of file Page.java.

References PATH, and pw.

00084   {
00085     if (islink) 
00086       pw.println("<p><a href=\"" + PATH + link + "\">" + caption + "</a></p>"); 
00087     else 
00088       pw.println("<p" + params + ">" + caption + "</p>"); 
00089   } 

void Page::pageLink String  caption,
String  link,
String  extlink,
String  params
[inline]
 

Definition at line 73 of file Page.java.

References INDEX, pageLink(), PATH, and uri.

00074   {
00075     int l = PATH.length() + link.length();
00076     pageLink(caption, link + extlink, 
00077              ((uri.length() < l
00078                || !uri.substring(0,l).equals(PATH + link))
00079               && !(link.equals(INDEX) && uri.equals(PATH))),
00080              params);
00081   }

void Page::pageLink String  caption,
String  link
[inline]
 

Definition at line 68 of file Page.java.

00069   {
00070     pageLink(caption,link,"","");
00071   }

void Page::top String  s  )  [inline]
 

Definition at line 29 of file Page.java.

References p(), and pageLink().

00030   {
00031     p(
00032 "<html>\n"+
00033 "<head><title>" + s + "</title></head>\n"+
00034 "<body>\n"+
00035 "<table cellpadding=3 cellspacing=0 border=0>\n"+
00036 "<tr>\n"+
00037 "<td colspan=2 bgcolor=\"#003366\" align=left><font size=5 color=white>Doctor Database</font></td></td>\n"+
00038 "</tr>\n"+
00039 "<tr>\n"+
00040 "<td bgcolor=\"#99ccff\" valign=top>\n"+
00041 ""
00042     );
00043     pageLink("Home", "Home");
00044     pageLink("Appointments", "Appointments");
00045     pageLink("Patients", "Patients");
00046     pageLink("Table Editor", "Tables");
00047     pageLink("Browsable Source", "../dox/hierarchy.html");    
00048     p(
00049 "</td>\n"+
00050 "<td>\n"+
00051 ""
00052     );
00053   }


Member Data Documentation

final String Page::INDEX = "Home" [static]
 

Definition at line 9 of file Page.java.

final String Page::PATH = "/" [static]
 

Definition at line 8 of file Page.java.

PrintWriter Page::pw [package]
 

Definition at line 13 of file Page.java.

HttpServletRequest Page::req
 

Definition at line 11 of file Page.java.

HttpServletResponse Page::res
 

Definition at line 12 of file Page.java.

final String Page::STATIC_PATH = "/" [static]
 

Definition at line 7 of file Page.java.

String Page::uri [package]
 

Definition at line 14 of file Page.java.


The documentation for this class was generated from the following file:
Generated on Mon Mar 6 23:34:35 2006 by  doxygen 1.4.4