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 185301 Details for
Bug 332710
[Tree] Broken horizontal scrolling
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.
This snippet creates a simple tree widget
TreeTest.java (text/x-java), 1.18 KB, created by
Tiber Sept
on 2010-12-16 05:00:12 EST
(
hide
)
Description:
This snippet creates a simple tree widget
Filename:
MIME Type:
Creator:
Tiber Sept
Created:
2010-12-16 05:00:12 EST
Size:
1.18 KB
patch
obsolete
>import org.eclipse.swt.*; >import org.eclipse.swt.widgets.*; > > >/** > * Tree test. > */ >public class TreeTest { > /** > * Creates the tree structure. > * @param parent The parent composite > */ > public void createTree( final Composite parent ) { > > final Tree tree = new Tree( parent, SWT.H_SCROLL | SWT.V_SCROLL ); > > addItem( > addItem( > addItem( tree, > "Lorem ipsum dolor sit amet" > ), > "Ut enim ad minim veniam, quis nostrud exercitation" > ), > "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu" > ); > > } > > /** > * Adds an item to a tree. > * @param tree > * @param text > * @param image > * @return > */ > private TreeItem addItem( final Tree tree, final String text ){ > TreeItem treeItem = new TreeItem( tree, SWT.NONE ); > treeItem.setText( text ); > return treeItem; > } > > /** > * Adds an item to a tree item. > * @param item > * @param text > * @param image > * @return > */ > private TreeItem addItem( final TreeItem item, final String text ){ > TreeItem treeItem = new TreeItem( item, SWT.NONE ); > treeItem.setText( text ); > treeItem.clearAll( true ); > return treeItem; > } >}
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 332710
: 185301