comparison dwt/custom/TreeEditor.d @ 259:c0d810de7093

Update SWT 3.4M7 to 3.4
author Frank Benoit <benoit@tionex.de>
date Sun, 29 Jun 2008 14:33:38 +0200
parents 98b80b00af79
children 96b14a31d9b3
comparison
equal deleted inserted replaced
257:cc1d3de0e80b 259:c0d810de7093
1 /******************************************************************************* 1 /*******************************************************************************
2 * Copyright (c) 2000, 2007 IBM Corporation and others. 2 * Copyright (c) 2000, 2008 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials 3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0 4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at 5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html 6 * http://www.eclipse.org/legal/epl-v10.html
7 * 7 *
77 * newEditor.setFocus(); 77 * newEditor.setFocus();
78 * editor.setEditor(newEditor, item); 78 * editor.setEditor(newEditor, item);
79 * } 79 * }
80 * }); 80 * });
81 * </pre></code> 81 * </pre></code>
82 *
83 * @see <a href="http://www.eclipse.org/swt/snippets/#treeeditor">TreeEditor snippets</a>
84 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
82 */ 85 */
83 86
84 public class TreeEditor : ControlEditor { 87 public class TreeEditor : ControlEditor {
85 Tree tree; 88 Tree tree;
86 TreeItem item; 89 TreeItem item;
273 TreeColumn treeColumn = tree.getColumn(this.column); 276 TreeColumn treeColumn = tree.getColumn(this.column);
274 treeColumn.addControlListener(columnListener); 277 treeColumn.addControlListener(columnListener);
275 resize(); 278 resize();
276 } 279 }
277 280
281 /**
282 * Specifies the <code>TreeItem</code> that is to be edited.
283 *
284 * @param item the item to be edited
285 */
278 public void setItem (TreeItem item) { 286 public void setItem (TreeItem item) {
279 this.item = item; 287 this.item = item;
280 resize(); 288 resize();
281 } 289 }
282 290