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.base;
09:
10: //base classes
11: import java.io.IOException;
12:
13: //project specific classes
14: import org.jfolder.common.web.template.CreationParameterContext;
15: import org.jfolder.console.base.ConsolePageContext;
16: import org.jfolder.console.base.NamesForSubCpc;
17:
18: //other classes
19:
20: public class SubCreationConceptTagConsolePageContext extends
21: BaseSubConsolePageContext {
22:
23: //
24:
25: protected SubCreationConceptTagConsolePageContext(String inName,
26: ConsolePageContext inCpc) {
27:
28: //
29: super (inCpc, inName);
30: setColumnWidth(inCpc.getColumnWidth());
31:
32: }
33:
34: public final static SubCreationConceptTagConsolePageContext newInstance(
35: ConsolePageContext inCpc) throws IOException {
36:
37: SubCreationConceptTagConsolePageContext outValue = null;
38:
39: if (inCpc.isSubConsolePageContextPresent(NamesForSubCpc
40: .getCreationOfConceptTagCpcName())) {
41: //
42: Object o = inCpc.getSubConsolePageContext(NamesForSubCpc
43: .getCreationOfConceptTagCpcName());
44: outValue = (SubCreationConceptTagConsolePageContext) o;
45: } else {
46: outValue = new SubCreationConceptTagConsolePageContext(
47: NamesForSubCpc.getCreationOfConceptTagCpcName(),
48: inCpc);
49: inCpc.registerSubConsolePageContext(NamesForSubCpc
50: .getCreationOfConceptTagCpcName(), outValue);
51: }
52: //outValue.setContentWrap(false);
53: //outValue.setPadding(0);
54:
55: outValue.copyFromParent(inCpc);
56: //
57: inCpc.getConsolePageSession()
58: .pushToggleLinkDontRecordThisBranch();
59: outValue.createConsolePage(inCpc.getWriter(), inCpc
60: .getPageSetupContext());
61: inCpc.getConsolePageSession().popToggleLink();
62: //
63:
64: return outValue;
65: }
66:
67: //
68: public void renderConsolePage() throws IOException {
69: //HashMap divStyles = new HashMap();
70: //divStyles.put("overflow", "visible");
71: //divStyles.put("width", "" + 2*(getColumnWidth()));
72: //
73: //divStyles.put("height", "" + 550);
74: //divStyles.put("border-width", "" + 1);
75: //divStyles.put("border-color", "#333333");
76: //divStyles.put("border-style", "solid");
77: //divStyles.put("background-color", "#EEEEEE");
78: //divStyles.put("z-index", "100");
79: //
80: //HashMap divAttrs = new HashMap();
81: //divAttrs.put("style", XMLHelper.fromStylesToAttr(divStyles));
82: //
83: //printAndIndent("<div " + XMLHelper.convertAttrs(divAttrs) + ">");
84: //
85: CreationParameterContext.renderConceptTagCreationObject(this ,
86: getConsolePageSession());
87: //
88: //revertAndPrint("</div>");
89: }
90:
91: }
|