| java.lang.Object org.eclipse.ui.internal.dnd.SwtUtil
SwtUtil | public class SwtUtil (Code) | | Contains static methods for manipulating SWT controls
since: 3.0 |
Method Summary | |
public static Control | controlThatCovers(Control toTest) Returns the control that is covering the given control, or null if none. | public static Control | findCommonAncestor(Control control1, Control control2) | public static Control | findControl(Display displayToSearch, Point locationToFind) Finds and returns the most specific SWT control at the given location. | public static Control | findControl(Control[] toSearch, Point locationToFind) Searches the given list of controls for a control containing the given point. | public static Control | findControl(Composite toSearch, Point locationToFind) | public static Control[] | getAncestors(Control theControl) | public static boolean | intersectsAnyMonitor(Display display, Rectangle someRectangle) Returns true iff the given rectangle is located in the client area of any
monitor. | public static boolean | isChild(Control potentialParent, Control childToTest) Determines if one control is a child of another. | public static boolean | isDisposed(Control toTest) | public static boolean | isFocusAncestor(Control potentialParent) |
controlThatCovers | public static Control controlThatCovers(Control toTest)(Code) | | Returns the control that is covering the given control, or null if none.
Parameters: toTest - control to test a control that obscures the test control or null if none |
findCommonAncestor | public static Control findCommonAncestor(Control control1, Control control2)(Code) | | |
findControl | public static Control findControl(Display displayToSearch, Point locationToFind)(Code) | | Finds and returns the most specific SWT control at the given location.
(Note: this does a DFS on the SWT widget hierarchy, which is slow).
Parameters: displayToSearch - Parameters: locationToFind - |
findControl | public static Control findControl(Control[] toSearch, Point locationToFind)(Code) | | Searches the given list of controls for a control containing the given point.
If the array contains any composites, those composites will be recursively
searched to find the most specific child that contains the point.
Parameters: toSearch - an array of composites Parameters: locationToFind - a point (in display coordinates) the most specific Control that overlaps the given point, or null if none |
findControl | public static Control findControl(Composite toSearch, Point locationToFind)(Code) | | Finds the control in the given location
Parameters: toSearch - Parameters: locationToFind - location (in display coordinates) |
getAncestors | public static Control[] getAncestors(Control theControl)(Code) | | |
intersectsAnyMonitor | public static boolean intersectsAnyMonitor(Display display, Rectangle someRectangle)(Code) | | Returns true iff the given rectangle is located in the client area of any
monitor.
Parameters: someRectangle - a rectangle in display coordinates (not null) true iff the given point can be seen on any monitor |
isChild | public static boolean isChild(Control potentialParent, Control childToTest)(Code) | | Determines if one control is a child of another. Returns true iff the second
argument is a child of the first (or the same object).
Parameters: potentialParent - Parameters: childToTest - |
isDisposed | public static boolean isDisposed(Control toTest)(Code) | | Returns true if the given control is null or has been disposed
Parameters: toTest - the control to test false if it is safe to invoke methods on the given control |
isFocusAncestor | public static boolean isFocusAncestor(Control potentialParent)(Code) | | |
|
|