Gephi Toolkit Javadoc

org.gephi.layout.spi
Class LayoutProperty

java.lang.Object
  extended by org.gephi.layout.spi.LayoutProperty

public final class LayoutProperty
extends java.lang.Object

Properties for layout algorithms that are used by the UI to fill the property sheet and thus allow user edit.

Author:
Mathieu Bastian

Field Summary
protected  java.lang.String category
           
protected  Property property
           
 
Method Summary
static LayoutProperty createProperty(Layout layout, java.lang.Class valueType, java.lang.String propertyName, java.lang.String propertyCategory, java.lang.String propertyDescription, java.lang.String getMethod, java.lang.String setMethod)
          Create a property.
static LayoutProperty createProperty(Layout layout, java.lang.Class valueType, java.lang.String propertyName, java.lang.String propertyCategory, java.lang.String propertyDescription, java.lang.String getMethod, java.lang.String setMethod, java.lang.Class<? extends java.beans.PropertyEditor> editorClass)
          Create a property, with a particular PropertyEditor.
 java.lang.String getCategory()
          Return the category of the property
 Property getProperty()
          Return the underlying Property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

property

protected Property property

category

protected java.lang.String category
Method Detail

getProperty

public Property getProperty()
Return the underlying Property.

Returns:
the instance of Node.Property

getCategory

public java.lang.String getCategory()
Return the category of the property


createProperty

public static LayoutProperty createProperty(Layout layout,
                                            java.lang.Class valueType,
                                            java.lang.String propertyName,
                                            java.lang.String propertyCategory,
                                            java.lang.String propertyDescription,
                                            java.lang.String getMethod,
                                            java.lang.String setMethod)
                                     throws java.lang.NoSuchMethodException
Create a property.

Parameters:
layout - The layout instance
valueType - The type of the property value, ex: Double.class
propertyName - The display name of the property
propertyCategory - A category string or null for using default category
propertyDescription - A description string for the property
getMethod - 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.
Returns:
the created property
Throws:
java.lang.NoSuchMethodException - if the getter or setter methods cannot be found

createProperty

public static LayoutProperty createProperty(Layout layout,
                                            java.lang.Class valueType,
                                            java.lang.String propertyName,
                                            java.lang.String propertyCategory,
                                            java.lang.String propertyDescription,
                                            java.lang.String getMethod,
                                            java.lang.String setMethod,
                                            java.lang.Class<? extends java.beans.PropertyEditor> editorClass)
                                     throws java.lang.NoSuchMethodException
Create a property, with a particular PropertyEditor. A particular editor must be specified when the property type don't have a registered editor class.

Parameters:
layout - The layout instance
valueType - The type of the property value, ex: Double.class
propertyName - The display name of the property
propertyCategory - A category string or null for using default category
propertyDescription - A description string for the property
getMethod - 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.
editorClass - A PropertyEditor class for the given type
Returns:
the created property
Throws:
java.lang.NoSuchMethodException - if the getter or setter methods cannot be found

Gephi Toolkit Javadoc