01: /*
02: * JFolder, Copyright 2001-2006 Gary Steinmetz
03: *
04: * Distributable under LGPL license.
05: * See terms of license at gnu.org.
06: */
07:
08: package org.jfolder.console.web.develop.workflow.template;
09:
10: //base classes
11: import java.io.IOException;
12: import java.util.HashMap;
13:
14: //project specific classes
15: import org.jfolder.common.utils.xml.XMLHelper;
16: import org.jfolder.common.web.template.SubmitActionContext;
17: import org.jfolder.console.base.ConsolePageContext;
18: import org.jfolder.console.base.context.BaseSubUpDownConsolePageContext;
19:
20: //other classes
21:
22: public class DevelopWorkflowTemplateUpDownContext extends
23: BaseSubUpDownConsolePageContext {
24:
25: private DevelopWorkflowTemplateUpDownContext(
26: ConsolePageContext inCpc) {
27:
28: super (inCpc);
29: }
30:
31: protected final static DevelopWorkflowTemplateUpDownContext newInstance(
32: ConsolePageContext inCpc, String inName) throws IOException {
33:
34: DevelopWorkflowTemplateUpDownContext outValue = null;
35:
36: if (inCpc.isSubConsolePageContextPresent(inName)) {
37: Object o = inCpc.getSubConsolePageContext(inName);
38: outValue = (DevelopWorkflowTemplateUpDownContext) o;
39: } else {
40: outValue = new DevelopWorkflowTemplateUpDownContext(inCpc);
41: inCpc.registerSubConsolePageContext(inName, outValue);
42: }
43:
44: outValue.copyFromParent(inCpc);
45: outValue.createConsolePage(inCpc.getWriter(), inCpc
46: .getPageSetupContext());
47:
48: return outValue;
49: }
50:
51: //
52: public int getUpDownWidth() {
53: return 4;
54: }
55:
56: public void renderUpPane() throws IOException {
57: DevelopWorkflowTemplatePaneGraphContext.newInstance(this ,
58: "graph", getUpDownWidth(), getColumnWidth(), 50, 50,
59: new String[0], new String[0],
60: new SubmitActionContext[0]);
61: }
62:
63: public void renderDownPane() throws IOException {
64: DevelopWorkflowTemplateLeftRightContext.newInstance(this ,
65: "left-right", 1, 3);
66: }
67:
68: }
|