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.ActionIfStatement;
18: import org.pentaho.designstudio.editors.actionsequence.pages.ActionSequenceLabelProvider;
19:
20: public class IfContent extends FlowContent {
21:
22: ActionIfStatement actionIf;
23:
24: static final AbstractIOElement[] NO_PARAMS = new AbstractIOElement[0];
25:
26: public IfContent(ActionIfStatement ifStatement, int indentLevel) {
27: super (indentLevel);
28: actionIf = ifStatement;
29: }
30:
31: public Image getImage() {
32: return null;
33: }
34:
35: public String getName() {
36: return ActionSequenceLabelProvider.getText(actionIf);
37: }
38:
39: public AbstractIOElement[] getParameters() {
40: return NO_PARAMS;
41: }
42:
43: public String getDescription() {
44: return getName();
45: }
46:
47: public boolean equals(Object arg0) {
48: return (arg0 != null) && (arg0.getClass() == getClass())
49: && ((IfContent) arg0).actionIf.equals(actionIf);
50: }
51:
52: public Object getData() {
53: return actionIf;
54: }
55: }
|