<commit_before>package com.inepex.ineForm.client.form.widgets;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.CheckBox;
import com.inepex.ineForm.shared.descriptorext.WidgetRDesc;
import com.inepex.ineom.shared.descriptor.FDesc;

public class CheckBoxFW extends DenyingFormWidget {

	public static final String CHECKBOXTEXT = "checkBoxText";
	
	private CheckBox checkBox = new CheckBox();
	
	public CheckBoxFW(FDesc fielddescriptor, WidgetRDesc wrDesc) {
		super(fielddescriptor);
		initWidget(checkBox);
		
		if(wrDesc.getPropValue(CHECKBOXTEXT)!=null) {
			checkBox.setText(wrDesc.getPropValue(CHECKBOXTEXT));
		}
	}
	
	@Override
	protected void onAttach() {
		super.onAttach();
		registerHandler(checkBox.addClickHandler(new ClickHandler() {
			
			@Override
			public void onClick(ClickEvent event) {
				fireFormWidgetChanged();
			}
		}));
	}
	
	@Override
	public boolean handlesBoolean() {
		return true;
	}
	
	@Override<commit_msg>new property is added to CheckBoxFW to display text as HTML<commit_after>package com.inepex.ineForm.client.form.widgets;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.CheckBox;
import com.inepex.ineForm.shared.descriptorext.WidgetRDesc;
import com.inepex.ineom.shared.descriptor.FDesc;

public class CheckBoxFW extends DenyingFormWidget {

	public static final String CHECKBOXTEXT = "checkBoxText";
	public static final String CHECKBOXHTML = "checkBoxHTML";
	
	private CheckBox checkBox = new CheckBox();
	
	public CheckBoxFW(FDesc fielddescriptor, WidgetRDesc wrDesc) {
		super(fielddescriptor);
		initWidget(checkBox);
		
		if(wrDesc.getPropValue(CHECKBOXTEXT)!=null) {
			checkBox.setText(wrDesc.getPropValue(CHECKBOXTEXT));
		}else if(wrDesc.getPropValue(CHECKBOXHTML) != null){
			checkBox.setHTML(wrDesc.getPropValue(CHECKBOXHTML));
		}
	}
	
	@Override
	protected void onAttach() {
		super.onAttach();
		registerHandler(checkBox.addClickHandler(new ClickHandler() {
			
			@Override
			public void onClick(ClickEvent event) {
				fireFormWidgetChanged();
			}
		}));
	}
	
	@Override
	public boolean handlesBoolean() {
		return true;
	}
	
	@Override
{'fraction_non_alphanumeric': 0.10683012259194395, 'fraction_numerical': 0.0, 'mean_word_length': 5.077127659574468, 'pattern_counts': {'":': 0, '<': 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': '4557948', 'n_tokens_mistral': 806, 'n_tokens_neox': 724, 'n_words': 133}