package it.mice.voila.runtime.web.bean;

import java.io.Serializable;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.springframework.beans.factory.BeanNameAware;


/**
 * Created by IntelliJ IDEA.
 * User: zzy9v4
 * Date: 5-giu-2006
 * Time: 12.01.17
 * To change this template use File | Settings | File Templates.
 */
public class MenuDefinition implements BeanNameAware, Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = 4775099891397990504L;

	private String beanName;

    private int size;
    private String orientation;
    private int x;
    private int y;
    private int offsetX;
    private int offsetY;
    private String bgOut;
    private String bgOver;
    private String fontFace;
    private int fontSize;
    private String fontStyleOut;
    private String fontStyleOver;
    private String textColorOut;
    private String textColorOver;
    private int borderSize;
    private String borderColor;
    private int margin;
    private String showChar;
    private boolean showOnClick;
    private boolean sepItems;
    private boolean mainMenu;
    private boolean hasAnimations;
    private int animationType;
    private boolean hasShadow;
    private int sOffX;
    private int sOffY;
    private String shadowColor;
    private MenuItemDefinition[] menuItems;

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public String getOrientation() {
        return orientation;
    }

    public void setOrientation(String orientation) {
        this.orientation = orientation;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getOffsetX() {
        return offsetX;
    }

    public void setOffsetX(int offsetX) {
        this.offsetX = offsetX;
    }

    public int getOffsetY() {
        return offsetY;
    }

    public void setOffsetY(int offsetY) {
        this.offsetY = offsetY;
    }

    public String getBgOut() {
        return bgOut;
    }

    public void setBgOut(String bgOut) {
        this.bgOut = bgOut;
    }

    public String getBgOver() {
        return bgOver;
    }

    public void setBgOver(String bgOver) {
        this.bgOver = bgOver;
    }

    public String getFontFace() {
        return fontFace;
    }

    public void setFontFace(String fontFace) {
        this.fontFace = fontFace;
    }

    public int getFontSize() {
        return fontSize;
    }

    public void setFontSize(int fontSize) {
        this.fontSize = fontSize;
    }

    public String getFontStyleOut() {
        return fontStyleOut;
    }

    public void setFontStyleOut(String fontStyleOut) {
        this.fontStyleOut = fontStyleOut;
    }

    public String getFontStyleOver() {
        return fontStyleOver;
    }

    public void setFontStyleOver(String fontStyleOver) {
        this.fontStyleOver = fontStyleOver;
    }

    public String getTextColorOut() {
        return textColorOut;
    }

    public void setTextColorOut(String textColorOut) {
        this.textColorOut = textColorOut;
    }

    public String getTextColorOver() {
        return textColorOver;
    }

    public void setTextColorOver(String textColorOver) {
        this.textColorOver = textColorOver;
    }

    public int getBorderSize() {
        return borderSize;
    }

    public void setBorderSize(int borderSize) {
        this.borderSize = borderSize;
    }

    public String getBorderColor() {
        return borderColor;
    }

    public void setBorderColor(String borderColor) {
        this.borderColor = borderColor;
    }

    public int getMargin() {
        return margin;
    }

    public void setMargin(int margin) {
        this.margin = margin;
    }

    public String getShowChar() {
        return showChar;
    }

    public void setShowChar(String showChar) {
        this.showChar = showChar;
    }

    public boolean isShowOnClick() {
        return showOnClick;
    }

    public void setShowOnClick(boolean showOnClick) {
        this.showOnClick = showOnClick;
    }

    public boolean isSepItems() {
        return sepItems;
    }

    public void setSepItems(boolean sepItems) {
        this.sepItems = sepItems;
    }

    public boolean isMainMenu() {
        return mainMenu;
    }

    public void setMainMenu(boolean mainMenu) {
        this.mainMenu = mainMenu;
    }

    public boolean isHasAnimations() {
        return hasAnimations;
    }

    public void setHasAnimations(boolean hasAnimations) {
        this.hasAnimations = hasAnimations;
    }

    public int getAnimationType() {
        return animationType;
    }

    public void setAnimationType(int animationType) {
        this.animationType = animationType;
    }

    public boolean isHasShadow() {
        return hasShadow;
    }

    public void setHasShadow(boolean hasShadow) {
        this.hasShadow = hasShadow;
    }

    public int getsOffX() {
        return sOffX;
    }

    public void setsOffX(int sOffX) {
        this.sOffX = sOffX;
    }

    public int getsOffY() {
        return sOffY;
    }

    public void setsOffY(int sOffY) {
        this.sOffY = sOffY;
    }

    public String getShadowColor() {
        return shadowColor;
    }

    public void setShadowColor(String shadowColor) {
        this.shadowColor = shadowColor;
    }

    public MenuItemDefinition[] getMenuItems() {
        return menuItems;
    }

    public void setMenuItems(MenuItemDefinition[] menuItems) {
        this.menuItems = menuItems;
    }

    /**
     * Set the name of the bean in the bean factory that created this bean.
     * <p>Invoked after population of normal bean properties but before an init
     * callback like InitializingBean's afterPropertiesSet or a custom init-method.
     *
     * @param name the name of the bean in the factory
     */
    public void setBeanName(String name) {
        this.beanName = name;
    }

    public String getBeanName() {
        return this.beanName;
    }

    /**
     * Returns a string representation of the object. In general, the
     * <code>toString</code> method returns a string that
     * "textually represents" this object. The result should
     * be a concise but informative representation that is easy for a
     * person to read.
     * It is recommended that all subclasses override this method.
     * <p/>
     * The <code>toString</code> method for class <code>Object</code>
     * returns a string consisting of the name of the class of which the
     * object is an instance, the at-sign character `<code>@</code>', and
     * the unsigned hexadecimal representation of the hash code of the
     * object. In other words, this method returns a string equal to the
     * value of:
     * <blockquote>
     * <pre>
     * getClass().getName() + '@' + Integer.toHexString(hashCode())
     * </pre></blockquote>
     *
     * @return a string representation of the object.
     */
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.DEFAULT_STYLE);
    }
}
