001: /* Soot - a J*va Optimization Framework
002: * Copyright (C) 2005 Jennifer Lhotak
003: *
004: * This library is free software; you can redistribute it and/or
005: * modify it under the terms of the GNU Lesser General Public
006: * License as published by the Free Software Foundation; either
007: * version 2.1 of the License, or (at your option) any later version.
008: *
009: * This library is distributed in the hope that it will be useful,
010: * but WITHOUT ANY WARRANTY; without even the implied warranty of
011: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012: * Lesser General Public License for more details.
013: *
014: * You should have received a copy of the GNU Lesser General Public
015: * License along with this library; if not, write to the
016: * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
017: * Boston, MA 02111-1307, USA.
018: */
019:
020: package ca.mcgill.sable.graph.model;
021:
022: import org.eclipse.ui.views.properties.IPropertyDescriptor;
023: import org.eclipse.ui.views.properties.IPropertySource;
024: import java.beans.*;
025:
026: public class Element implements IPropertySource {
027:
028: public static final String GRAPH_CHILD = "graph child";
029: public static final String COMPLEX_CHILD = "complex child";
030: public static final String INPUTS = "inputs";
031: public static final String OUTPUTS = "outputs";
032: public static final String DATA = "data";
033: public static final String COMPLEX_CHILD_ADDED = "complex child added";
034: public static final String EDGE_LABEL = "edge label";
035:
036: public Element() {
037: super ();
038: }
039:
040: protected PropertyChangeSupport listeners = new PropertyChangeSupport(
041: this );
042:
043: public void addPropertyChangeListener(PropertyChangeListener l) {
044: listeners.addPropertyChangeListener(l);
045: }
046:
047: protected void firePropertyChange(String name, Object oldVal,
048: Object newVal) {
049: listeners.firePropertyChange(name, oldVal, newVal);
050: }
051:
052: protected void firePropertyChange(String name, Object newVal) {
053: firePropertyChange(name, null, newVal);
054: }
055:
056: public void removePropertyChangeListener(PropertyChangeListener l) {
057: listeners.removePropertyChangeListener(l);
058: }
059:
060: public void fireStructureChange(String name, Object newVal) {
061: firePropertyChange(name, null, newVal);
062: }
063:
064: /* (non-Javadoc)
065: * @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue()
066: */
067: public Object getEditableValue() {
068: return null;
069: }
070:
071: /* (non-Javadoc)
072: * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
073: */
074: public IPropertyDescriptor[] getPropertyDescriptors() {
075: return null;
076: }
077:
078: /* (non-Javadoc)
079: * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
080: */
081: public Object getPropertyValue(Object id) {
082: return null;
083: }
084:
085: /* (non-Javadoc)
086: * @see org.eclipse.ui.views.properties.IPropertySource#isPropertySet(java.lang.Object)
087: */
088: public boolean isPropertySet(Object id) {
089: return false;
090: }
091:
092: /* (non-Javadoc)
093: * @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object)
094: */
095: public void resetPropertyValue(Object id) {
096: }
097:
098: /* (non-Javadoc)
099: * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object)
100: */
101: public void setPropertyValue(Object id, Object value) {
102: }
103:
104: }
|