~danilovesky/workcraft/trunk-save-trace

« back to all changes in this revision

Viewing changes to WorkcraftCore/src/org/workcraft/gui/propertyeditor/PropertyDerivative.java

  • Committer: Danil Sokolov
  • Date: 2015-07-03 16:57:12 UTC
  • mfrom: (621.1.8 trunk-import-verilog)
  • Revision ID: danilovesky@gmail.com-20150703165712-xywyyfg5u3xwc120
Merge proposal is approved for initial support of Verilog export and import.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
*
 
3
* Copyright 2008,2009 Newcastle University
 
4
*
 
5
* This file is part of Workcraft.
 
6
 
7
* Workcraft is free software: you can redistribute it and/or modify
 
8
* it under the terms of the GNU General Public License as published by
 
9
* the Free Software Foundation, either version 3 of the License, or
 
10
* (at your option) any later version.
 
11
 
12
* Workcraft is distributed in the hope that it will be useful,
 
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
* GNU General Public License for more details.
 
16
 
17
* You should have received a copy of the GNU General Public License
 
18
* along with Workcraft.  If not, see <http://www.gnu.org/licenses/>.
 
19
*
 
20
*/
 
21
 
 
22
package org.workcraft.gui.propertyeditor;
 
23
 
 
24
import java.lang.reflect.InvocationTargetException;
 
25
import java.util.Map;
 
26
 
 
27
public class PropertyDerivative implements PropertyDescriptor {
 
28
        final PropertyDescriptor descriptor;
 
29
        
 
30
        public PropertyDerivative(PropertyDescriptor descriptor) {
 
31
                this.descriptor = descriptor;
 
32
        }
 
33
 
 
34
        @Override
 
35
        public String getName() {
 
36
                return descriptor.getName();
 
37
        }
 
38
 
 
39
        @Override
 
40
        public Class<?> getType() {
 
41
                return descriptor.getType();
 
42
        }
 
43
 
 
44
        @Override
 
45
        public boolean isWritable() {
 
46
                return descriptor.isWritable();
 
47
        }
 
48
 
 
49
        @Override
 
50
        public boolean isCombinable() {
 
51
                return descriptor.isCombinable();
 
52
        }
 
53
 
 
54
        @Override
 
55
        public boolean isTemplatable() {
 
56
                return descriptor.isTemplatable();
 
57
        }
 
58
 
 
59
        @Override
 
60
        public Object getValue() throws InvocationTargetException {
 
61
                return descriptor.getValue();
 
62
        }
 
63
 
 
64
        @Override
 
65
        public void setValue(Object value) throws InvocationTargetException {
 
66
                descriptor.setValue(value);
 
67
        }
 
68
 
 
69
        @Override
 
70
        public Map<? extends Object, String> getChoice() {
 
71
                return descriptor.getChoice();
 
72
        }
 
73
 
 
74
}