01: /*
02: * Copyright 2006 Pentaho Corporation. All rights reserved.
03: * This software was developed by Pentaho Corporation and is provided under the terms
04: * of the Mozilla Public License, Version 1.1, or any later version. You may not use
05: * this file except in compliance with the license. If you need a copy of the license,
06: * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
07: * BI Platform. The Initial Developer is Pentaho Corporation.
08: *
09: * Software distributed under the Mozilla Public License is distributed on an "AS IS"
10: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
11: * the license for the specific language governing your rights and limitations.
12: *
13: * @created Oct 27, 2005
14: * @author dmoran
15: */
16:
17: package org.pentaho.designstudio.editors.actionsequence.pages;
18:
19: import org.eclipse.ui.forms.IManagedForm;
20: import org.eclipse.ui.forms.editor.FormEditor;
21: import org.eclipse.ui.forms.editor.FormPage;
22: import org.pentaho.designstudio.editors.actionsequence.ActionSequenceDocumentProvider;
23: import org.pentaho.designstudio.editors.actionsequence.pages.actions.ActionsMasterDetailBlock;
24: import org.pentaho.designstudio.messages.Messages;
25:
26: /**
27: * Page used to display the action definitions in an action sequence.
28: *
29: * @author Doug Moran
30: *
31: */
32: public class ProcessPage extends FormPage {
33: private ActionsMasterDetailBlock block;
34: protected ActionSequenceDocumentProvider actSeqDocProvider;
35:
36: /**
37: * Creates an action page.
38: * @param editor the form editor of which this page is a part.
39: * @param actSeqDocProvider the provider of the XML document.
40: */
41: public ProcessPage(FormEditor editor,
42: ActionSequenceDocumentProvider actSeqDocProvider) {
43: super (
44: editor,
45: "ActionsPage", Messages.getString("ActionPage.UI_PAGE_ACTIONS_TAB_LABEL")); //$NON-NLS-1$ //$NON-NLS-2$
46: this .actSeqDocProvider = actSeqDocProvider;
47: block = new ActionsMasterDetailBlock(this , actSeqDocProvider);
48: }
49:
50: /* (non-Javadoc)
51: * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
52: */
53: protected void createFormContent(IManagedForm managedForm) {
54: block.createContent(managedForm);
55: }
56:
57: /* (non-Javadoc)
58: * @see org.pentaho.designstudio.editors.actionsequence.pages.ActSeqBasePage#refreshPage(org.dom4j.Document)
59: */
60: protected void refresh() {
61: block.refresh();
62: }
63:
64: public boolean checkResourceReferences() {
65: return block.checkResourceReferences();
66: }
67:
68: public void fixResourceReferences() {
69: block.fixResourceReferences();
70: }
71:
72: public void setActive(boolean active) {
73: if (active) {
74: refresh();
75: }
76: super.setActive(active);
77: }
78: }
|