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.BasePaneRcthEditConsolePageContext;
19: import org.jfolder.console.base.context.BasePaneRcthTreeConsolePageContext;
20: import org.jfolder.console.base.context.BaseSubLeftRightConsolePageContext;
21:
22: //other classes
23:
24: public class DevelopWorkflowTemplateLeftRightContext extends
25: BaseSubLeftRightConsolePageContext {
26:
27: //
28: private int leftWidth = 0;
29: private int rightWidth = 0;
30:
31: private DevelopWorkflowTemplateLeftRightContext(
32: ConsolePageContext inCpc, int inLeftWidth, int inRightWidth) {
33:
34: super (inCpc);
35: this .leftWidth = inLeftWidth;
36: this .rightWidth = inRightWidth;
37: }
38:
39: protected final static DevelopWorkflowTemplateLeftRightContext newInstance(
40: ConsolePageContext inCpc, String inName, int inLeftWidth,
41: int inRightWidth) throws IOException {
42:
43: DevelopWorkflowTemplateLeftRightContext outValue = null;
44:
45: if (inCpc.isSubConsolePageContextPresent(inName)) {
46: Object o = inCpc.getSubConsolePageContext(inName);
47: outValue = (DevelopWorkflowTemplateLeftRightContext) o;
48: } else {
49: outValue = new DevelopWorkflowTemplateLeftRightContext(
50: inCpc, inLeftWidth, inRightWidth);
51: inCpc.registerSubConsolePageContext(inName, outValue);
52: }
53:
54: outValue.copyFromParent(inCpc);
55: outValue.createConsolePage(inCpc.getWriter(), inCpc
56: .getPageSetupContext());
57:
58: return outValue;
59: }
60:
61: //
62: public int getLeftWidth() {
63: return this .leftWidth;
64: }
65:
66: public void renderLeftPane() throws IOException {
67: BasePaneRcthTreeConsolePageContext.newInstance(this , "tree",
68: this .leftWidth, getColumnWidth(), 50, 50,
69: new String[0], new String[0],
70: new SubmitActionContext[0]);
71: }
72:
73: //
74: public int getRightWidth() {
75: return this .rightWidth;
76: }
77:
78: public void renderRightPane() throws IOException {
79: BasePaneRcthEditConsolePageContext.newInstance(this , "tag",
80: this .rightWidth, getColumnWidth(), 50, 50,
81: new String[0], new String[0],
82: new SubmitActionContext[0]);
83: }
84: //
85: }
|