public final void setOpen(final boolean _open) {
	    

    	//open or close the menu
	    if (_open != opened) {


        	if (menuListener != null) {
        		if (isOpen()) {

	        		menuListener.beforeOpen();
        		} else {

	        		menuListener.beforeClose();
        		}
        	} else {
        		State.getLogger().warning("no menu listener inserted!");
        	}
	    	//open or close
	    	
	        this.opened = _open;
	        final int heightMButton = 15;

	        //if is not opened set border.
	        if (opened) {
	            final Color clr_highlight = new Color(165, 165, 190);
	            setBorder(clr_highlight, Color.LIGHT_GRAY);  
	        }


	        
	        if (opened) {

	                final int borderSpace = 2;
	                final int totalWidth = jlbl_border.getWidth() 
	                        - 2 * borderSpace;
	                final int itemSize = totalWidth / itemsInRow;

	                if (pnt_previousItem == null) {

                        super.setSize(getWidth(), height); 
	                } else {

                        int realheight = pnt_previousItem.y + itemSize;
	                    if (realheight < height) {
	                        realheight = height;
	                    }
                        super.setSize(getWidth(), realheight);  
	                } 
	        } else {

	            super.setSize(getWidth(), height);
	        }

	        jlbl_border.setBounds(
	                distance, 
	                distance, 
	                getWidth() - distance * 2,
	                getHeight() - distance * 2 - heightMButton);
	        
	        jbtn_open.setBounds(
	                jlbl_border.getX(),
	                jlbl_border.getY() + jlbl_border.getHeight(), 
	                jlbl_border.getWidth(), 
	                heightMButton);
	        

        	if (menuListener != null) {
        		if (isOpen()) {

	        		menuListener.afterOpen();
        		} else {

	        		menuListener.afterClose();
        		}
        	} else {
        		State.getLogger().warning("no menu listener inserted!");
        	}
	        
	    } //otherwise nothing to do
	    repaint();
	}