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 63585 Details for
Bug 182083
[Graphics] Redraw artifacts using GlyphMetrics
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
Snippet182083.java (text/plain), 1.68 KB, created by
Christof Marti
on 2007-04-12 03:02:55 EDT
(
hide
)
Description:
Snippet to reproduce
Filename:
MIME Type:
Creator:
Christof Marti
Created:
2007-04-12 03:02:55 EDT
Size:
1.68 KB
patch
obsolete
>import org.eclipse.swt.SWT; >import org.eclipse.swt.custom.StyleRange; >import org.eclipse.swt.custom.StyledText; >import org.eclipse.swt.graphics.GlyphMetrics; >import org.eclipse.swt.layout.FillLayout; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; > >public class Snippet182083 { > > public static void main(String[] args) { > Display display= new Display(); > Shell shell= new Shell(display); > shell.setLayout(new FillLayout()); > StyledText text= new StyledText(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); > text.setText("0123456789\nABCDEFGHIJKLM\nNOPQRSTUVWXYZ\n0123456789\nABCDEFGHIJKLM\nNOPQRSTUVWXYZ\n0123456789\nABCDEFGHIJKLM\nNOPQRSTUVWXYZ\n0123456789\nABCDEFGHIJKLM\nNOPQRSTUVWXYZ\n0123456789\nABCDEFGHIJKLM\nNOPQRSTUVWXYZ\n0123456789\nABCDEFGHIJKLM\nNOPQRSTUVWXYZ\n0123456789\nABCDEFGHIJKLM\nNOPQRSTUVWXYZ\n0123456789\nABCDEFGHIJKLM\nNOPQRSTUVWXYZ\n0123456789\nABCDEFGHIJKLM\nNOPQRSTUVWXYZ\n0123456789\nABCDEFGHIJKLM\nNOPQRSTUVWXYZ\n0123456789\nABCDEFGHIJKLM\nNOPQRSTUVWXYZ\n0123456789\nABCDEFGHIJKLM\nNOPQRSTUVWXYZ\n"); > > for (int i= 0; i < text.getLineCount() - 1; i += 3) { > StyleRange style= new StyleRange(); > style.start= text.getOffsetAtLine(i); > style.length= 1; > style.metrics= new GlyphMetrics(20, 10, 5); > text.setStyleRange(style); > } > > shell.pack(); > shell.setBounds(100, 100, 200, 600); > shell.open(); > > for (int i= 0; i < text.getLineCount() - 3; i++) { > int offset= text.getOffsetAtLine(i + 1); > text.replaceTextRange(offset, text.getOffsetAtLine(i + 3) - offset, ""); > } > > 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 182083
: 63585 |
63587
|
75493