3
* Copyright 2008,2009 Newcastle University
5
* This file is part of Workcraft.
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.
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.
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/>.
22
package org.workcraft.gui.propertyeditor;
24
import java.lang.reflect.InvocationTargetException;
27
public class PropertyDerivative implements PropertyDescriptor {
28
final PropertyDescriptor descriptor;
30
public PropertyDerivative(PropertyDescriptor descriptor) {
31
this.descriptor = descriptor;
35
public String getName() {
36
return descriptor.getName();
40
public Class<?> getType() {
41
return descriptor.getType();
45
public boolean isWritable() {
46
return descriptor.isWritable();
50
public boolean isCombinable() {
51
return descriptor.isCombinable();
55
public boolean isTemplatable() {
56
return descriptor.isTemplatable();
60
public Object getValue() throws InvocationTargetException {
61
return descriptor.getValue();
65
public void setValue(Object value) throws InvocationTargetException {
66
descriptor.setValue(value);
70
public Map<? extends Object, String> getChoice() {
71
return descriptor.getChoice();