|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.ui.painter.PainterFactory com.cc.framework.ui.painter.html.HtmlPainterFactory
Factory for creating HTML-Painter.
If new HTML painters are developed which belongs to the
painter.html
package they should be registered in this Painter.
Therefore add the new class in the doCreatePainter() method or create a new
subclass and override the doCreatePainter() method an register the new class
at startup of the application. If you create other painters which do not
belong to this package create a new package an generate an new PainterFactory
class which extends the PainterFactory base class. In your application
register the PainterFactory at startup. A new painter normally serves a new
GUI layout.
Note: If you want to use the HTMLPainter it must be registered at startup. The best place is in your FrontControllerServlet init() method.
public void init() throws ServletException { super.init(); // Register all PainterFactories PainterFactory.registerApplicationPainter(getServletContext(), HtmlPainterFactory.instance()); PainterFactory.registerApplicationPainter(getServletContext(), DefPainterFactory.instance()); // Log the information about the system-environment. if (log.isInfoEnabled()) { log.info(createApplicationInfo()); log.info(HttpUtil.createEnvironmentInfo()); log.info(HttpUtil.createContextInfo(getServletContext())); } }
Field Summary | |
private static long |
serialVersionUID
Serial Version UID |
Fields inherited from class com.cc.framework.ui.painter.PainterFactory |
|
Constructor Summary | |
HtmlPainterFactory()
Constructor for HtmlPainterFactory |
Method Summary | |
protected ResourceMap |
createResourceMap()
Creates the Painters Resource Map |
protected void |
doCreateHeaderIncludes(javax.servlet.jsp.JspWriter writer)
Creates all Include-Tags in the HTML-Pages which are necessary for the Framework to work well (css, javascripts, ...). |
protected ControlPainter |
doCreatePainter(PainterContext painterContext,
Control ctrl)
Creates a painter for the control specified in the argument. |
java.lang.String |
getFactoryId()
Returns a unique Id for the Factory |
static PainterFactory |
instance()
Returns the singleton instance of this class |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final long serialVersionUID
Constructor Detail |
public HtmlPainterFactory()
Method Detail |
protected ResourceMap createResourceMap()
PainterFactory
createResourceMap
in class PainterFactory
PainterFactory.createResourceMap()
public java.lang.String getFactoryId()
getFactoryId
in class PainterFactory
public static PainterFactory instance()
protected ControlPainter doCreatePainter(PainterContext painterContext, Control ctrl)
PainterFactory
Note: This method will be called from the PainterFactory!
doCreatePainter
in class PainterFactory
painterContext
- The context of the JSP page where the control is defined. So
it is possible for the painter to get the ActionMappings if
required. The ActionMappings are necessary for the generation
of hyperlinks.ctrl
- The instance of the control for which a painter should be
created
PainterFactory.doCreatePainter(com.cc.framework.ui.painter.PainterContext, com.cc.framework.ui.control.Control)
protected void doCreateHeaderIncludes(javax.servlet.jsp.JspWriter writer) throws java.io.IOException
PainterFactory
doCreateHeaderIncludes
in class PainterFactory
writer
- The JspWriter
java.io.IOException
- If an input or output exception occurredPainterFactory.doCreateHeaderIncludes(javax.servlet.jsp.JspWriter)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |