All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.warnotte.obj2gui2.Plugins.tests.JTextAreaFieldPlug Maven / Gradle / Ivy

Go to download

This library aimed to generated swing interface base on introspection and annotation of DTOs

There is a newer version: 1.3.1
Show newest version
package io.github.warnotte.obj2gui2.Plugins.tests;

import java.lang.reflect.Method;
import java.util.Calendar;
import java.util.Date;

import javax.swing.JTextArea;

import io.github.warnotte.obj2gui2.JPanelMagique;
import io.github.warnotte.obj2gui2.Plugins.OBJ2GUIPlug;


/**
 * @author Warnotte Renaud
 *
 */
public class JTextAreaFieldPlug extends OBJ2GUIPlug
{
	@Override
	protected JTextArea build(String value, Object parent, Method getter, Method setter, JPanelMagique panel_parent, boolean dummy)
	{
		JTextArea component = new JTextArea();
		component.setText(value);
		component.addFocusListener(panel_parent);
		return component;
	}

	@Override
	public void refresh(String value, JTextArea component, boolean dummy)
	{
		component.setText(value);
	}

	@Override
	protected String getValue(JTextArea component, boolean dummy)
	{
		return component.getText();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy