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 2046 Details for
Bug 5089
[Navigator] Dragging should occur with the middle mouse button on Linux
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Fixed drag and drop
CTabPartDragDrop.java (text/plain), 1.56 KB, created by
Knut Radloff
on 2002-09-23 18:14:37 EDT
(
hide
)
Description:
Fixed drag and drop
Filename:
MIME Type:
Creator:
Knut Radloff
Created:
2002-09-23 18:14:37 EDT
Size:
1.56 KB
patch
obsolete
>package org.eclipse.ui.internal; > >/* > * (c) Copyright IBM Corp. 2000, 2001. > * All Rights Reserved. > */ >import org.eclipse.swt.*; >import org.eclipse.swt.widgets.*; >import org.eclipse.swt.events.*; >import org.eclipse.swt.custom.*; >import org.eclipse.swt.graphics.*; > >/** > * Controls the drag and drop of the part > * which is contained within the CTabFolder > * tab. > */ >public class CTabPartDragDrop extends PartDragDrop { > private CTabItem tab; >public CTabPartDragDrop(LayoutPart dragPart, CTabFolder tabFolder, CTabItem tabItem) { > super(dragPart, tabFolder); > this.tab = tabItem; >} >protected CTabFolder getCTabFolder() { > return (CTabFolder) getDragControl(); >} >/** > * Returns the source's bounds > */ >protected Rectangle getSourceBounds() { > return PartTabFolder.calculatePageBounds(getCTabFolder()); >} >/** * Verifies that the tab under the mouse pointer is the same > * as for this drag operation > * > * @see org.eclipse.ui.internal.PartDragDrop#isDragAllowed(Point) */ >protected void isDragAllowed(Point position) { > CTabFolder tabFolder = getCTabFolder(); > CTabItem tabUnderPointer = tabFolder.getItem(position); > if (tabUnderPointer != tab) > return; > if(tabUnderPointer == null) { > //Avoid drag from the borders. > Rectangle clientArea = tabFolder.getClientArea(); > if((tabFolder.getStyle() & SWT.TOP) != 0) { > if(position.y > clientArea.y) > return; > } else { > if(position.y < clientArea.y + clientArea.height) > return; > } > } > > super.isDragAllowed(position); >} >public void setTab(CTabItem newTab) { > tab = newTab; >} >}
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 5089
: 2046 |
2047
|
2048