comparison dwt/custom/TableEditor.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 380bad9f6852
children
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 *
79 * newEditor.setFocus(); 79 * newEditor.setFocus();
80 * editor.setEditor(newEditor, item, EDITABLECOLUMN); 80 * editor.setEditor(newEditor, item, EDITABLECOLUMN);
81 * } 81 * }
82 * }); 82 * });
83 * </pre></code> 83 * </pre></code>
84 *
85 * @see <a href="http://www.eclipse.org/swt/snippets/#tableeditor">TableEditor snippets</a>
86 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
84 */ 87 */
85 public class TableEditor : ControlEditor { 88 public class TableEditor : ControlEditor {
86 Table table; 89 Table table;
87 TableItem item; 90 TableItem item;
88 int column = -1; 91 int column = -1;
228 this.column = column; 231 this.column = column;
229 TableColumn tableColumn = table.getColumn(this.column); 232 TableColumn tableColumn = table.getColumn(this.column);
230 tableColumn.addControlListener(columnListener); 233 tableColumn.addControlListener(columnListener);
231 resize(); 234 resize();
232 } 235 }
236 /**
237 * Specifies the <code>TableItem</code> that is to be edited.
238 *
239 * @param item the item to be edited
240 */
233 public void setItem (TableItem item) { 241 public void setItem (TableItem item) {
234 this.item = item; 242 this.item = item;
235 resize(); 243 resize();
236 } 244 }
237 public override void setEditor (Control editor) { 245 public override void setEditor (Control editor) {