Daedalus.Icon = OpenLayers.Class.create();
Daedalus.Icon.prototype = 
    OpenLayers.Class.inherit( Daedalus.Base, {
    /**
     * @type {Element}
     */
    imageDiv: null,
    
    /**
     * @type int
     */
    type: 0,

    /**
     * @constructor
     * 
     * @param {Element} imageDiv
     */
    initialize: function(imageDiv, type) {
        this.displayClass = this.CLASS_NAME.replace(".", "");
        this.imageDiv     = imageDiv;
        this.type         = type;
    },
    
    clone: function() {
        var el = this.imageDiv.cloneNode(true);
        el.id += '_clone';
        var icon = new Daedalus.Icon(el, this.type);
        return icon;
    },

    /**
     * 
     */
    destroy: function () {
        this.imageDiv = null;
        // this.gadget = null;
    },

    moveTo: function(px) {
        OpenLayers.Util.modifyDOMElement(
            this.imageDiv, null, px, null, 'absolute'
        );
    },
    
    setCursor: function(cur) {
        this.imageDiv.style.cursor = cur;
    },

    /** @final @type String */
    CLASS_NAME: "Daedalus.Icon"
});
