public void editRow(NSInteger column, NSInteger row, boolean select) { this.editColumn_row_withEvent_select(column, row, NSApplication.sharedApplication().currentEvent(), select); }
/** * @see NSOutlineView.Delegate */ @Override public boolean outlineView_shouldExpandItem(final NSOutlineView view, final NSObject item) { NSEvent event = NSApplication.sharedApplication().currentEvent(); if(event != null) { if(NSEvent.NSLeftMouseDragged == event.type()) { if(!preferences.getBoolean("browser.view.autoexpand")) { if(log.isDebugEnabled()) { log.debug("Returning false to #outlineViewShouldExpandItem while dragging because browser.view.autoexpand == false"); } // See tickets #98 and #633 return false; } final NSInteger draggingColumn = view.columnAtPoint(view.convertPoint_fromView(event.locationInWindow(), null)); if(draggingColumn.intValue() != 0) { if(log.isDebugEnabled()) { log.debug(String.format("Returning false to #outlineViewShouldExpandItem for column %s", draggingColumn)); } // See ticket #60 return false; } } } return true; }
NSEvent event = NSApplication.sharedApplication().currentEvent(); if(event != null) { NSPoint dragPosition = view.convertPoint_fromView(event.locationInWindow(), null);
return new NSInteger(this.get(controller.workdir()).size()); NSEvent event = NSApplication.sharedApplication().currentEvent(); if(event != null) { if(log.isDebugEnabled()) {
/** * @param rowIndexes is the list of row numbers that will be participating in the drag. * @return To refuse the drag, return false. To start a drag, return true and place * the drag data onto pboard (data, owner, and so on). * @see NSTableView.DataSource * Invoked by view after it has been determined that a drag should begin, but before the drag has been started. * The drag image and other drag-related information will be set up and provided by the table view once this call * returns with true. */ @Override public boolean tableView_writeRowsWithIndexes_toPasteboard(final NSTableView view, final NSIndexSet rowIndexes, final NSPasteboard pboard) { for(NSUInteger index = rowIndexes.firstIndex(); !index.equals(NSIndexSet.NSNotFound); index = rowIndexes.indexGreaterThanIndex(index)) { pasteboard.add(this.getSource().get(index.intValue())); } NSEvent event = NSApplication.sharedApplication().currentEvent(); if(event != null) { NSPoint dragPosition = view.convertPoint_fromView(event.locationInWindow(), null); NSRect imageRect = new NSRect(new NSPoint(dragPosition.x.doubleValue() - 16, dragPosition.y.doubleValue() - 16), new NSSize(32, 32)); // Writing a promised file of the host as a bookmark file to the clipboard view.dragPromisedFilesOfTypes(NSArray.arrayWithObject("duck"), imageRect, this.id(), true, event); return true; } return false; }