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.web.page;
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.NamesForSubCpc;
19: import org.jfolder.console.base.context.BaseSubUpDownConsolePageContext;
20:
21: //other classes
22:
23: public class DevelopWebPageUpDownContext extends
24: BaseSubUpDownConsolePageContext {
25:
26: private DevelopWebPageUpDownContext(ConsolePageContext inCpc,
27: String inLeftName, String inRightName) {
28:
29: super (inCpc, inLeftName, inRightName);
30: }
31:
32: protected final static DevelopWebPageUpDownContext newInstance(
33: ConsolePageContext inCpc, String inUpName, String inDownName)
34: throws IOException {
35:
36: DevelopWebPageUpDownContext outValue = null;
37:
38: if (inCpc.isSubConsolePageContextPresent(NamesForSubCpc
39: .getBaseSubUpDownCpcName(inUpName, inDownName))) {
40: //
41: Object o = inCpc.getSubConsolePageContext(NamesForSubCpc
42: .getBaseSubUpDownCpcName(inUpName, inDownName));
43: outValue = (DevelopWebPageUpDownContext) o;
44: } else {
45: outValue = new DevelopWebPageUpDownContext(inCpc, inUpName,
46: inDownName);
47: inCpc.registerSubConsolePageContext(NamesForSubCpc
48: .getBaseSubUpDownCpcName(inUpName, inDownName),
49: outValue);
50: }
51:
52: outValue.copyFromParent(inCpc);
53: outValue.createConsolePage(inCpc.getWriter(), inCpc
54: .getPageSetupContext());
55:
56: return outValue;
57: }
58:
59: //
60: public int getUpDownWidth() {
61: return 4;
62: }
63:
64: public void renderUpPane() throws IOException {
65: DevelopWebPagePaneViewContext.newInstance(this , 4,
66: getColumnWidth(), 50, 50, new String[0], new String[0],
67: new SubmitActionContext[0]);
68: }
69:
70: public void renderDownPane() throws IOException {
71: DevelopWebPageLeftRightContext.newInstance(this , 1, 3, "tree",
72: "tag");
73: }
74:
75: }
|