Search in sources :

Example 1 with NSNotification

use of ch.cyberduck.binding.foundation.NSNotification in project cyberduck by iterate-ch.

the class InfoController method setAclTable.

public void setAclTable(final NSTableView t) {
    this.aclTable = t;
    this.aclTable.setAllowsMultipleSelection(true);
    this.aclPermissionCellPrototype.setFont(NSFont.systemFontOfSize(NSFont.smallSystemFontSize()));
    this.aclPermissionCellPrototype.setControlSize(NSCell.NSSmallControlSize);
    this.aclPermissionCellPrototype.setCompletes(false);
    this.aclPermissionCellPrototype.setBordered(false);
    this.aclPermissionCellPrototype.setButtonBordered(false);
    this.aclTable.setColumnAutoresizingStyle(NSTableView.NSTableViewUniformColumnAutoresizingStyle);
    this.aclTable.tableColumnWithIdentifier(AclColumn.PERMISSION.name()).setDataCell(aclPermissionCellPrototype);
    this.aclTable.setDataSource((aclTableModel = new ListDataSource() {

        @Override
        public NSInteger numberOfRowsInTableView(NSTableView view) {
            return new NSInteger(acl.size());
        }

        public NSObject tableView_objectValueForTableColumn_row(NSTableView view, NSTableColumn tableColumn, NSInteger row) {
            if (row.intValue() < acl.size()) {
                final String identifier = tableColumn.identifier();
                final Acl.UserAndRole grant = acl.get(row.intValue());
                if (identifier.equals(AclColumn.GRANTEE.name())) {
                    return NSString.stringWithString(grant.getUser().getDisplayName());
                }
                if (identifier.equals(AclColumn.PERMISSION.name())) {
                    return NSString.stringWithString(grant.getRole().getName());
                }
            }
            return null;
        }

        @Override
        public void tableView_setObjectValue_forTableColumn_row(NSTableView view, NSObject value, NSTableColumn c, NSInteger row) {
            if (row.intValue() < acl.size()) {
                final Acl.UserAndRole grant = acl.get(row.intValue());
                if (c.identifier().equals(AclColumn.GRANTEE.name())) {
                    grant.getUser().setIdentifier(value.toString());
                }
                if (c.identifier().equals(AclColumn.PERMISSION.name())) {
                    grant.getRole().setName(value.toString());
                }
                if (StringUtils.isNotBlank(grant.getUser().getIdentifier()) && StringUtils.isNotBlank(grant.getRole().getName())) {
                    InfoController.this.aclInputDidEndEditing();
                }
            }
        }
    }).id());
    this.aclTable.setDelegate((aclTableDelegate = new AbstractTableDelegate<Acl.UserAndRole, AclColumn>(aclTable.tableColumnWithIdentifier(AclColumn.GRANTEE.name())) {

        @Override
        public boolean isColumnRowEditable(NSTableColumn column, NSInteger row) {
            if (column.identifier().equals(AclColumn.GRANTEE.name())) {
                final Acl.UserAndRole grant = acl.get(row.intValue());
                if (grant.getUser().isEditable()) {
                    return true;
                }
                // Group Grantee identifier is not editable
                return false;
            }
            if (column.identifier().equals(AclColumn.PERMISSION.name())) {
                final Acl.UserAndRole grant = acl.get(row.intValue());
                if (grant.getRole().isEditable()) {
                    return true;
                }
                // Static role that cannot be modified
                return false;
            }
            return true;
        }

        @Override
        public void tableRowDoubleClicked(final ID sender) {
            this.enterKeyPressed(sender);
        }

        @Override
        public void enterKeyPressed(final ID sender) {
            aclTable.editRow(aclTable.columnWithIdentifier(AclColumn.GRANTEE.name()), aclTable.selectedRow(), true);
        }

        @Override
        public void deleteKeyPressed(final ID sender) {
            aclRemoveButtonClicked(sender);
        }

        public String tableView_toolTipForCell_rect_tableColumn_row_mouseLocation(NSTableView t, NSCell cell, ID rect, NSTableColumn c, NSInteger row, NSPoint mouseLocation) {
            return this.tooltip(acl.get(row.intValue()), AclColumn.valueOf(c.identifier()));
        }

        @Override
        public String tooltip(Acl.UserAndRole c, final AclColumn column) {
            return c.getUser().getIdentifier();
        }

        @Override
        public void tableColumnClicked(NSTableView view, NSTableColumn c) {
        // 
        }

        @Override
        public void selectionDidChange(final NSNotification notification) {
            aclRemoveButton.setEnabled(aclTable.numberOfSelectedRows().intValue() > 0);
        }

        public void tableView_willDisplayCell_forTableColumn_row(NSTableView view, NSCell cell, NSTableColumn c, NSInteger row) {
            final Acl.UserAndRole grant = acl.get(row.intValue());
            if (c.identifier().equals(AclColumn.GRANTEE.name())) {
                final NSTextFieldCell textFieldCell = Rococoa.cast(cell, NSTextFieldCell.class);
                textFieldCell.setPlaceholderString(grant.getUser().getPlaceholder());
                if (grant.getUser().isEditable()) {
                    textFieldCell.setTextColor(NSColor.controlTextColor());
                } else {
                    // Group Grantee identifier is not editable
                    textFieldCell.setTextColor(NSColor.disabledControlTextColor());
                }
            }
            if (c.identifier().equals(AclColumn.PERMISSION.name())) {
                if (grant.getRole().isEditable()) {
                    cell.setEnabled(true);
                } else {
                    cell.setEnabled(false);
                }
            }
        }

        @Override
        protected boolean isTypeSelectSupported() {
            return false;
        }
    }).id());
    this.aclTable.sizeToFit();
}
Also used : NSObject(ch.cyberduck.binding.foundation.NSObject) NSNotification(ch.cyberduck.binding.foundation.NSNotification) NSPoint(org.rococoa.cocoa.foundation.NSPoint) AbstractTableDelegate(ch.cyberduck.binding.AbstractTableDelegate) NSMutableAttributedString(ch.cyberduck.binding.foundation.NSMutableAttributedString) NSString(ch.cyberduck.binding.foundation.NSString) NSAttributedString(ch.cyberduck.binding.foundation.NSAttributedString) ListDataSource(ch.cyberduck.binding.ListDataSource) NSInteger(org.rococoa.cocoa.foundation.NSInteger) ID(org.rococoa.ID)

Example 2 with NSNotification

use of ch.cyberduck.binding.foundation.NSNotification in project cyberduck by iterate-ch.

the class TransferController method setQueueTable.

public void setQueueTable(NSTableView view) {
    this.transferTable = view;
    this.transferTable.setRowHeight(new CGFloat(82));
    {
        NSTableColumn c = tableColumnsFactory.create(TransferColumn.progress.name());
        c.setMinWidth(80f);
        c.setWidth(300f);
        c.setResizingMask(NSTableColumn.NSTableColumnAutoresizingMask);
        this.transferTable.addTableColumn(c);
    }
    this.transferTable.setDataSource((transferTableModel = new TransferTableDataSource()).id());
    this.transferTable.setDelegate((transferTableDelegate = new AbstractTableDelegate<Transfer, TransferColumn>(transferTable.tableColumnWithIdentifier(TransferColumn.progress.name())) {

        @Override
        public String tooltip(final Transfer t, final TransferColumn column) {
            return t.getName();
        }

        @Override
        public void enterKeyPressed(final ID sender) {
            this.tableRowDoubleClicked(sender);
        }

        @Override
        public void deleteKeyPressed(final ID sender) {
            deleteButtonClicked(sender);
        }

        @Override
        public void tableColumnClicked(NSTableView view, NSTableColumn tableColumn) {
        // 
        }

        @Override
        public void tableRowDoubleClicked(final ID sender) {
            reloadButtonClicked(sender);
        }

        @Override
        public void selectionIsChanging(final NSNotification notification) {
            updateHighlight();
        }

        @Override
        public void selectionDidChange(final NSNotification notification) {
            updateHighlight();
            updateSelection();
            transferTable.noteHeightOfRowsWithIndexesChanged(NSIndexSet.indexSetWithIndexesInRange(NSRange.NSMakeRange(new NSUInteger(0), new NSUInteger(transferTable.numberOfRows()))));
        }

        public NSView tableView_viewForTableColumn_row(final NSTableView view, final NSTableColumn column, final NSInteger row) {
            final ProgressController controller = transferTableModel.getController(row.intValue());
            return controller.view();
        }

        @Override
        public boolean isTypeSelectSupported() {
            return true;
        }

        public String tableView_typeSelectStringForTableColumn_row(final NSTableView view, final NSTableColumn column, final NSInteger row) {
            return transferTableModel.getSource().get(row.intValue()).getName();
        }
    }).id());
    // receive drag events from types
    // in fact we are not interested in file promises, but because the browser model can only initiate
    // a drag with tableView.dragPromisedFilesOfTypes(), we listens for those events
    // and then use the private pasteboard instead.
    this.transferTable.registerForDraggedTypes(NSArray.arrayWithObjects(NSPasteboard.StringPboardType, // Accept file promises made myself
    NSPasteboard.FilesPromisePboardType));
    // No grid lines until list is loaded
    this.transferTable.setGridStyleMask(NSTableView.NSTableViewGridNone);
    // Set sselection properties
    this.transferTable.setAllowsMultipleSelection(true);
    this.transferTable.setAllowsEmptySelection(true);
    this.transferTable.setAllowsColumnReordering(false);
    this.transferTable.sizeToFit();
}
Also used : NSInteger(org.rococoa.cocoa.foundation.NSInteger) NSNotification(ch.cyberduck.binding.foundation.NSNotification) TransferTableDataSource(ch.cyberduck.ui.cocoa.datasource.TransferTableDataSource) DownloadTransfer(ch.cyberduck.core.transfer.DownloadTransfer) Transfer(ch.cyberduck.core.transfer.Transfer) AbstractTableDelegate(ch.cyberduck.binding.AbstractTableDelegate) ID(org.rococoa.ID) NSUInteger(org.rococoa.cocoa.foundation.NSUInteger) CGFloat(org.rococoa.cocoa.CGFloat)

Example 3 with NSNotification

use of ch.cyberduck.binding.foundation.NSNotification in project cyberduck by iterate-ch.

the class BookmarkController method hostFieldDidChange.

@Action
public void hostFieldDidChange(final NSNotification sender) {
    final String input = hostField.stringValue();
    if (Scheme.isURL(input)) {
        try {
            final Host parsed = HostParser.parse(input);
            bookmark.setHostname(parsed.getHostname());
            bookmark.setProtocol(parsed.getProtocol());
            bookmark.setPort(parsed.getPort());
            bookmark.setDefaultPath(parsed.getDefaultPath());
        } catch (HostParserException e) {
            e.getProtocol().ifPresent(p -> {
                bookmark.setHostname("");
                bookmark.setProtocol(p);
            });
            log.warn(e);
        }
    } else {
        bookmark.setHostname(input);
        bookmark.setCredentials(CredentialsConfiguratorFactory.get(bookmark.getProtocol()).configure(bookmark));
    }
    this.update();
}
Also used : NSInteger(org.rococoa.cocoa.foundation.NSInteger) NSObject(ch.cyberduck.binding.foundation.NSObject) NSSecureTextField(ch.cyberduck.binding.application.NSSecureTextField) Selector(org.rococoa.Selector) PreferencesFactory(ch.cyberduck.core.preferences.PreferencesFactory) NSWindow(ch.cyberduck.binding.application.NSWindow) StringUtils(org.apache.commons.lang3.StringUtils) LoginInputValidator(ch.cyberduck.ui.LoginInputValidator) Action(ch.cyberduck.binding.Action) ArrayList(java.util.ArrayList) NSNotification(ch.cyberduck.binding.foundation.NSNotification) SheetCallback(ch.cyberduck.binding.application.SheetCallback) NSMenuItem(ch.cyberduck.binding.application.NSMenuItem) NSPopUpButton(ch.cyberduck.binding.application.NSPopUpButton) ch.cyberduck.core(ch.cyberduck.core) HyperlinkAttributedStringFactory(ch.cyberduck.binding.HyperlinkAttributedStringFactory) Foundation(org.rococoa.Foundation) EnumSet(java.util.EnumSet) NSButton(ch.cyberduck.binding.application.NSButton) NSControl(ch.cyberduck.binding.application.NSControl) OpenSSHPrivateKeyConfigurator(ch.cyberduck.core.sftp.openssh.OpenSSHPrivateKeyConfigurator) NSURL(ch.cyberduck.binding.foundation.NSURL) NSSize(org.rococoa.cocoa.foundation.NSSize) NSNotificationCenter(ch.cyberduck.binding.foundation.NSNotificationCenter) HostParserException(ch.cyberduck.core.exception.HostParserException) Preferences(ch.cyberduck.core.preferences.Preferences) NSOpenPanel(ch.cyberduck.binding.application.NSOpenPanel) NSTextField(ch.cyberduck.binding.application.NSTextField) IconCacheFactory(ch.cyberduck.core.resources.IconCacheFactory) NSImage(ch.cyberduck.binding.application.NSImage) NSPoint(org.rococoa.cocoa.foundation.NSPoint) NSAttributedString(ch.cyberduck.binding.foundation.NSAttributedString) Objects(java.util.Objects) ID(org.rococoa.ID) List(java.util.List) Logger(org.apache.logging.log4j.Logger) LocalAccessDeniedException(ch.cyberduck.core.exception.LocalAccessDeniedException) BrowserLauncherFactory(ch.cyberduck.core.local.BrowserLauncherFactory) Rococoa(org.rococoa.Rococoa) Outlet(ch.cyberduck.binding.Outlet) SheetController(ch.cyberduck.binding.SheetController) NSCell(ch.cyberduck.binding.application.NSCell) AbstractBackgroundAction(ch.cyberduck.core.threading.AbstractBackgroundAction) ReachabilityFactory(ch.cyberduck.core.diagnostics.ReachabilityFactory) LogManager(org.apache.logging.log4j.LogManager) NSAttributedString(ch.cyberduck.binding.foundation.NSAttributedString) HostParserException(ch.cyberduck.core.exception.HostParserException) Action(ch.cyberduck.binding.Action) AbstractBackgroundAction(ch.cyberduck.core.threading.AbstractBackgroundAction)

Example 4 with NSNotification

use of ch.cyberduck.binding.foundation.NSNotification in project cyberduck by iterate-ch.

the class InfoController method setMetadataTable.

public void setMetadataTable(final NSTableView t) {
    this.metadataTable = t;
    this.metadataTable.setAllowsMultipleSelection(true);
    this.metadataTable.setColumnAutoresizingStyle(NSTableView.NSTableViewUniformColumnAutoresizingStyle);
    this.metadataTable.setDataSource((metadataTableModel = new ListDataSource() {

        @Override
        public NSInteger numberOfRowsInTableView(NSTableView view) {
            return new NSInteger(metadata.size());
        }

        public NSObject tableView_objectValueForTableColumn_row(NSTableView view, NSTableColumn tableColumn, NSInteger row) {
            if (row.intValue() < metadata.size()) {
                final String identifier = tableColumn.identifier();
                if (identifier.equals(MetadataColumn.NAME.name())) {
                    final String name = metadata.get(row.intValue()).getName();
                    return NSAttributedString.attributedString(StringUtils.isNotEmpty(name) ? name : StringUtils.EMPTY);
                }
                if (identifier.equals(MetadataColumn.VALUE.name())) {
                    final String value = metadata.get(row.intValue()).getValue();
                    return NSAttributedString.attributedString(value != null ? value : LocaleFactory.localizedString("Multiple files"));
                }
            }
            return null;
        }

        @Override
        public void tableView_setObjectValue_forTableColumn_row(NSTableView view, NSObject value, NSTableColumn c, NSInteger row) {
            if (row.intValue() < metadata.size()) {
                Header header = metadata.get(row.intValue());
                if (c.identifier().equals(MetadataColumn.NAME.name())) {
                    header.setName(value.toString());
                }
                if (c.identifier().equals(MetadataColumn.VALUE.name())) {
                    header.setValue(value.toString());
                }
                if (StringUtils.isNotBlank(header.getName()) && StringUtils.isNotBlank(header.getValue())) {
                    // Only update if both fields are set
                    metadataInputDidEndEditing();
                }
            }
        }
    }).id());
    this.metadataTable.setDelegate((metadataTableDelegate = new AbstractTableDelegate<String, MetadataColumn>(metadataTable.tableColumnWithIdentifier(MetadataColumn.NAME.name())) {

        @Override
        public boolean isColumnRowEditable(NSTableColumn column, NSInteger row) {
            return true;
        }

        @Override
        public void tableRowDoubleClicked(final ID sender) {
            this.enterKeyPressed(sender);
        }

        @Override
        public void enterKeyPressed(final ID sender) {
            metadataTable.editRow(metadataTable.columnWithIdentifier(MetadataColumn.VALUE.name()), metadataTable.selectedRow(), true);
        }

        @Override
        public void deleteKeyPressed(final ID sender) {
            metadataRemoveButtonClicked(sender);
        }

        @Override
        public String tooltip(String c, final MetadataColumn column) {
            return c;
        }

        @Override
        public void tableColumnClicked(NSTableView view, NSTableColumn c) {
        // 
        }

        @Override
        public void selectionDidChange(final NSNotification notification) {
            metadataRemoveButton.setEnabled(metadataTable.numberOfSelectedRows().intValue() > 0);
        }

        @Override
        protected boolean isTypeSelectSupported() {
            return false;
        }

        public void tableView_willDisplayCell_forTableColumn_row(NSTableView view, NSTextFieldCell cell, NSTableColumn c, NSInteger row) {
            if (c.identifier().equals(MetadataColumn.VALUE.name())) {
                final String value = metadata.get(row.intValue()).getValue();
                if (null == value) {
                    cell.setPlaceholderString(LocaleFactory.localizedString("Multiple files"));
                }
            }
        }
    }).id());
    this.metadataTable.sizeToFit();
}
Also used : NSInteger(org.rococoa.cocoa.foundation.NSInteger) NSObject(ch.cyberduck.binding.foundation.NSObject) NSNotification(ch.cyberduck.binding.foundation.NSNotification) AbstractTableDelegate(ch.cyberduck.binding.AbstractTableDelegate) NSMutableAttributedString(ch.cyberduck.binding.foundation.NSMutableAttributedString) NSString(ch.cyberduck.binding.foundation.NSString) NSAttributedString(ch.cyberduck.binding.foundation.NSAttributedString) ID(org.rococoa.ID) ListDataSource(ch.cyberduck.binding.ListDataSource)

Example 5 with NSNotification

use of ch.cyberduck.binding.foundation.NSNotification in project cyberduck by iterate-ch.

the class BrowserController method setBookmarkTable.

// ----------------------------------------------------------
// Manage Bookmarks
// ----------------------------------------------------------
@Action
public void setBookmarkTable(NSTableView view) {
    bookmarkTable = view;
    bookmarkTable.setSelectionHighlightStyle(NSTableView.NSTableViewSelectionHighlightStyleSourceList);
    bookmarkTable.setDataSource((this.bookmarkModel = new BookmarkTableDataSource(this)).id());
    {
        NSTableColumn c = bookmarkTableColumnFactory.create(BookmarkColumn.icon.name());
        c.headerCell().setStringValue(StringUtils.EMPTY);
        c.setResizingMask(NSTableColumn.NSTableColumnNoResizing);
        c.setDataCell(imageCellPrototype);
        bookmarkTable.addTableColumn(c);
    }
    {
        NSTableColumn c = bookmarkTableColumnFactory.create(BookmarkColumn.bookmark.name());
        c.headerCell().setStringValue(LocaleFactory.localizedString("Bookmarks", "Browser"));
        c.setMinWidth(150);
        c.setResizingMask(NSTableColumn.NSTableColumnAutoresizingMask);
        c.setDataCell(BookmarkCell.bookmarkCell());
        bookmarkTable.addTableColumn(c);
    }
    {
        NSTableColumn c = bookmarkTableColumnFactory.create(BookmarkColumn.status.name());
        c.headerCell().setStringValue(StringUtils.EMPTY);
        c.setMinWidth(40);
        c.setWidth(40);
        c.setMaxWidth(40);
        c.setResizingMask(NSTableColumn.NSTableColumnAutoresizingMask);
        c.setDataCell(imageCellPrototype);
        c.dataCell().setAlignment(TEXT_ALIGNMENT_CENTER);
        bookmarkTable.addTableColumn(c);
    }
    bookmarkTable.setDelegate((bookmarkTableDelegate = new AbstractTableDelegate<Host, BookmarkColumn>(bookmarkTable.tableColumnWithIdentifier(BookmarkColumn.bookmark.name())) {

        private static final double kSwipeGestureLeft = 1.000000;

        private static final double kSwipeGestureRight = -1.000000;

        private static final double kSwipeGestureUp = 1.000000;

        private static final double kSwipeGestureDown = -1.000000;

        @Override
        public String tooltip(Host bookmark, final BookmarkColumn column) {
            return new HostUrlProvider().get(bookmark);
        }

        @Override
        public void tableRowDoubleClicked(final ID sender) {
            BrowserController.this.connectBookmarkButtonClicked(sender);
        }

        @Override
        public void enterKeyPressed(final ID sender) {
            this.tableRowDoubleClicked(sender);
        }

        @Override
        public void deleteKeyPressed(final ID sender) {
            if (bookmarkModel.getSource().allowsDelete()) {
                BrowserController.this.deleteBookmarkButtonClicked(sender);
            }
        }

        @Override
        public void tableColumnClicked(NSTableView view, NSTableColumn tableColumn) {
        }

        @Override
        public void selectionDidChange(final NSNotification notification) {
            addBookmarkButton.setEnabled(bookmarkModel.getSource().allowsAdd());
            final int selected = bookmarkTable.numberOfSelectedRows().intValue();
            editBookmarkButton.setEnabled(bookmarkModel.getSource().allowsEdit() && selected == 1);
            deleteBookmarkButton.setEnabled(bookmarkModel.getSource().allowsDelete() && selected > 0);
        }

        @Action
        public CGFloat tableView_heightOfRow(NSTableView view, NSInteger row) {
            final int size = preferences.getInteger("bookmark.icon.size");
            if (BookmarkCell.SMALL_BOOKMARK_SIZE == size) {
                return new CGFloat(18);
            }
            if (BookmarkCell.MEDIUM_BOOKMARK_SIZE == size) {
                return new CGFloat(45);
            }
            return new CGFloat(70);
        }

        @Override
        public boolean isTypeSelectSupported() {
            return true;
        }

        @Action
        public String tableView_typeSelectStringForTableColumn_row(NSTableView view, NSTableColumn tableColumn, NSInteger row) {
            return BookmarkNameProvider.toString(bookmarkModel.getSource().get(row.intValue()));
        }

        @Action
        public boolean tableView_isGroupRow(NSTableView view, NSInteger row) {
            return false;
        }

        /**
         * Available in Mac OS X v10.6 and later.
         *
         * @param event Swipe event
         */
        @Action
        public void swipeWithEvent(NSEvent event) {
            if (event.deltaY().doubleValue() == kSwipeGestureUp) {
                NSInteger row = bookmarkTable.selectedRow();
                NSInteger next;
                if (-1 == row.intValue()) {
                    // No current selection
                    next = new NSInteger(0);
                } else {
                    next = new NSInteger(row.longValue() - 1);
                }
                bookmarkTable.selectRowIndexes(NSIndexSet.indexSetWithIndex(next), false);
            } else if (event.deltaY().doubleValue() == kSwipeGestureDown) {
                NSInteger row = bookmarkTable.selectedRow();
                NSInteger next;
                if (-1 == row.intValue()) {
                    // No current selection
                    next = new NSInteger(0);
                } else {
                    next = new NSInteger(row.longValue() + 1);
                }
                bookmarkTable.selectRowIndexes(NSIndexSet.indexSetWithIndex(next), false);
            }
        }
    }).id());
    // receive drag events from types
    bookmarkTable.registerForDraggedTypes(NSArray.arrayWithObjects(NSPasteboard.URLPboardType, NSPasteboard.StringPboardType, // Accept bookmark files dragged from the Finder
    NSPasteboard.FilenamesPboardType, // Accept file promises made myself
    NSPasteboard.FilesPromisePboardType));
    this._updateBookmarkCell();
    final int size = preferences.getInteger("bookmark.icon.size");
    if (BookmarkCell.SMALL_BOOKMARK_SIZE == size) {
        bookmarkTable.setRowHeight(new CGFloat(18));
    } else if (BookmarkCell.MEDIUM_BOOKMARK_SIZE == size) {
        bookmarkTable.setRowHeight(new CGFloat(45));
    } else {
        bookmarkTable.setRowHeight(new CGFloat(70));
    }
    // setting appearance attributes()
    bookmarkTable.setUsesAlternatingRowBackgroundColors(preferences.getBoolean("browser.alternatingRows"));
    bookmarkTable.setGridStyleMask(NSTableView.NSTableViewGridNone);
    // selection properties
    bookmarkTable.setAllowsMultipleSelection(true);
    bookmarkTable.setAllowsEmptySelection(true);
    bookmarkTable.setAllowsColumnResizing(false);
    bookmarkTable.setAllowsColumnSelection(false);
    bookmarkTable.setAllowsColumnReordering(false);
    bookmarkTable.sizeToFit();
}
Also used : NSNotification(ch.cyberduck.binding.foundation.NSNotification) AbstractTableDelegate(ch.cyberduck.binding.AbstractTableDelegate) NSPoint(org.rococoa.cocoa.foundation.NSPoint) CGFloat(org.rococoa.cocoa.CGFloat) BookmarkTableDataSource(ch.cyberduck.ui.cocoa.datasource.BookmarkTableDataSource) NSInteger(org.rococoa.cocoa.foundation.NSInteger) ID(org.rococoa.ID) BookmarkColumn(ch.cyberduck.ui.browser.BookmarkColumn) WindowMainAction(ch.cyberduck.core.threading.WindowMainAction) BackgroundAction(ch.cyberduck.core.threading.BackgroundAction) DisconnectBackgroundAction(ch.cyberduck.core.threading.DisconnectBackgroundAction) TransferAction(ch.cyberduck.core.transfer.TransferAction) Action(ch.cyberduck.binding.Action) DefaultMainAction(ch.cyberduck.core.threading.DefaultMainAction) WorkerBackgroundAction(ch.cyberduck.core.threading.WorkerBackgroundAction) BrowserTransferBackgroundAction(ch.cyberduck.core.threading.BrowserTransferBackgroundAction)

Aggregations

NSNotification (ch.cyberduck.binding.foundation.NSNotification)8 ID (org.rococoa.ID)8 NSInteger (org.rococoa.cocoa.foundation.NSInteger)8 AbstractTableDelegate (ch.cyberduck.binding.AbstractTableDelegate)5 NSObject (ch.cyberduck.binding.foundation.NSObject)5 NSAttributedString (ch.cyberduck.binding.foundation.NSAttributedString)4 CGFloat (org.rococoa.cocoa.CGFloat)4 Action (ch.cyberduck.binding.Action)3 ListDataSource (ch.cyberduck.binding.ListDataSource)3 NSPoint (org.rococoa.cocoa.foundation.NSPoint)3 NSMutableAttributedString (ch.cyberduck.binding.foundation.NSMutableAttributedString)2 NSString (ch.cyberduck.binding.foundation.NSString)2 BackgroundAction (ch.cyberduck.core.threading.BackgroundAction)2 BrowserTransferBackgroundAction (ch.cyberduck.core.threading.BrowserTransferBackgroundAction)2 DefaultMainAction (ch.cyberduck.core.threading.DefaultMainAction)2 DisconnectBackgroundAction (ch.cyberduck.core.threading.DisconnectBackgroundAction)2 WindowMainAction (ch.cyberduck.core.threading.WindowMainAction)2 WorkerBackgroundAction (ch.cyberduck.core.threading.WorkerBackgroundAction)2 TransferAction (ch.cyberduck.core.transfer.TransferAction)2 HyperlinkAttributedStringFactory (ch.cyberduck.binding.HyperlinkAttributedStringFactory)1