Revision 17970

View differences:

trunk/libraries/libUIComponent/src/org/gvsig/gui/beans/treelist/listeners/TreeListListener.java
192 192

  
193 193
	public void mouseReleased(MouseEvent e) {
194 194
		//Si se ha pinchado sobre un elemento del arbol y se ha arrastrado lo a?adimos
195
		if(enterInList){
196
			if(draggLabel != null && draggActive == true){
197
				DefaultListModel model = (DefaultListModel)list.getModel();
195
		if (enterInList){
196
			if (draggLabel != null && draggActive == true) {
197
				insertElement();
198
/*				DefaultListModel model = (DefaultListModel)list.getModel();
198 199
				
199 200
				//Lanzamos el evento de a?adir un elemento
200 201
				ev.setElementAdded(draggLabel);
201 202
				elementAdded(ev);
202 203
				
203 204
				model.addElement(draggLabel);
205
*/
204 206
				draggLabel = null;
205 207
			}
206 208
		}
trunk/libraries/libUIComponent/src/org/gvsig/gui/beans/treelist/TreeListContainer.java
61 61
 * @author Nacho Brodin (brodin_ign@gva.es)
62 62
 */
63 63
public class TreeListContainer extends JPanel implements ActionListener, TreeSelectionListener, ListSelectionListener {
64
	private static final long   serialVersionUID = 6665259638830401366L;
65
	private ArrayList              listListeners = new ArrayList();
64
	private static final long serialVersionUID = 6665259638830401366L;
66 65

  
67
	private Hashtable              map           = null;
66
	private ArrayList              actionChangeListeners = new ArrayList();
68 67

  
68
	private ArrayList              listListeners         = new ArrayList();
69

  
70
	private Hashtable              map                   = null;
71

  
69 72
	// Componentes visuales
70
	private JScrollPane            pTree         = null;
71
	private JScrollPane            pList         = null;
72
	private JTree                  tree          = null;
73
	private JList                  list          = null;
74
	private JButton                bAdd          = null;
75
	private JButton                bDel          = null;
76
	private JSplitPane             jSplitPane1   = null;
77
	private JPanel                 jPanelButtons = null;
73
	private JScrollPane            pTree                 = null;
74
	private JScrollPane            pList                 = null;
75
	private JTree                  tree                  = null;
76
	private JList                  list                  = null;
77
	private JButton                bAdd                  = null;
78
	private JButton                bDel                  = null;
79
	private JSplitPane             jSplitPane1           = null;
80
	private JPanel                 jPanelButtons         = null;
78 81

  
79
	private DefaultMutableTreeNode raiz          = null;
80
	private TreeListListener       listener      = null;
81
	private String                 pathToImages  = "images/";
82
	private DefaultMutableTreeNode raiz                  = null;
83
	private TreeListListener       listener              = null;
84
	private String                 pathToImages          = "images/";
82 85

  
83 86
	/**
84 87
	 * This method initializes
......
307 310
	 * A?adir el disparador de cuando se pulsa un bot?n.
308 311
	 * @param listener
309 312
	 */
310
	private ArrayList actionChangeListeners = new ArrayList();
311

  
312 313
	public void addChangeSelectionListener(TreeListChangeListener listener) {
313 314
		if (!actionChangeListeners.contains(listener))
314 315
			actionChangeListeners.add(listener);

Also available in: Unified diff