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 4837 Details for
Bug 37427
[Bidi] Origin is 1, 0 in RIGHT_TO_LEFT Canvas
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.
test case
Bug_37427.java (text/plain), 1.20 KB, created by
Knut Radloff
on 2003-05-09 10:49:21 EDT
(
hide
)
Description:
test case
Filename:
MIME Type:
Creator:
Knut Radloff
Created:
2003-05-09 10:49:21 EDT
Size:
1.20 KB
patch
obsolete
>package kr.PR; > >import org.eclipse.swt.SWT; >import org.eclipse.swt.graphics.*; >import org.eclipse.swt.layout.GridData; >import org.eclipse.swt.layout.GridLayout; >import org.eclipse.swt.widgets.*; > >public class Bug_37427 { > public static void main(String[] args) { > final Shell shell = new Shell(); > Display display = shell.getDisplay(); > final boolean[] draw = {false}; > final Canvas canvas = new Canvas(shell, SWT.RIGHT_TO_LEFT); > final String testString = "test"; > > canvas.setBackground(new Color(display, 222, 222, 0)); > canvas.addListener(SWT.Paint, new Listener() { > public void handleEvent(Event event) { > if (draw[0]) { > event.gc.drawString(testString, 0, 0); > } > } > }); > canvas.addListener(SWT.MouseDown, new Listener() { > public void handleEvent(Event event) { > GC gc = new GC(canvas); > draw[0] = !draw[0]; > canvas.redraw(0, 0, gc.stringExtent(testString).x, 100, false); > System.out.println("MouseDown x: " + event.x); > } > }); > canvas.setLayoutData(new GridData(GridData.FILL_BOTH)); > shell.setLayout(new GridLayout()); > shell.open(); > while (!shell.isDisposed ()) { > if (!display.readAndDispatch ()) display.sleep (); > } > > } >} > >
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 37427
: 4837