Control focus = getDisplay().getFocusControl(); if (focus == frame) { return frame.getCurrentDocument() == this; }
checkWidget (); if (objIOleInPlaceObject == null) return false; int[] phwnd = new int[1]; objIOleInPlaceObject.GetWindow(phwnd); if (phwnd[0] == 0) return false; int handle = OS.GetFocus(); do { if (phwnd[0] == handle) return true; } while ((handle = OS.GetParent (handle)) != 0);
public boolean isFocusControl () {	Control focus = getDisplay().getFocusControl();	if (focus == frame) {		return frame.getCurrentDocument() == this;	}	return false;}