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 157498 Details for
Bug 301090
ColumnViewer returns a wrong cell by x-y-location in case when the scrolls are visible
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.
Snippet to reproduce
ScrollingBugDialog.java (text/x-java), 3.66 KB, created by
Yury
on 2010-01-28 02:09:12 EST
(
hide
)
Description:
Snippet to reproduce
Filename:
MIME Type:
Creator:
Yury
Created:
2010-01-28 02:09:12 EST
Size:
3.66 KB
patch
obsolete
>package com.rocketsoftware.bi.ide.core.ui; > >import java.util.ArrayList; > >import org.eclipse.jface.dialogs.Dialog; >import org.eclipse.jface.viewers.ArrayContentProvider; >import org.eclipse.jface.viewers.CellEditor; >import org.eclipse.jface.viewers.ICellModifier; >import org.eclipse.jface.viewers.LabelProvider; >import org.eclipse.jface.viewers.TableViewer; >import org.eclipse.jface.viewers.TextCellEditor; >import org.eclipse.swt.SWT; >import org.eclipse.swt.graphics.Point; >import org.eclipse.swt.layout.GridData; >import org.eclipse.swt.layout.GridLayout; >import org.eclipse.swt.widgets.Composite; >import org.eclipse.swt.widgets.Control; >import org.eclipse.swt.widgets.Shell; >import org.eclipse.swt.widgets.Table; >import org.eclipse.swt.widgets.TableColumn; > >public class ScrollingBugDialog > extends Dialog >{ > private TableViewer m_viewer; > > /** > * Create repository search dialog > * > * @param parentShell > * A parent shell > * @param session > * A session object > */ > public ScrollingBugDialog( > Shell parentShell) > { > super(parentShell); > setShellStyle(getShellStyle() | SWT.RESIZE); > } > > /** > * Creates and returns the contents of the upper part of this dialog (above > * the button bar). > * > * @param parent > * the parent composite to contain the dialog area > * @return the dialog area control > */ > protected Control createDialogArea(Composite parent) > { > Composite composite = (Composite)super.createDialogArea(parent); > composite.setLayout(new GridLayout()); > composite.setLayoutData(new GridData(GridData.FILL_BOTH)); > > m_viewer = new TableViewer(composite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.FULL_SELECTION); > Table table = m_viewer.getTable(); > table.setHeaderVisible(true); > table.setLayoutData(new GridData(GridData.FILL_BOTH)); > > TableColumn column1 = new TableColumn(table, SWT.LEFT); > column1.setText("Column1"); > column1.setWidth(200); > > m_viewer.setCellEditors(new CellEditor[] {new TextCellEditor(table)}); > m_viewer.setCellModifier(new ICellModifier() > { > > public boolean canModify(Object element, String property) > { > return true; > } > > public Object getValue(Object element, String property) > { > return element.toString(); > } > > public void modify(Object element, String property, Object value) > { > } > } > ); > m_viewer.setLabelProvider(new LabelProvider()); > m_viewer.setColumnProperties(new String[]{"Column1"}); > m_viewer.setContentProvider(new ArrayContentProvider()); > ArrayList items = new ArrayList(); > items.add("item1"); > items.add("item2"); > items.add("item3"); > items.add("item4"); > items.add("item5"); > items.add("item6"); > items.add("item7"); > items.add("item8"); > items.add("item9"); > m_viewer.setInput(items); > > return composite; > } > > /** > * Configures the given shell in preparation for opening this window > * in it. > * > * @param newShell the shell > */ > protected void configureShell(Shell shell) > { > super.configureShell(shell); > shell.setText("Table Dialog"); > } > > protected Point getInitialSize() > { > return new Point(220, 200); > } >}
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 301090
: 157498