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.widgets.flowtable;
14:
15: import org.eclipse.swt.graphics.Image;
16: import org.pentaho.actionsequence.dom.AbstractIOElement;
17: import org.pentaho.actionsequence.dom.ActionSequenceDocument;
18: import org.pentaho.actionsequence.dom.ActionSequenceOutput;
19: import org.pentaho.designstudio.editors.actionsequence.pages.ActionSequenceLabelProvider;
20: import org.pentaho.designstudio.messages.Messages;
21:
22: public class OutputContent extends FlowContent {
23:
24: ActionSequenceDocument document;
25:
26: public OutputContent(ActionSequenceDocument document) {
27: super (0);
28: this .document = document;
29: }
30:
31: public Image getImage() {
32: return null;
33: }
34:
35: public String getName() {
36: return Messages
37: .getString("OutputContent.ACTION_SEQUENCE_OUTPUTS"); //$NON-NLS-1$
38: }
39:
40: public AbstractIOElement[] getParameters() {
41: return document.getInputs();
42: }
43:
44: public String getDescription() {
45: String desc = getName();
46: ActionSequenceOutput[] actionSequenceOutputs = document
47: .getOutputs();
48: for (int i = 0; i < actionSequenceOutputs.length; ++i) {
49: desc += '\n' + ActionSequenceLabelProvider
50: .getText(actionSequenceOutputs[i]);
51: }
52: return desc;
53: }
54:
55: public boolean equals(Object arg0) {
56: return (arg0 != null) && (arg0.getClass() == getClass())
57: && (((OutputContent) arg0).document == document);
58: }
59:
60: public Object getData() {
61: return document;
62: }
63:
64: }
|