Example usage for java.beans PropertyEditor getJavaInitializationString

List of usage examples for java.beans PropertyEditor getJavaInitializationString

Introduction

In this page you can find the example usage for java.beans PropertyEditor getJavaInitializationString.

Prototype

String getJavaInitializationString();

Source Link

Document

Returns a fragment of Java code that can be used to set a property to match the editors current state.

Usage

From source file:org.eclipse.wb.internal.swing.model.property.editor.beans.PropertyEditorWrapper.java

private static void updatePropertyValue(Property property, java.beans.PropertyEditor propertyEditor)
        throws Exception {
    Object value = propertyEditor.getValue();
    String source = propertyEditor.getJavaInitializationString();
    GenericProperty genericProperty = (GenericProperty) property;
    genericProperty.setExpression(source, value);
}