KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ca > mcgill > sable > graph > model > Element


1 /* Soot - a J*va Optimization Framework
2  * Copyright (C) 2005 Jennifer Lhotak
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */

19
20
21 package ca.mcgill.sable.graph.model;
22
23 import org.eclipse.ui.views.properties.IPropertyDescriptor;
24 import org.eclipse.ui.views.properties.IPropertySource;
25 import java.beans.*;
26
27 public class Element implements IPropertySource {
28
29     public static final String JavaDoc GRAPH_CHILD = "graph child";
30     public static final String JavaDoc COMPLEX_CHILD = "complex child";
31     public static final String JavaDoc INPUTS = "inputs";
32     public static final String JavaDoc OUTPUTS = "outputs";
33     public static final String JavaDoc DATA = "data";
34     public static final String JavaDoc COMPLEX_CHILD_ADDED = "complex child added";
35     public static final String JavaDoc EDGE_LABEL = "edge label";
36     
37     public Element() {
38         super();
39     }
40     
41     protected PropertyChangeSupport listeners = new PropertyChangeSupport(this);
42     
43     public void addPropertyChangeListener(PropertyChangeListener l){
44         listeners.addPropertyChangeListener(l);
45     }
46     
47     protected void firePropertyChange(String JavaDoc name, Object JavaDoc oldVal, Object JavaDoc newVal){
48         listeners.firePropertyChange(name, oldVal, newVal);
49     }
50     
51     protected void firePropertyChange(String JavaDoc name, Object JavaDoc newVal){
52         firePropertyChange(name, null, newVal);
53     }
54     
55     public void removePropertyChangeListener(PropertyChangeListener l){
56         listeners.removePropertyChangeListener(l);
57     }
58     
59     public void fireStructureChange(String JavaDoc name, Object JavaDoc newVal){
60         firePropertyChange(name, null, newVal);
61     }
62
63     /* (non-Javadoc)
64      * @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue()
65      */

66     public Object JavaDoc getEditableValue() {
67         return null;
68     }
69
70     /* (non-Javadoc)
71      * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
72      */

73     public IPropertyDescriptor[] getPropertyDescriptors() {
74         return null;
75     }
76
77     /* (non-Javadoc)
78      * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
79      */

80     public Object JavaDoc getPropertyValue(Object JavaDoc id) {
81         return null;
82     }
83
84     /* (non-Javadoc)
85      * @see org.eclipse.ui.views.properties.IPropertySource#isPropertySet(java.lang.Object)
86      */

87     public boolean isPropertySet(Object JavaDoc id) {
88         return false;
89     }
90
91     /* (non-Javadoc)
92      * @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object)
93      */

94     public void resetPropertyValue(Object JavaDoc id) {
95     }
96
97     /* (non-Javadoc)
98      * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object)
99      */

100     public void setPropertyValue(Object JavaDoc id, Object JavaDoc value) {
101     }
102
103 }
104
Popular Tags