package ttworkbench.play.parameters.ipv6.editors;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;

import ttworkbench.play.parameters.ipv6.ParameterValueUtil;
import ttworkbench.play.parameters.ipv6.customize.IEditorLookAndBehaviour;
import ttworkbench.play.parameters.ipv6.customize.IntegerEditorLookAndBehaviour;

import com.testingtech.ttworkbench.ttman.parameters.api.IConfiguration;
import com.testingtech.ttworkbench.ttman.parameters.api.IParameter;

public class DefaultEditor extends AbstractEditor<Object> {

	private static final String TITLE = "Default Editor";
	private static final String DESCRIPTION = "";
	
	public DefaultEditor() {
		super( TITLE, DESCRIPTION);
	}
	

	@Override
	public Composite createControl(Composite theTheParent) {
		IParameter<Object> parameter = getParameter();

		Composite composite = new Composite(theTheParent, SWT.NONE);
		

		composite.setLayout(new GridLayout(2, false));
		Label label = new Label(composite, SWT.NONE);
		label.setText( parameter.getName());
		label.setToolTipText( parameter.getDescription());
		
		Text text = new Text(composite, SWT.READ_ONLY);
		text.setText( ParameterValueUtil.getValue( parameter));
		System.out.println( String.valueOf( parameter.getValue()));
		System.out.println( String.valueOf( parameter.getValue()));
		
		text.setToolTipText( parameter.getType());
		
		return composite;
	}
	
	@Override
	public void setConfiguration(IConfiguration theConfiguration) {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected IEditorLookAndBehaviour getDefaultLookAndBehaviour() {
		return new IntegerEditorLookAndBehaviour();
	}

	

}

@@ -1307,132 +1307,8 @@
 ));%0A
-%09%09System.out.println( String.valueOf( parameter.getValue()));%0A%09%09System.out.println( String.valueOf( parameter.getValue()));%0A
 %09%09%0A%09

clear of some debug output