package edu.chl.proton.model;

import static java.awt.Font.BOLD;
import static java.awt.Font.ITALIC;
import static java.time.format.SignStyle.NORMAL;

/**
 * @author Ludvig Ekman
 * Created by ludvig on 2017-05-01.
 */
// TODO: Take in a Part to change, or have a public CurrentPart? Or otherwise solve problem with referencing to a
// non-static object from a static method.
public class FontStyle {
    private String font;
    private TextPosture posture;
    private TextWeight weight;
    private int size;

    public FontStyle(String font, TextPosture posture, TextWeight weight, int size){
        this.font = font;
        this.posture=posture;
        this.size=size;
        this.weight=weight;
    }
    public FontStyle(){
    }

    protected void setFont(String font){ // enum as well?
        if(font == null){

        }
        //TODO: Make fonts
        if(font.equalsIgnoreCase("SANS")){
            // FontStyle.setFont(font);

        } else if(font.equalsIgnoreCase("ROMAN")){
            return;

        } else if (font.equalsIgnoreCase("NORMAL")){
            return; // default
        }
    }
    protected String getFont(){
        return font;
    }

    protected void setTextPosture(TextPosture posture) {
        switch (posture) {
            case ITALIC:
                // Make stuff italic
                break;
            case NORMAL:
                // and so on
                break;
            default:
                // reset / do nothing?
                break;
        }
    }
    protected TextPosture getTextPosture(){
        return posture;
    }
    protected void setTextWeight(TextWeight weight) {
        switch (weight) {
            case BOLD:
                // Do stuff bold
                break;
            case NORMAL:
            // and so on
            break;
            default:
                //text3.setFont(Font.font(family, FontPosture.ITALIC, size));
                break;
        }
    }
    protected TextWeight getTextWeight(){
        return weight;
    }
    protected void setSize(int size){
            // do something with the text size
    }
    protected int getSize() {
        return size;
    }

    protected String getItalicStyle(String makeStyle){
        return "<b>"+makeStyle+"</b>";
    }
    protected String getItalicBoldStyle(String makeStyle){
        return "<b>"+makeStyle+"</b>";
    }
    protected String getHeadingStyle(String makeStyle){
        return "<b>"+makeStyle+"</b>";
    }
    protected String getLinkStyle(String makeStyle){
        return "<b>"+makeStyle+"</b>";
    }
    protected String getListStyle(String makeStyle){
        return "<b>"+makeStyle+"</b>";
    }
    protected String getBoldStyle(String makeStyle){
        return "<b>"+makeStyle+"</b>";
    }

}

@@ -2431,32 +2431,33 @@
 ing makeStyle)%7B%0A
+%0A
         return %22
@@ -2530,32 +2530,33 @@
 ing makeStyle)%7B%0A
+%0A
         return %22
@@ -2629,32 +2629,33 @@
 ing makeStyle)%7B%0A
+%0A
         return %22
@@ -2675,32 +2675,32 @@
 e+%22%3C/b%3E%22;%0A    %7D%0A
-
     protected St
@@ -2728,32 +2728,133 @@
 ing makeStyle)%7B%0A
+%0A        return %22%3Cb%3E%22+makeStyle+%22%3C/b%3E%22;%0A    %7D%0A    protected String getQuoteStyle(String makeStyle)%7B%0A%0A
         return %22

add getQuoteStyle