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 284214 Details for
Bug 567226
[GTK] ExpandItem not clipped to ExpandBar
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Minimal program to expose the issue
ExpandBarTest.java (text/x-java), 2.15 KB, created by
Ron Anderson
on 2020-09-21 17:12:44 EDT
(
hide
)
Description:
Minimal program to expose the issue
Filename:
MIME Type:
Creator:
Ron Anderson
Created:
2020-09-21 17:12:44 EDT
Size:
2.15 KB
patch
obsolete
>import org.eclipse.swt.SWT; >import org.eclipse.swt.graphics.Image; >import org.eclipse.swt.layout.GridData; >import org.eclipse.swt.layout.GridLayout; >import org.eclipse.swt.widgets.Composite; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.ExpandBar; >import org.eclipse.swt.widgets.ExpandItem; >import org.eclipse.swt.widgets.Label; >import org.eclipse.swt.widgets.Shell; > >public class ExpandBarTest { > private static final String SWT_GTK3 = "SWT_GTK3"; > > public static void main(String[] args) { > > Display display = new Display(); > Shell shell = new Shell(display, SWT.TITLE | SWT.CLOSE | SWT.RESIZE); > shell.setLayout(new GridLayout(1, true)); > shell.setText("ExpandBarTest"); > ExpandBar bar = new ExpandBar(shell, SWT.V_SCROLL); > bar.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); > Image image = display.getSystemImage(SWT.ICON_QUESTION); > > for (int i = 1; i <= 3; i++) { > Composite composite = new Composite(bar, SWT.NONE); > GridLayout layout = new GridLayout(); > layout.marginLeft = 10; > composite.setLayout(layout); > for (int j = 1; j <= 3; j++) { > Label label = new Label(composite, SWT.NONE); > label.setText(String.format("SubItem %d.%d", i, j)); > } > ExpandItem item = new ExpandItem(bar, SWT.NONE, 0); > item.setText("Expand Item " + i); > item.setHeight(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT).y); > item.setControl(composite); > } > > Label label = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL); > label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); > > label = new Label(shell, SWT.NONE); > label.setText("Some random text"); > label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); > > shell.pack(); > shell.setMinimumSize(shell.getSize()); > shell.open(); > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) { > display.sleep(); > } > } > image.dispose(); > 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 567226
: 284214 |
284215
|
284216