/* 
 * Diplomová práce ÚSI VUT 
 * Forenzní analýza webového prohlížeče
 *
 * Autor: Michal Bača
 * Datum: 20.5.2015
 */
package yafft.Utils;

import javafx.scene.control.Label;
import javafx.scene.text.Text;
import javafx.scene.text.TextFlow;

/**
 *
 * @author michal
 */
public class Log {

    private final TextFlow log;
    private final Label label;

    /**
     *
     * @param log
     * @param label
     */
    public Log(TextFlow log, Label label) {
        this.log = log;
        this.label = label;
        
    }

    public TextFlow getLog() {
        return log;
    }

    public Label getLabel() {
        return label;
    }

    /**
     *
     * @param message
     */
    public void append(final String message) {
        this.log.getChildren().addAll(new Text(message), new Text("\n"));
        this.label.setText(message);

    }

    public void noAction() {
        this.label.setText("");

    }

}
