|
|||||||||||
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.def.DefPainterFactory
Factory Class for creating the Default-Painters.
Important:
The default painter must be registered in your application at startup. The
best place to do this is in your FrontControllerServlet init() method.
public void init() throws ServletException { super.init(); // Register all PainterFactories PainterFactory.registerApplicationPainter(getServletContext(), DefPainterFactory.instance()); PainterFactory.registerApplicationPainter(getServletContext(), HtmlPainterFactory.instance()); // other painters go here ... // 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 | |
DefPainterFactory()
Constructor |
Method Summary | |
protected ResourceMap |
createResourceMap()
Creates the Painters Resource Map |
protected FramePainter |
doCreateFramePainter(PainterContext painterContext,
Control ctrl)
Creates a frame painter for the control specified in the argument. |
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 the unique Id for this painter factory |
static PainterFactory |
instance()
Deprecated. use constructor to create a new instance |
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 DefPainterFactory()
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 FramePainter doCreateFramePainter(PainterContext painterContext, Control ctrl)
PainterFactory
Note: This method will be called from the PainterFactory!
doCreateFramePainter
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 frame painter should
be created
PainterFactory.doCreateFramePainter(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 |