<commit_before>package org.shopkeeper.gui.fx.view.selection;

import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.control.Label;
import javafx.scene.layout.*;
import org.shopkeeper.gui.fx.model.selection.ListSelectionModelFX;
import org.shopkeeper.preferences.Preference;
import org.shopkeeper.subjects.subjecttypes.Subject;

import java.util.LinkedHashMap;
import java.util.Map;


/**
 * Created by typhooncoaster on 6-1-16.
 */
public class InformationViewFX extends BorderPane implements  AbstractSelectionViewFX{

    private static ListSelectionModelFX model = null;

    public InformationViewFX() {
        initComponents();
    }


    private void initComponents() {

    }


    @Override
    public void setModel(ListSelectionModelFX model) {
        this.model = model;
    }

    @Override
    public void updateView() {
        GridPane total_view_box = new GridPane();
        total_view_box.setHgap(10);

        setCenter(total_view_box);
        setMaxWidth(Double.MAX_VALUE);
        Subject subject = model.getSelectedSubject();
        Map subject_fields = subject.getFields();

        Map map = subject.INIT_FIELD;
        Map<String, Label> labels = new LinkedHashMap<>();
        map.forEach((k, v) -> {
            labels.put((String) k, new Label((String) k));
        });


        final int[] counter_y = {0};

        labels.forEach((k,v) -> {
            Label label = new Label(subject_fields.get((k)).toString());
            total_view_box.add(v,0, counter_y[0]);
            total_view_box.add(label, 1, counter_y[0]);
            counter_y[0] = counter_y[0] + 1;
//            label.setStyle("-fx-background-color: #336699;");
        } );

        ColumnConstraints col1Constraints = new ColumnConstraints();
        col1Constraints.setPercentWidth(30);
        ColumnConstraints col2Constraints = new ColumnConstraints();
        col2Constraints.setPercentWidth(70);
        total_view_box.getColumnConstraints().addAll(col1Constraints,col2Constraints);
        setStyle("-fx-background-color: #336699;");

    }
}
<commit_msg>ADD: Textfields for values and spacing<commit_after>package org.shopkeeper.gui.fx.view.selection;

import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.scene.layout.*;
import org.shopkeeper.gui.fx.model.selection.ListSelectionModelFX;
import org.shopkeeper.preferences.Preference;
import org.shopkeeper.subjects.subjecttypes.Subject;

import java.util.LinkedHashMap;
import java.util.Map;


/**
 * Created by typhooncoaster on 6-1-16.
 */
public class InformationViewFX extends BorderPane implements  AbstractSelectionViewFX{

    private static ListSelectionModelFX model = null;

    public InformationViewFX() {
        initComponents();
    }


    private void initComponents() {

    }


    @Override
    public void setModel(ListSelectionModelFX model) {
        this.model = model;
    }

    @Override
    public void updateView() {
        GridPane total_view_box = new GridPane();
        total_view_box.setVgap(10);

        setCenter(total_view_box);
        setMaxWidth(Double.MAX_VALUE);
        Subject subject = model.getSelectedSubject();
        Map subject_fields = subject.getFields();

        Map map = subject.INIT_FIELD;
        Map<String, Label> labels = new LinkedHashMap<>();
        map.forEach((k, v) -> {
            labels.put((String) k, new Label((String) k));
        });


        final int[] counter_y = {0};

        labels.forEach((k,v) -> {
            TextField text_field = new TextField(subject_fields.get((k)).toString());
            total_view_box.add(v,0, counter_y[0]);
            total_view_box.add(text_field, 1, counter_y[0]);
            counter_y[0] = counter_y[0] + 1;
//            label.setStyle("-fx-background-color: #336699;");
        } );

        ColumnConstraints col1Constraints = new ColumnConstraints();
        col1Constraints.setPercentWidth(30);
        ColumnConstraints col2Constraints = new ColumnConstraints();
        col2Constraints.setPercentWidth(70);
        total_view_box.getColumnConstraints().addAll(col1Constraints,col2Constraints);
    }
}

{'fraction_non_alphanumeric': 0.1138555633968478, 'fraction_numerical': 0.015525758645024701, 'mean_word_length': 3.1042471042471043, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '5833663', 'n_tokens_mistral': 1267, 'n_tokens_neox': 1211, 'n_words': 235}