Revision 4556

View differences:

trunk/libraries/libUI/src/org/gvsig/gui/beans/controls/dnd/JDnDList.java
23 23

  
24 24
import javax.swing.JList;
25 25

  
26

  
26 27
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
27 28
 *
28 29
 * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
......
68 69
 *
69 70
 * $Id$
70 71
 * $Log$
71
 * Revision 1.1  2006-03-22 11:18:29  jaume
72
 * Revision 1.2  2006-03-23 10:37:11  jaume
72 73
 * *** empty log message ***
73 74
 *
75
 * Revision 1.1  2006/03/22 11:18:29  jaume
76
 * *** empty log message ***
77
 *
74 78
 * Revision 1.4  2006/02/28 15:25:14  jaume
75 79
 * *** empty log message ***
76 80
 *
......
262 266
    public void dropActionChanged(DropTargetDragEvent dtde) {
263 267
        
264 268
    }
269
    
270
    /**
271
     * Constructs a <b>JDnDListModel</b> from an array of objects and then applies setModel to it. 
272
     * @param listData an array of Objects containing the items to display in the list
273
     * @see	setModel
274
     * @author jaume
275
     */
276
    public void setListData(Object[] obj) {
277
    	JDnDListModel model = new JDnDListModel();
278
		for (int i = 0; i < obj.length; i++) {
279
			model.addElement(obj[i]);
280
		}
281
		this.setModel(model);
282
    }
265 283
}

Also available in: Unified diff