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 73810 Details for
Bug 196572
Unify event order of MeasureItem and PaintItem events between different OS
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 show the situation
SnippetOwnerDrawEventOrder.java (text/plain), 1.91 KB, created by
Michael Chervil
on 2007-07-15 10:46:26 EDT
(
hide
)
Description:
Snippet to show the situation
Filename:
MIME Type:
Creator:
Michael Chervil
Created:
2007-07-15 10:46:26 EDT
Size:
1.91 KB
patch
obsolete
>import org.eclipse.swt.SWT; >import org.eclipse.swt.graphics.Image; >import org.eclipse.swt.graphics.Rectangle; >import org.eclipse.swt.layout.FillLayout; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Event; >import org.eclipse.swt.widgets.Listener; >import org.eclipse.swt.widgets.Shell; >import org.eclipse.swt.widgets.Table; >import org.eclipse.swt.widgets.TableColumn; >import org.eclipse.swt.widgets.TableItem; > >public class SnippetOwnerDrawEventOrder { > > public static void main(String[] args) { > Display display = new Display(); > Shell shell = new Shell(display); > shell.setLayout(new FillLayout()); > Table table = new Table(shell, SWT.FULL_SELECTION); > table.setLinesVisible(true); > table.setHeaderVisible(true); > int columnCount = 3; > for (int i = 0; i < columnCount; i++) { > TableColumn column = new TableColumn(table, SWT.NONE); > column.setText("Column " + i); > } > int itemCount = 2; > for (int i = 0; i < itemCount; i++) { > TableItem item = new TableItem(table, SWT.NONE); > item.setText(new String[] { "row " + i + " column 1", > "row " + i + " column 2", "row " + i + " column 3" }); > } > Listener paintListener = new Listener() { > public void handleEvent(Event event) { > switch (event.type) { > case SWT.MeasureItem: { > System.out.println("MeasureItem: " > + ((TableItem) event.item).getText(event.index)); > break; > } > case SWT.PaintItem: { > System.out.println("PaintItem: " > + ((TableItem) event.item).getText(event.index)); > break; > } > } > } > }; > table.addListener(SWT.MeasureItem, paintListener); > table.addListener(SWT.PaintItem, paintListener); > > for (int i = 0; i < columnCount; i++) { > table.getColumn(i).pack(); > } > shell.setSize(500, 200); > 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 196572
: 73810 |
73811