//
// https://www.ramecera.it/myscrewdriver.html
// e-mail: screwdriver@ramecera.it
//
/* This program and the accompanying materials are made available under
 * the terms of the Eclipse Public License v1.0 which accompanies this
 * distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html */
package it.ramecera.screwdriver.outfits;

import it.ramecera.screwdriver.Train;

/**
 * <p>
 * Elements that go to form a CSS class.
 * </p>
 * <p>
 * Company: Ramecera™<br>
 * Creation date: 2020-04-09<br>
 * Last updated: 2020-04-09
 * </p>
 * <p>
 * Modifications:<br>
 * </p>
 * 
 * @author M. Maglioni */
final public class Costume {

	/** name of the CSS class */
	public String className;
	/** CSS element */
	public String color;
	/** CSS element */
	public String background_color;
	/** CSS element */
	public String border_color;
	/** CSS element */
	public String padding_top;
	/** CSS element */
	public String padding_bottom;
	/** CSS element */
	public String padding_left;
	/** CSS element */
	public String padding_right;
	/** CSS element */
	public String font_size;
	/** CSS element */
	public String margin_top;
	/** CSS element */
	public String text_align;

	/** default constructor */
	public Costume() {

	}

	/**
	 * <p>
	 * Classic constructor.
	 * </p>
	 * <p>
	 * Creation date: 2020-04-09<br>
	 * Last updated: 2020-04-09
	 * </p>
	 * <p>
	 * Modifications:<br>
	 * </p>
	 * 
	 * @param className CSS class name
	 * @param color CSS element
	 * @param background_color CSS element
	 * @param border_color CSS element
	 * @param padding_top CSS element
	 * @param padding_bottom CSS element
	 * @param padding_left CSS element
	 * @param padding_right CSS element
	 * @param font_size CSS element
	 * @param margin_top CSS element
	 * @param text_align CSS element */
	public Costume(final String className, final String color,
			final String background_color, final String border_color,
			final String padding_top, final String padding_bottom,
			final String padding_left, final String padding_right,
			final String font_size, final String margin_top,
			final String text_align) {
		super();
		this.className = className;
		this.color = color;
		this.background_color = background_color;
		this.border_color = border_color;
		this.padding_top = padding_top;
		this.padding_bottom = padding_bottom;
		this.padding_left = padding_left;
		this.padding_right = padding_right;
		this.font_size = font_size;
		this.margin_top = margin_top;
		this.text_align = text_align;
	}

	/**
	 * <p>
	 * Useful constructor.
	 * </p>
	 * <p>
	 * Creation date: 2020-04-09<br>
	 * Last updated: 2020-04-09
	 * </p>
	 * <p>
	 * Modifications:<br>
	 * </p>
	 * 
	 * @param f the sling, with the locomotor and all its wagons */
	public Costume(Train f) {
		this.className = f.locomotor.text;
		this.color = f.wagonE.get("ocolor").text;
		this.background_color = f.wagonE.get("obackcolor").text;
		this.border_color = f.wagonE.get("ocolor").text;
		this.padding_top = f.wagonE.get("opadding").text;
		this.padding_bottom = f.wagonE.get("opadding").text;
		this.padding_left = f.wagonE.get("opadding").text;
		this.padding_right = f.wagonE.get("opadding").text;
		this.font_size = f.wagonE.get("ofontsize").text;
		this.margin_top = f.wagonE.get("omargin").text;
		this.text_align = f.wagonE.get("oalign").text;
	}
}
