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 253710 Details for
Bug 465984
Double-clicking in package explorer leaves focus on package explorer rather than editor
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.
SWT test snippet
LTEST_465984_TreeDoubleClick.java (text/plain), 2.44 KB, created by
Leo Ufimtsev
on 2015-05-22 15:52:48 EDT
(
hide
)
Description:
SWT test snippet
Filename:
MIME Type:
Creator:
Leo Ufimtsev
Created:
2015-05-22 15:52:48 EDT
Size:
2.44 KB
patch
obsolete
>package noDependencies; >import junit.tests.ShellTest; >import junit.tests.support.WidgetFactory; > >import org.eclipse.swt.SWT; >import org.eclipse.swt.custom.CTabFolder; >import org.eclipse.swt.custom.CTabItem; >import org.eclipse.swt.custom.StyledText; >import org.eclipse.swt.events.KeyEvent; >import org.eclipse.swt.events.KeyListener; >import org.eclipse.swt.events.MouseEvent; >import org.eclipse.swt.events.MouseListener; >import org.eclipse.swt.events.MouseMoveListener; >import org.eclipse.swt.graphics.Color; >import org.eclipse.swt.graphics.Point; >import org.eclipse.swt.graphics.Rectangle; >import org.eclipse.swt.internal.gtk.OS; >import org.eclipse.swt.layout.FillLayout; >import org.eclipse.swt.layout.GridData; >import org.eclipse.swt.layout.GridLayout; >import org.eclipse.swt.layout.RowLayout; >import org.eclipse.swt.widgets.Button; >import org.eclipse.swt.widgets.Composite; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Event; >import org.eclipse.swt.widgets.Group; >import org.eclipse.swt.widgets.Label; >import org.eclipse.swt.widgets.Listener; >import org.eclipse.swt.widgets.Shell; >import org.eclipse.swt.widgets.Tree; >import org.eclipse.swt.widgets.TreeItem; > > >public class LTEST_465984_TreeDoubleClick { > static Display display = new Display(); > static Shell shell = new Shell(display); > > public static void main (String [] args) { > //shell.setText (ShellTest.getGtkVersion ()); > shell.setLayout (new GridLayout ()); > System.out.println ("Shell GdkWindow: " + ShellTest.getGdkWindowInHex (shell)); > > final Tree tree = new Tree (shell, SWT.BORDER | SWT.MULTI); > for (int i=0; i<12; i++) { > TreeItem treeItem = new TreeItem (tree, SWT.NONE); > treeItem.setText ("Item " + i); > } > > final StyledText styledText = new StyledText (shell, SWT.V_SCROLL | SWT.H_SCROLL); > styledText.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true)); > styledText.setText ("hello world."); > > tree.addMouseListener (new MouseListener() { > > @Override > public void mouseUp (MouseEvent e) { > System.out.println ("Mouse up."); > System.out.println ("------------"); > } > > @Override > public void mouseDown (MouseEvent e) { > System.out.println ("Mouse down"); > > } > > @Override > public void mouseDoubleClick (MouseEvent e) { > System.out.println ("Mouse double click"); > styledText.setFocus (); > } > }); > 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 465984
:
253710
|
253711