package com.ecep.contract.util;

import java.util.logging.Level;

import com.ecep.contract.MessageHolder;

import javafx.scene.paint.Color;
import javafx.scene.text.Text;

public class TextMessageHolder implements MessageHolder {

    

    @Override
    public void addMessage(Level level, String message) {
        Text text = new Text(message);
        if (Level.WARNING == level) { // warning
            text.setFill(Color.YELLOW);
        } else if (Level.SEVERE == level) {// error
            text.setFill(Color.RED);
        } else if (Level.FINE == level) { // debug
            text.setFill(Color.GRAY);
        } else {
            text.setFill(Color.WHITE);
        }
        addTextMessage(text);
    }

    public void addTextMessage(Text text) {
        // TODO Auto-generated method stub
        throw new UnsupportedOperationException("Unimplemented method 'addTextMessage'");
    }

}
