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 canonicalName
          Should be unique for a property and not localized.
protected  java.lang.String category
           
protected  Property property
           
 
Constructor Summary
LayoutProperty(Property property, java.lang.String category, java.lang.String canonicalName)
           
 
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.
static LayoutProperty createProperty(Layout layout, java.lang.Class valueType, java.lang.String propertyName, java.lang.String propertyCategory, java.lang.String propertyCanonicalName, 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 propertyCanonicalName, 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 getCanonicalName()
           
 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

canonicalName

protected java.lang.String canonicalName
Should be unique for a property and not localized.

Constructor Detail

LayoutProperty

public LayoutProperty(Property property,
                      java.lang.String category,
                      java.lang.String canonicalName)
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


getCanonicalName

public java.lang.String getCanonicalName()

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. The parameter propertyName will be used as the canonical name of the LayoutProperty.

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. The parameter propertyName will be used as the canonical name of the LayoutProperty.

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

createProperty

public static LayoutProperty createProperty(Layout layout,
                                            java.lang.Class valueType,
                                            java.lang.String propertyName,
                                            java.lang.String propertyCategory,
                                            java.lang.String propertyCanonicalName,
                                            java.lang.String propertyDescription,
                                            java.lang.String getMethod,
                                            java.lang.String setMethod)
                                     throws java.lang.NoSuchMethodException
Create a property. The parameter propertyName will be used as the canonical name of the LayoutProperty.

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
propertyCanonicalName - Canonical name for the LayoutProperty. It should be unique and not localized
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 propertyCanonicalName,
                                            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. The parameter propertyName will be used as the canonical name of the LayoutProperty.

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
propertyCanonicalName - Canonical name for the LayoutProperty. It should be unique and not localized
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