<commit_before>package de.lander.link.gui;

import com.vaadin.annotations.AutoGenerated;
import com.vaadin.ui.AbsoluteLayout;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.TextField;

public class LinkLanderFullLayout extends CustomComponent {

	/*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */

	@AutoGenerated
	private AbsoluteLayout mainLayout;
	@AutoGenerated
	private TextField linkLanderInputBox;
	/**
	 * The constructor should first build the main layout, set the composition
	 * root and then do any custom initialization.
	 *
	 * The constructor will not be automatically regenerated by the visual
	 * editor.
	 */
	public LinkLanderFullLayout() {
		buildMainLayout();
		setCompositionRoot(mainLayout);
		
		linkLanderInputBox.focus();

		// Button button = new Button("Click Me");
		// button.addClickListener(new Button.ClickListener() {
		// public void buttonClick(ClickEvent event) {
		// mainLayout.addComponent(new Label("Thank you for clicking"));
		// }
		// });
		// mainLayout.addComponent(button);
	}

	@AutoGenerated
	private AbsoluteLayout buildMainLayout() {
		// common part: create layout
		mainLayout = new AbsoluteLayout();
		mainLayout.setImmediate(false);
		mainLayout.setWidth("100%");
		mainLayout.setHeight("100%");
		
		// top-level component properties
		setWidth("100.0%");
		setHeight("100.0%");
		
		// linkLanderInputBox
		linkLanderInputBox = new TextField();
		linkLanderInputBox.setImmediate(false);
		linkLanderInputBox.setWidth("100.0%");
		linkLanderInputBox.setHeight("-1px");
		mainLayout.addComponent(linkLanderInputBox, "top:0.0px;");
		
		return mainLayout;
	}

}<commit_msg>type as you go demo<commit_after>package de.lander.link.gui;

import com.vaadin.annotations.AutoGenerated;
import com.vaadin.event.FieldEvents.TextChangeEvent;
import com.vaadin.event.FieldEvents.TextChangeListener;
import com.vaadin.ui.AbsoluteLayout;
import com.vaadin.ui.AbstractTextField.TextChangeEventMode;
import com.vaadin.ui.Button;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.TextField;

public class LinkLanderFullLayout extends CustomComponent {

	/*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */

	@AutoGenerated
	private AbsoluteLayout mainLayout;

	@AutoGenerated
	private Button testButton;

	@AutoGenerated
	private TextField linkLanderInputBox;

	/**
	 * The constructor should first build the main layout, set the composition
	 * root and then do any custom initialization.
	 *
	 * The constructor will not be automatically regenerated by the visual
	 * editor.
	 */
	public LinkLanderFullLayout() {
		buildMainLayout();
		setCompositionRoot(mainLayout);

		linkLanderInputBox.focus();
		linkLanderInputBox.setInputPrompt("type to land a link...");
		linkLanderInputBox.setTextChangeEventMode(TextChangeEventMode.LAZY);
		
		linkLanderInputBox.addTextChangeListener(new TextChangeListener() {
			public void textChange(final TextChangeEvent event) {
				if (event.getText().equals("")) {
					testButton.setVisible(false);
				} else {
					testButton.setVisible(true);
					testButton.setCaption(event.getText());
				}
			}
		});
		
		// Button button = new Button("Click Me");
		// button.addClickListener(new Button.ClickListener() {
		// public void buttonClick(ClickEvent event) {
		// mainLayout.addComponent(new Label("Thank you for clicking"));
		// }
		// });
		// mainLayout.addComponent(button);
	}

	@AutoGenerated
	private AbsoluteLayout buildMainLayout() {
		// common part: create layout
		mainLayout = new AbsoluteLayout();
		mainLayout.setImmediate(false);
		mainLayout.setWidth("100%");
		mainLayout.setHeight("100%");
		
		// top-level component properties
		setWidth("100.0%");
		setHeight("100.0%");
		
		// linkLanderInputBox
		linkLanderInputBox = new TextField();
		linkLanderInputBox.setImmediate(false);
		linkLanderInputBox.setWidth("100.0%");
		linkLanderInputBox.setHeight("-1px");
		mainLayout.addComponent(linkLanderInputBox, "left:0.0px;");
		
		// testButton
		testButton = new Button();
		testButton.setCaption("Button");
		testButton.setImmediate(true);
		testButton.setWidth("-1px");
		testButton.setHeight("-1px");
		mainLayout.addComponent(testButton, "top:40.0px;left:20.0px;");
		
		return mainLayout;
	}

}
{'fraction_non_alphanumeric': 0.125310453827049, 'fraction_numerical': 0.013095506886430346, 'mean_word_length': 5.010854816824966, 'pattern_counts': {'":': 12, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3869530', 'n_tokens_mistral': 1502, 'n_tokens_neox': 1313, 'n_words': 255}