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: package org.pentaho.designstudio.editors.actionsequence.pages.actions.details.scheduling;
14:
15: import org.eclipse.swt.layout.GridData;
16: import org.eclipse.swt.layout.GridLayout;
17: import org.eclipse.swt.widgets.Composite;
18: import org.pentaho.actionsequence.dom.ActionSequenceDocument;
19: import org.pentaho.actionsequence.dom.actions.AbstractJobSchedulerAction;
20: import org.pentaho.actionsequence.dom.actions.StartScheduledJobAction;
21: import org.pentaho.designstudio.controls.ActionInputCombo;
22: import org.pentaho.designstudio.controls.NewActionInputCombo;
23: import org.pentaho.designstudio.controls.WidgetFactory;
24: import org.pentaho.designstudio.editors.actionsequence.pages.actions.details.ActionDetailsPage;
25: import org.pentaho.designstudio.messages.Messages;
26:
27: /**
28: * Abstract template describing the action definition used to perform job related scheduler actions.
29: *
30: * @author Angelo Rodriguez
31: */
32: public abstract class AbstractScheduledJobDetailsPage extends
33: ActionDetailsPage {
34:
35: NewActionInputCombo jobNameComboBox;
36:
37: /* (non-Javadoc)
38: * @see org.pentaho.designstudio.editors.actionsequence.pages.actions.templates.ActionDefinitionTemplate#getComponentClassName()
39: */
40: public String getComponentName() {
41: return StartScheduledJobAction.COMPONENT_NAME;
42: }
43:
44: public void createDetailsComposite(Composite parent) {
45: Composite actionConfigComposite = parent;
46:
47: actionConfigComposite.setLayout(new GridLayout());
48:
49: WidgetFactory
50: .createLabel(
51: actionConfigComposite,
52: Messages
53: .getString("AbstractScheduledJobDetailsPage.UI_JOB_NAME_LABEL")).setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); //$NON-NLS-1$
54: jobNameComboBox = new NewActionInputCombo(
55: actionConfigComposite, new GridData(
56: GridData.FILL_HORIZONTAL));
57: }
58:
59: public void refresh() {
60: super.refresh();
61: jobNameComboBox.setTargetInput(actionDefinition,
62: AbstractJobSchedulerAction.JOB_NAME,
63: ActionSequenceDocument.STRING_TYPE);
64: }
65:
66: }
|