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 60649 Details for
Bug 176984
Rendering Problems
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.
Sample class reproducing the bug with an extended rectangle figure
LargeFigure.java (text/x-java), 1.47 KB, created by
Manuel Selva
on 2007-03-13 03:50:04 EDT
(
hide
)
Description:
Sample class reproducing the bug with an extended rectangle figure
Filename:
MIME Type:
Creator:
Manuel Selva
Created:
2007-03-13 03:50:04 EDT
Size:
1.47 KB
patch
obsolete
>package draw2d; > >import org.eclipse.draw2d.ColorConstants; >import org.eclipse.draw2d.FigureCanvas; >import org.eclipse.draw2d.Graphics; >import org.eclipse.draw2d.Panel; >import org.eclipse.draw2d.RectangleFigure; >import org.eclipse.draw2d.XYLayout; >import org.eclipse.draw2d.geometry.Rectangle; >import org.eclipse.swt.layout.FillLayout; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; > >public class LargeFigure { > > private static class LargeRectangle extends RectangleFigure { > > @Override > public void fillShape(Graphics g) { > > Rectangle rect = g.getClip(Rectangle.SINGLETON); > rect.intersect(getBounds()); > g.fillRectangle(rect); > > System.out.println(rect); > } > } > > /** > * @param args > */ > public static void main(String[] args) { > > //Create display and shell > Display display = new Display(); > Shell shell = new Shell(display); > shell.setLayout(new FillLayout()); > > FigureCanvas canvas = new FigureCanvas(shell); > Panel panel = new Panel(); > panel.setLayoutManager(new XYLayout()); > RectangleFigure rect = new LargeRectangle(); > rect.setLineWidth(3); > rect.setBackgroundColor(ColorConstants.red); > panel.add(rect, new Rectangle(10, 10, 150000000, 100)); > canvas.setContents(panel); > > //Open the shell and start UI loop > shell.setSize(200, 150); > 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 176984
:
60549
| 60649