public final class FilterProperty extends Object
setValue(java.lang.Object)
.
The role of this class is to define filter's properties in order value changes can be tracked by the system, UI can be generated and values correctly saved in projects file.
Modifier and Type | Method and Description |
---|---|
static FilterProperty |
createProperty(Filter filter,
Class valueType,
String fieldName)
Creates a property.
|
static FilterProperty |
createProperty(Filter filter,
Class valueType,
String propertyName,
String getMethod,
String setMethod)
Creates a property.
|
Filter |
getFilter()
Returns the filter instance this property is associated to.
|
String |
getName()
Returns property's name
|
PropertyEditor |
getPropertyEditor()
Returns the
PropertyEditor associated to the property value. |
Object |
getValue()
Returns property's value, can be
null |
Class |
getValueType()
Returns the property's value type.
|
void |
setPropertyEditorClass(Class<? extends PropertyEditor> clazz)
Sets the property editor class.
|
void |
setValue(Object value)
Set property's value.
|
public String getName()
public Object getValue()
null
public void setValue(Object value)
value
must match with this
property value type.value
- the value that is to be setpublic PropertyEditor getPropertyEditor()
PropertyEditor
associated to the property value.public void setPropertyEditorClass(Class<? extends PropertyEditor> clazz)
PropertyEditor
.clazz
- the property editor classpublic Class getValueType()
public Filter getFilter()
public static FilterProperty createProperty(Filter filter, Class valueType, String propertyName, String getMethod, String setMethod) throws NoSuchMethodException
filter
- The filter instancevalueType
- The type of the property value, ex:
Double.class
propertyName
- The display name of the propertygetMethod
- The name of the get method for this property, must exist
to make Java reflexion working.setMethod
- The name of the set method for this property, must exist
to make Java reflexion working.NoSuchMethodException
- if the getter or setter methods cannot be
foundpublic static FilterProperty createProperty(Filter filter, Class valueType, String fieldName) throws NoSuchMethodException
filter
- filter instancevalueType
- type of the property value, ex:
Double.class
fieldName
- java field name of the propertyNoSuchMethodException
- if the getter or setter methods cannot be
foundCopyright © 2007–2017 Gephi Consortium. All rights reserved.