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:
13: //project specific classes
14: import org.jfolder.common.web.template.SubmitActionContext;
15: import org.jfolder.console.base.ConsolePageContext;
16: import org.jfolder.console.base.context.BasePanelessGraphContext;
17: import org.jfolder.console.base.context.BaseSubPaneBarConsolePageContext;
18: import org.jfolder.console.base.context.BaseSubPaneConsolePageContext;
19:
20: //other classes
21:
22: public class DevelopWorkflowTemplatePaneGraphContext extends
23: BaseSubPaneConsolePageContext {
24:
25: //
26: //private int barHeight = 0;
27: //private int barColumnWidth = 0;
28: //private String barIconUrls[] = null;
29: //private String barIconLabels[] = null;
30: //private SubmitActionContext barSac[] = null;
31:
32: //protected BasePaneBarConsolePageContext(ConsolePageContext inCpc,
33: // int inHeight, int inColumnWidth, String inIconUrls[],
34: // String inIconLabels[], SubmitActionContext inSacs[]) {
35: private DevelopWorkflowTemplatePaneGraphContext(
36: ConsolePageContext inCpc, String inName, int inColumnCount,
37: int inHeight, int inBarHeight, int inBarColumnWidth,
38: String inBarIconUrls[], String inBarIconLabels[],
39: SubmitActionContext inBarSac[]) {
40:
41: super (inCpc, inName, inColumnCount, inHeight, inBarHeight,
42: inBarColumnWidth, inBarIconUrls, inBarIconLabels,
43: inBarSac);
44: //
45: //
46: //this.barHeight = inBarHeight;
47: //this.barColumnWidth = inBarColumnWidth;
48: //this.barIconUrls = inBarIconUrls;
49: //this.barIconLabels = inBarIconLabels;
50: //this.barSac = inBarSac;
51: }
52:
53: public final static DevelopWorkflowTemplatePaneGraphContext newInstance(
54: ConsolePageContext inCpc, String inName, int inColumnCount,
55: int inHeight, int inBarHeight, int inBarColumnWidth,
56: String inBarIconUrls[], String inBarIconLabels[],
57: SubmitActionContext inBarSac[]) throws IOException {
58:
59: DevelopWorkflowTemplatePaneGraphContext outValue = null;
60:
61: if (inCpc.isSubConsolePageContextPresent(inName)) {
62: Object o = inCpc.getSubConsolePageContext(inName);
63: outValue = (DevelopWorkflowTemplatePaneGraphContext) o;
64: } else {
65: outValue = new DevelopWorkflowTemplatePaneGraphContext(
66: inCpc, inName, inColumnCount, inHeight,
67: inBarHeight, inBarColumnWidth, inBarIconUrls,
68: inBarIconLabels, inBarSac);
69: inCpc.registerSubConsolePageContext(inName, outValue);
70: }
71:
72: outValue.copyFromParent(inCpc);
73: outValue.createConsolePage(inCpc.getWriter(), inCpc
74: .getPageSetupContext());
75:
76: return outValue;
77: }
78:
79: //
80: //protected void getUpContent() throws IOException {
81: // BasePaneBarConsolePageContext.newInstance(this, "graph-pane",
82: // this.barHeight, this.barColumnWidth, this.barIconUrls,
83: // this.barIconLabels, this.barSac);
84: //}
85: protected void getDownContent() throws IOException {
86: BasePanelessGraphContext.newInstance(this , "content");
87: }
88: }
|