<commit_before>package net.happybrackets.controller.gui;

import javafx.geometry.Pos;
import net.happybrackets.controller.network.LocalDeviceRepresentation;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Orientation;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.ListCell;
import javafx.scene.control.Slider;
import javafx.scene.layout.HBox;
import javafx.scene.text.Text;

public class DeviceRepresentationCell extends ListCell<LocalDeviceRepresentation> {
	
	int count = 0;
	
	@Override
    public void updateItem(final LocalDeviceRepresentation item, boolean empty) {
        super.updateItem(item, empty);
        setGraphic(null);
		//gui needs to be attached to "item", can't rely on DeviceRepresentationCell to bind to item
        if (item != null) {
        	if(item.getGui() == null) {
        		//set up main panel
	        	HBox main = new HBox();
				main.setStyle("-fx-font-family: sample; -fx-font-size: 12;");
				main.setAlignment(Pos.CENTER_LEFT);
	        	main.setSpacing(5);
	        	main.setMaxHeight(20);
	        	//elements
	        	HBox txthbox = new HBox();
	        	main.getChildren().add(txthbox);
	        	//name of the PI
	        	Text name = new Text(item.hostname);
	        	name.setUnderline(true);
	        	txthbox.getChildren().add(name);
	        	txthbox.setSpacing(5);
	        	txthbox.setMinWidth(100);
				txthbox.setAlignment(Pos.CENTER);
	        	//reset button
	        	Button resetButton = new Button("R");
				resetButton.setMaxHeight(5);
	        	resetButton.setOnAction(new EventHandler<ActionEvent>() {
	        	    @Override public void handle(ActionEvent e) {
	        	    	item.send("/PI/reset");
	        	    }
	        	});
	        	main.getChildren().add(resetButton);<commit_msg>Smaller DeviceRepresentationCell font size.<commit_after>package net.happybrackets.controller.gui;

import javafx.geometry.Pos;
import net.happybrackets.controller.network.LocalDeviceRepresentation;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Orientation;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.ListCell;
import javafx.scene.control.Slider;
import javafx.scene.layout.HBox;
import javafx.scene.text.Text;

public class DeviceRepresentationCell extends ListCell<LocalDeviceRepresentation> {
	
	int count = 0;
	
	@Override
    public void updateItem(final LocalDeviceRepresentation item, boolean empty) {
        super.updateItem(item, empty);
        setGraphic(null);
		//gui needs to be attached to "item", can't rely on DeviceRepresentationCell to bind to item
        if (item != null) {
        	if(item.getGui() == null) {
        		//set up main panel
	        	HBox main = new HBox();
				main.setStyle("-fx-font-family: sample; -fx-font-size: 10;");
				main.setAlignment(Pos.CENTER_LEFT);
	        	main.setSpacing(5);
	        	main.setMaxHeight(20);
	        	//elements
	        	HBox txthbox = new HBox();
	        	main.getChildren().add(txthbox);
	        	//name of the PI
	        	Text name = new Text(item.hostname);
	        	name.setUnderline(true);
	        	txthbox.getChildren().add(name);
	        	txthbox.setSpacing(5);
	        	txthbox.setMinWidth(100);
				txthbox.setAlignment(Pos.CENTER);
	        	//reset button
	        	Button resetButton = new Button("R");
				resetButton.setMaxHeight(5);
	        	resetButton.setOnAction(new EventHandler<ActionEvent>() {
	        	    @Override public void handle(ActionEvent e) {
	        	    	item.send("/PI/reset");
	        	    }
	        	});
	        	main.getChildren().add(resetButton);
{'fraction_non_alphanumeric': 0.11005643919958953, 'fraction_numerical': 0.005643919958953309, 'mean_word_length': 2.9107321965897692, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4158632', 'n_tokens_mistral': 1260, 'n_tokens_neox': 1169, 'n_words': 236}