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 189297 Details for
Bug 222859
Support native Mac toolbar
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.
Testcase comparing getToolbar() vs TRIM_FILL
UnifiedToolbar.java (text/plain), 1.78 KB, created by
Felipe Heidrich
on 2011-02-18 11:54:35 EST
(
hide
)
Description:
Testcase comparing getToolbar() vs TRIM_FILL
Filename:
MIME Type:
Creator:
Felipe Heidrich
Created:
2011-02-18 11:54:35 EST
Size:
1.78 KB
patch
obsolete
>package tests; > >import org.eclipse.swt.SWT; > >import org.eclipse.swt.graphics.Image; >import org.eclipse.swt.layout.*; >import org.eclipse.swt.widgets.*; > >public class UnifiedToolbar { > >public static void main(String[] args) { > Display display = new Display(); > main1(display); > main3(display); > Shell shell = display.getShells()[0]; > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) > display.sleep(); > } > display.dispose(); >} >public static void main3(Display display) { > Shell shell = new Shell(display, SWT.SHELL_TRIM ); > GridLayout layout = new GridLayout(1, false); > layout.marginHeight = layout.marginWidth = 0; > shell.setLayout(layout); > > ToolBar toolBar = shell.getToolBar(); > ToolItem item = new ToolItem (toolBar, SWT.PUSH); > Image image = new Image(display, 30, 30); > item.setImage(image); > item = new ToolItem (toolBar, SWT.PUSH); > item.setText("native app toolbar"); > > Button b = new Button(shell, SWT.PUSH); > b.setText("client"); > shell.setSize(300, 400); > shell.open(); >} > > >public static void main1(Display display) { > Shell shell = new Shell(display, SWT.SHELL_TRIM | SWT.TRIM_FILL); > GridLayout layout = new GridLayout(1, false); > layout.marginHeight = layout.marginWidth = 0; > shell.setLayout(layout); > > ToolBar toolBar = new ToolBar(shell, SWT.FLAT); > ToolItem item = new ToolItem (toolBar, SWT.PUSH); > Image image = new Image(display, 30, 30); > item.setImage(image); > item = new ToolItem (toolBar, SWT.PUSH); > item.setText("regular toolbar"); > toolBar.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); > > Composite composite = new Composite(shell, SWT.BORDER); > composite.setLayoutData(new GridData(GridData.FILL_BOTH)); > composite.setLayout(new GridLayout(1, false)); > Button b = new Button(composite, SWT.PUSH); > b.setText("client"); > shell.setSize(300, 400); > shell.open(); >} > >}
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 222859
:
97896
|
99000
|
99485
|
99492
|
99494
|
100753
|
129651
|
129697
|
129893
|
129894
|
129909
|
129973
|
130031
|
130057
|
147838
|
170610
|
170611
|
180221
|
180379
|
180532
|
180977
| 189297 |
189299