private double toolbarHeightForWindow(final NSWindow window) { NSRect windowFrame = NSWindow.contentRectForFrameRect_styleMask(window.frame(), window.styleMask()); return windowFrame.size.height.doubleValue() - window.contentView().frame().size.height.doubleValue(); }
/** * NSDraggingDestination protocol implementation */ @Action public NSUInteger draggingUpdated(final NSDraggingInfo sender) { final NSPasteboard pasteboard = sender.draggingPasteboard(); if(pasteboard.types().indexOfObject(NSString.stringWithString(NSPasteboard.FilesPromisePboardType)) != null) { final NSView hit = sender.draggingDestinationWindow().contentView().hitTest(sender.draggingLocation()); if(hit != null) { if(hit.equals(bookmarkSwitchView)) { return NSDraggingInfo.NSDragOperationCopy; } } } return NSDraggingInfo.NSDragOperationNone; }