package charactermanaj.model;

import java.io.Serializable;

import charactermanaj.graphics.filters.ColorConvertParameter;

public class ColorInfo implements Serializable, Cloneable {

	private static final long serialVersionUID = 2448550538711608223L;

	private ColorConvertParameter colorParameter = new ColorConvertParameter();
	
	private boolean syncColorGroup = false;
	
	private ColorGroup colorGroup = ColorGroup.NA;
	
	@Override
	public ColorInfo clone() {
		ColorInfo colorInfo = new ColorInfo();
		colorInfo.syncColorGroup = this.syncColorGroup;
		colorInfo.colorGroup = this.colorGroup;
		colorInfo.colorParameter = (ColorConvertParameter) this.colorParameter.clone();
		return colorInfo;
	}

	public ColorConvertParameter getColorParameter() {
		return colorParameter;
	}

	public void setColorParameter(ColorConvertParameter colorParameter) {
		this.colorParameter = colorParameter;
	}

	public boolean isSyncColorGroup() {
		return syncColorGroup;
	}

	public void setSyncColorGroup(boolean syncColorGroup) {
		this.syncColorGroup = syncColorGroup;
	}

	public ColorGroup getColorGroup() {
		return colorGroup;
	}

	public void setColorGroup(ColorGroup colorGroup) {
		this.colorGroup = colorGroup;
	}
	
	@Override
	public String toString() {
		StringBuilder buf = new StringBuilder();
		buf.append(getClass().getSimpleName() + "@" + Integer.toHexString(System.identityHashCode(this)));
		buf.append("(");
		buf.append("colorGroup=" + colorGroup + "(" + syncColorGroup + "),");
		buf.append("colorParameter=" + colorParameter);
		buf.append(")");
		return buf.toString();
	}
}
