01: package net.xoetrope.builder.editor;
02:
03: import net.xoetrope.xui.XPageManager;
04: import net.xoetrope.xui.XPageLoader;
05: import net.xoetrope.xui.XPageDisplay;
06: import net.xoetrope.xui.XProjectManager;
07:
08: /**
09: * Extends the page manager to provide some extra editing facilities
10: * <p> Copyright (c) Xoetrope Ltd., 2002-2003</p>
11: * <p> $Revision: 1.2 $</p>
12: * <p> License: see License.txt</p>
13: */
14: public class XEditorPageManager extends XPageManager {
15: public XEditorPageManager() {
16: }
17:
18: public XPageLoader getSecondaryLoader() {
19: return secondaryLoader;
20: }
21:
22: /**
23: * Set the interface to invoke when a page has been displayed.
24: * Reads the startup parameters Frames and UsesFrames to control loading of
25: * the frame set. If Frames is not specified it defaults to "frames", and if
26: * UsesFrames is not specified it defaults to "true".
27: * @param pgDisplay The XPageDisplay interface
28: */
29: public void setPageDisplay(XPageDisplay pgDisplay) {
30: pageDisplay = pgDisplay;
31: String framesetName = null;
32: String loadFrameset = null;
33: if (((XEditorProject) XProjectManager.getCurrentProject())
34: .hasProject()) {
35: try {
36: framesetName = XProjectManager.getCurrentProject()
37: .getStartupParam("Frames");
38: loadFrameset = XProjectManager.getCurrentProject()
39: .getStartupParam("UseFrames");
40: } catch (Exception ex) {
41: } finally {
42: if (framesetName == null)
43: framesetName = "frames";
44: if (loadFrameset == null)
45: loadFrameset = "true";
46: }
47: if (loadFrameset.equals("true"))
48: loadFrames(framesetName);
49: }
50: }
51:
52: }
|