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 257597 Details for
Bug 480926
[GTK3] incorrect cell editor position in tree caused by PaintItem listener
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.
The code snippet to reproduce the issue
TreeEditorPositionBug.java (text/plain), 1.78 KB, created by
Alexander Burdukov
on 2015-10-28 17:14:31 EDT
(
hide
)
Description:
The code snippet to reproduce the issue
Filename:
MIME Type:
Creator:
Alexander Burdukov
Created:
2015-10-28 17:14:31 EDT
Size:
1.78 KB
patch
obsolete
>package com.bug; > >import org.eclipse.swt.SWT; >import org.eclipse.swt.custom.TreeEditor; >import org.eclipse.swt.events.MouseAdapter; >import org.eclipse.swt.events.MouseEvent; >import org.eclipse.swt.layout.FillLayout; >import org.eclipse.swt.widgets.*; > >public class TreeEditorPositionBug { > public static void main(String[] args) { > Display display = new Display(); > Shell shell = new Shell(display); > shell.setLayout(new FillLayout()); > > final Tree tree = new Tree(shell, SWT.FULL_SELECTION); > tree.setLinesVisible(true); > tree.setHeaderVisible(true); > > TreeColumn column1 = new TreeColumn(tree, 0); > column1.setText("Column 1"); > column1.setWidth(150); > > TreeColumn column2 = new TreeColumn(tree, 0); > column2.setText("Column 2"); > column2.setWidth(150); > > TreeItem item = new TreeItem(tree, SWT.NONE, 0); > item.setText("Row 1"); > > final TreeEditor treeEditor = new TreeEditor(tree); > treeEditor.horizontalAlignment = SWT.LEFT; > treeEditor.grabHorizontal = true; > > tree.addMouseListener(new MouseAdapter() { > public void mouseUp(MouseEvent e) { > TreeItem item = tree.getSelection()[0]; > Text text = new Text(tree, SWT.NONE); > treeEditor.setEditor(text, item, 1); > } > }); > > tree.addListener(SWT.PaintItem, new Listener() { > @Override > public void handleEvent(Event event) { > > } > }); > > shell.setSize(600, 400); > shell.open(); > > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) { > display.sleep(); > } > } > > display.dispose(); > } >}
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 480926
: 257597