01: /*
02: * The contents of this file are subject to the terms of the Common
03: * Development and Distribution License (the License). You may not use this
04: The contents of this file are subject to the terms of either the GNU
05: General Public License Version 2 only ("GPL") or the Common
06: Development and Distribution License("CDDL") (collectively, the
07: "License"). You may not use this file except in compliance with the
08: License. You can obtain a copy of the License at
09: http://www.netbeans.org/cddl-gplv2.html
10: or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
11: specific language governing permissions and limitations under the
12: License. When distributing the software, include this License Header
13: Notice in each file and include the License file at
14: nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
15: particular file as subject to the "Classpath" exception as provided
16: by Sun in the GPL Version 2 section of the License file that
17: accompanied this code. If applicable, add the following below the
18: License Header, with the fields enclosed by brackets [] replaced by
19: your own identifying information:
20: "Portions Copyrighted [year] [name of copyright owner]"
21: Contributor(s):
22: *
23: * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved
24: If you wish your version of this file to be governed by only the CDDL
25: or only the GPL Version 2, indicate your decision by adding
26: "[Contributor] elects to include this software in this distribution
27: under the [CDDL or GPL Version 2] license." If you do not indicate a
28: single choice of license, a recipient has the option to distribute
29: your version of this file under either the CDDL, the GPL Version 2 or
30: to extend the choice of license to its licensees as provided above.
31: However, if you add GPL Version 2 code and therefore, elected the GPL
32: Version 2 license, then the option applies only if the new code is
33: made subject to such option by the copyright holder.
34: *
35: */
36:
37: package org.netbeans.modules.etl.ui.palette;
38:
39: import org.openide.nodes.AbstractNode;
40: import org.openide.nodes.Children;
41: import org.openide.util.lookup.Lookups;
42:
43: /**
44: *
45: * @author nithya
46: */
47: public class OperatorNode extends AbstractNode {
48:
49: private Operator model;
50:
51: /**
52: * Creates a new instance of InstrumentNode
53: * @param key
54: */
55: public OperatorNode(Operator key) {
56: super (Children.LEAF, Lookups.fixed(new Object[] { key }));
57: this .model = key;
58: setIconBaseWithExtension(key.getImage());
59: setName(key.getName());
60: }
61:
62: /**
63: *
64: * @return model
65: */
66: public Operator getOperator() {
67: return this.model;
68: }
69: }
|