/** * Create a new preview property. The <code>name</code> should be unique. * @param source the property source, for instance the renderer * @param name the property's name * @return a new preview property */ public static PreviewProperty createProperty(Object source, String name) { return new PreviewProperty(source, name, Object.class, name, "", ""); }
/** * Create a new preview property. The <code>name</code> should be unique. If * the type is different from basic types (Integer, Float, Double, String, * Boolean or Color) make sure to implement a {@link PropertyEditor} and register it: * <pre>PropertyEditorManager.registerEditor(MyType.class, MyTypePropertyEditor.class);</pre> * @param source the property source, for instance the renderer * @param name the property's name * @param type the property's value type * @return a new preview property */ public static PreviewProperty createProperty(Object source, String name, Class type) { return new PreviewProperty(source, name, type, name, "", ""); }
/** * Create a new preview property. The <code>name</code> should be unique. If * the type is different from basic types (Integer, Float, Double, String, * Boolean or Color) make sure to implement a {@link PropertyEditor} and register it: * <pre>PropertyEditorManager.registerEditor(MyType.class, MyTypePropertyEditor.class);</pre> * The category can be one of the default categories: * <ul><li>PreviewProperty.CATEGORY_NODES</li> * <li>PreviewProperty.CATEGORY_EDGES</li> * <li>PreviewProperty.CATEGORY_NODE_LABELS</li> * <li>PreviewProperty.CATEGORY_EDGE_LABELS</li> * <li>PreviewProperty.CATEGORY_EDGE_ARROWS</li></ul> * @param source the property source, for instance the renderer * @param name the property's name * @param type the property's value type * @param displayName the property's display name * @param description the property's description * @param category the property's category * @return a new preview property */ public static PreviewProperty createProperty(Object source, String name, Class type, String displayName, String description, String category) { return new PreviewProperty(source, name, type, displayName, description, category); }
/** * Create a new preview property. The <code>name</code> should be unique. If * the type is different from basic types (Integer, Float, Double, String, * Boolean or Color) make sure to implement a {@link PropertyEditor} and register it: * <pre>PropertyEditorManager.registerEditor(MyType.class, MyTypePropertyEditor.class);</pre> * The category can be one of the default categories: * <ul><li>PreviewProperty.CATEGORY_NODES</li> * <li>PreviewProperty.CATEGORY_EDGES</li> * <li>PreviewProperty.CATEGORY_NODE_LABELS</li> * <li>PreviewProperty.CATEGORY_EDGE_LABELS</li> * <li>PreviewProperty.CATEGORY_EDGE_ARROWS</li></ul> * The <code>dependantProperties</code> list is used to automatically disable * the property if the dependant property is not selected. The dependant properties * need to be <code>Boolean</code> type. * @param source the property source, for instance the renderer * @param name the property's name * @param type the property's value type * @param displayName the property's display name * @param description the property's description * @param category the property's category * @param dependantProperties a list of boolean properties this property depend on * @return a new preview property */ public static PreviewProperty createProperty(Object source, String name, Class type, String displayName, String description, String category, String... dependantProperties) { return new PreviewProperty(source, name, type, displayName, description, category, dependantProperties); }