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 115135 Details for
Bug 250917
Hidden control does not lose focus
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.
Test cas
clipboard.txt (text/plain), 2.02 KB, created by
RĂ¼diger Herrmann
on 2008-10-15 07:07:27 EDT
(
hide
)
Description:
Test cas
Filename:
MIME Type:
Creator:
RĂ¼diger Herrmann
Created:
2008-10-15 07:07:27 EDT
Size:
2.02 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt.test >Index: src/org/eclipse/swt/widgets/Control_Test.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.rap/org.eclipse.rap.rwt.test/src/org/eclipse/swt/widgets/Control_Test.java,v >retrieving revision 1.12 >diff -u -r1.12 Control_Test.java >--- src/org/eclipse/swt/widgets/Control_Test.java 19 Sep 2008 13:06:27 -0000 1.12 >+++ src/org/eclipse/swt/widgets/Control_Test.java 15 Oct 2008 11:07:03 -0000 >@@ -20,6 +20,7 @@ > import org.eclipse.swt.events.*; > import org.eclipse.swt.graphics.*; > import org.eclipse.swt.internal.widgets.IControlAdapter; >+import org.eclipse.swt.layout.FillLayout; > > > public class Control_Test extends TestCase { >@@ -558,6 +559,34 @@ > shell.dispose(); > assertSame( null, display.getFocusControl() ); > } >+ >+ public void testHideFocusedControl() { >+ Display display = new Display(); >+ Shell shell = new Shell( display, SWT.NONE ); >+ shell.setLayout( new FillLayout() ); >+ Composite composite = new Composite( shell, SWT.NONE ); >+ Control control = new Button( composite, SWT.PUSH ); >+ shell.setSize( 100, 100 ); >+ shell.open(); >+ >+ // Hide control -> its parent (composite) must take focus >+ control.setFocus(); >+ assertTrue( control.isFocusControl() ); >+ control.setVisible( false ); >+ assertFalse( control.isFocusControl() ); >+ assertTrue( composite.isFocusControl() ); >+ assertSame( composite, display.getFocusControl() ); >+ >+ // Indirectly hide control -> shell must take focus >+ control.setVisible( true ); >+ control.setFocus(); >+ composite.setVisible( false ); >+ assertFalse( control.isVisible() ); >+ assertFalse( control.isFocusControl() ); >+ assertFalse( composite.isFocusControl() ); >+ assertTrue( shell.isFocusControl() ); >+ assertSame( shell, display.getFocusControl() ); >+ } > > public void testFocusEventsForForceFocus() { > final StringBuffer log = new StringBuffer();
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 250917
: 115135