Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 45533 Details for
Bug 87733
[CellEditors] Double click behavior for tableviewer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Example how it works
TestDoubleClick.java (text/x-java), 1.95 KB, created by
Thomas Schindl
on 2006-06-29 09:50:27 EDT
(
hide
)
Description:
Example how it works
Filename:
MIME Type:
Creator:
Thomas Schindl
Created:
2006-06-29 09:50:27 EDT
Size:
1.95 KB
patch
obsolete
> > >import org.eclipse.jface.viewers.CellEditor; >import org.eclipse.jface.viewers.DoubleClickEditorActivationStrategy; >import org.eclipse.jface.viewers.ICellModifier; >import org.eclipse.jface.viewers.IStructuredContentProvider; >import org.eclipse.jface.viewers.TableViewer; >import org.eclipse.jface.viewers.TextCellEditor; >import org.eclipse.jface.viewers.Viewer; >import org.eclipse.swt.SWT; >import org.eclipse.swt.layout.FillLayout; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; >import org.eclipse.swt.widgets.TableColumn; > >public class TestDoubleClick { > private static class MyContentProvider implements > IStructuredContentProvider { > > private Object[] _items = new Object[] { "one", "two", "three" }; > > public Object[] getElements(Object arg0) { > return _items; > } > > public void dispose() { > } > > public void inputChanged(Viewer arg0, Object arg1, Object arg2) { > > } > } > > public static void main(String[] args) { > Shell shell = new Shell(Display.getCurrent()); > shell.setLayout(new FillLayout()); > > final TableViewer table = new TableViewer(shell, SWT.VIRTUAL); > final MyContentProvider provider = new MyContentProvider(); > > TableColumn column = new TableColumn(table.getTable(),SWT.NONE); > column.setWidth(100); > > > table.setCellEditors(new CellEditor[] { new TextCellEditor(table.getTable()) }); > table.setColumnProperties(new String[] { "col1" }); > table.setCellModifier(new ICellModifier() { > > public boolean canModify(Object element, String property) { > return true; > } > > public Object getValue(Object element, String property) { > return element; > } > > public void modify(Object element, String property, Object value) { > > } > > }); > > table.setCellEditorActivationStrategy(new DoubleClickEditorActivationStrategy()); > table.setContentProvider(provider); > table.setInput("input"); > > > > shell.setVisible(true); > > while (!shell.isDisposed()) { > shell.getDisplay().readAndDispatch(); > } > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 87733
:
45532
| 45533 |
46238