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 169346 Details for
Bug 313538
[design] DblClick on tabfolder should trigger min/max behavior
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.
[patch]
Fix2
bug313538.patch (text/plain), 5.10 KB, created by
Holger Staudacher
on 2010-05-20 10:01:33 EDT
(
hide
)
Description:
Fix2
Filename:
MIME Type:
Creator:
Holger Staudacher
Created:
2010-05-20 10:01:33 EDT
Size:
5.10 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.design.example >Index: src/org/eclipse/rap/internal/design/example/stacks/ViewStackPresentation.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.ui/org.eclipse.rap.design.example/src/org/eclipse/rap/internal/design/example/stacks/ViewStackPresentation.java,v >retrieving revision 1.24 >diff -u -r1.24 ViewStackPresentation.java >--- src/org/eclipse/rap/internal/design/example/stacks/ViewStackPresentation.java 19 May 2010 14:33:51 -0000 1.24 >+++ src/org/eclipse/rap/internal/design/example/stacks/ViewStackPresentation.java 20 May 2010 14:00:20 -0000 >@@ -28,6 +28,8 @@ > import org.eclipse.swt.events.ControlEvent; > import org.eclipse.swt.events.DisposeEvent; > import org.eclipse.swt.events.DisposeListener; >+import org.eclipse.swt.events.MouseAdapter; >+import org.eclipse.swt.events.MouseEvent; > import org.eclipse.swt.events.SelectionAdapter; > import org.eclipse.swt.events.SelectionEvent; > import org.eclipse.swt.graphics.Color; >@@ -418,22 +420,8 @@ > }; > } ); > partButton.addListener( SWT.MouseDoubleClick, new Listener() { >- public void handleEvent( Event event ) { >- IWorkbench workbench = PlatformUI.getWorkbench(); >- IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); >- IWorkbenchPage page = window.getActivePage(); >- page.toggleZoom( getReference( part ) ); >- if( toolBarLayer != null ) { >- toolBarLayer.setVisible( false ); >- } >- if( currentPart != null ) { >- currentPart.getControl().moveAbove( null ); >- Control toolBar = currentPart.getToolBar(); >- if( toolBar != null ) { >- toolBar.moveAbove( null ); >- } >- } >- >+ public void handleEvent( final Event event ) { >+ togglePartZoom( part ); > } > } ); > Composite corner = new Composite( buttonArea, SWT.NONE ); >@@ -454,6 +442,23 @@ > buttonPartMap.put( buttonArea, part ); > buttonList.add( buttonArea ); > } >+ >+ private void togglePartZoom( final IPresentablePart part ) { >+ IWorkbench workbench = PlatformUI.getWorkbench(); >+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); >+ IWorkbenchPage page = window.getActivePage(); >+ page.toggleZoom( getReference( part ) ); >+ if( toolBarLayer != null ) { >+ toolBarLayer.setVisible( false ); >+ } >+ if( currentPart != null ) { >+ currentPart.getControl().moveAbove( null ); >+ Control toolBar = currentPart.getToolBar(); >+ if( toolBar != null ) { >+ toolBar.moveAbove( null ); >+ } >+ } >+ } > > protected void activatePart( final IPresentablePart part ) { > IWorkbench workbench = PlatformUI.getWorkbench(); >@@ -646,6 +651,48 @@ > manageOverflow(); > }; > } ); >+ addPartActivationListners(); >+ } >+ } >+ >+ private void addPartActivationListners() { >+ addPartActivationListnerToControl( tabBg ); >+ Map cornerMap = ( Map )stackBuilder.getAdapter( Map.class ); >+ Object corner = cornerMap.get( StackPresentationBuider.LEFT ); >+ addPartActivationListenerToCorner( corner ); >+ corner = cornerMap.get( StackPresentationBuider.RIGHT ); >+ addPartActivationListenerToCorner( corner ); >+ } >+ >+ private void addPartActivationListenerToCorner( Object corner ) { >+ if( corner != null && corner instanceof Label ) { >+ Label cornerLabel = ( Label )corner; >+ addPartActivationListnerToControl( cornerLabel ); >+ } >+ } >+ >+ private void addPartActivationListnerToControl( final Control control ) { >+ control.addMouseListener( new MouseAdapter() { >+ public void mouseUp( final MouseEvent e ) { >+ activatePartWithTabbar(); >+ } >+ >+ public void mouseDoubleClick( final MouseEvent e ) { >+ togglePartZoom( currentPart ); >+ } >+ } ); >+ } >+ >+ private void activatePartWithTabbar() { >+ activatePart( currentPart ); >+ if( toolBarLayer != null ) { >+ toolBarLayer.setVisible( false ); >+ } >+ // move the toolbar on top >+ currentPart.getControl().moveAbove( null ); >+ Control toolBar = currentPart.getToolBar(); >+ if( toolBar != null ) { >+ toolBar.moveAbove( null ); > } > } > >@@ -885,6 +932,7 @@ > fdConfArea.width = 28; > fdTabBg.right = new FormAttachment( confArea ); > confCorner = new Label( confArea, SWT.NONE ); >+ addPartActivationListnerToControl( confCorner ); > Image cornerImage > = stackBuilder.getImage( ILayoutSetConstants.STACK_INACTIVE_CORNER ); > confCorner.setImage( cornerImage ); >@@ -904,9 +952,9 @@ > FormData fdConfPos > = stackBuilder.getPosition( ILayoutSetConstants.STACK_CONF_POS ); > fdConfButton.right = fdConfPos.right; >+ addPartActivationListnerToControl( confButton ); > confButton.addSelectionListener( new SelectionAdapter(){ >- public void widgetSelected( SelectionEvent e ) { >- activatePart( getSite().getSelectedPart() ); >+ public void widgetSelected( final SelectionEvent e ) { > configAction.run(); > }; > } ); >@@ -1313,4 +1361,5 @@ > } > return result + WIDTH_SPACING; > } >+ > }
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 313538
:
169343
| 169346