1 17 18 package org.objectweb.jac.aspects.gui.web; 19 20 import java.io.IOException ; 21 import java.io.PrintWriter ; 22 import org.apache.log4j.Logger; 23 import org.objectweb.jac.aspects.gui.*; 24 25 28 public abstract class AbstractPage extends AbstractView 29 implements WindowView, HTMLViewer 30 { 31 static Logger logger = Logger.getLogger("web"); 32 33 34 protected View view; 35 36 boolean newWindow = false; 37 38 public AbstractPage(ViewFactory factory, DisplayContext context, 39 View view, boolean newWindow) 40 { 41 super(factory,context); 42 view.setParentView(this); 43 this.view = view; 44 this.newWindow = newWindow; 45 } 46 47 public AbstractPage(View view, boolean newWindow) { 48 super(); 49 view.setParentView(this); 50 this.view = view; 51 this.newWindow = newWindow; 52 } 53 54 public void close(boolean validate) { 55 if (!newWindow) { 56 logger.debug("closing "+this); 57 super.close(validate); 58 view.close(validate); 59 } else { 60 logger.debug("NOT closing "+this); 61 } 62 } 63 64 public View getContentView() { 66 return view; 67 } 68 69 71 public void genHTML(PrintWriter out) throws IOException { 72 genPage(out); 73 } 74 75 } 76 | Popular Tags |