/** * @return The identifier of the column selected or null */ public String selectedColumnIdentifier() { // Return previously set custom sorting preference return selectedColumn.identifier(); }
@Override public void setBrowserView(NSOutlineView view) { super.setBrowserView(view); { NSTableColumn c = tableColumnsFactory.create(SyncPromptDataSource.Column.sync.name()); c.headerCell().setStringValue(StringUtils.EMPTY); c.setMinWidth(20f); c.setWidth(20f); c.setMaxWidth(20f); c.setResizingMask(NSTableColumn.NSTableColumnAutoresizingMask); c.setEditable(false); c.setDataCell(imageCellPrototype); c.dataCell().setAlignment(NSText.NSCenterTextAlignment); view.addTableColumn(c); } { NSTableColumn c = tableColumnsFactory.create(SyncPromptDataSource.Column.create.name()); c.headerCell().setStringValue(StringUtils.EMPTY); c.setMinWidth(20f); c.setWidth(20f); c.setMaxWidth(20f); c.setResizingMask(NSTableColumn.NSTableColumnAutoresizingMask); c.setEditable(false); c.setDataCell(imageCellPrototype); c.dataCell().setAlignment(NSText.NSCenterTextAlignment); view.addTableColumn(c); } view.sizeToFit(); } }
public static NSTableColumn tableColumnWithIdentifier(String identifier) { return CLASS.alloc().initWithIdentifier(identifier); }
public void tableViewColumnDidResize(final NSNotification notification) { final NSTableColumn column = Rococoa.cast(notification.userInfo().objectForKey("NSTableColumn"), NSTableColumn.class); this.columnDidResize(column.identifier(), column.width().floatValue()); }
protected void _updateBookmarkCell() { final int size = preferences.getInteger("bookmark.icon.size"); final double width = size * 1.5; final NSTableColumn c = bookmarkTable.tableColumnWithIdentifier(BookmarkColumn.icon.name()); c.setMinWidth(width); c.setMaxWidth(width); c.setWidth(width); // Notify the table about the changed row height. bookmarkTable.noteHeightOfRowsWithIndexesChanged( NSIndexSet.indexSetWithIndexesInRange(NSRange.NSMakeRange(new NSUInteger(0), new NSUInteger(bookmarkTable.numberOfRows())))); }
c.setMinWidth(80f); c.setWidth(300f); c.setResizingMask(NSTableColumn.NSTableColumnAutoresizingMask); this.table.addTableColumn(c);
public void setWidth(double width) { this.setWidth(new CGFloat(width)); }
public void setMinWidth(double width) { this.setMinWidth(new CGFloat(width)); }
public void setMaxWidth(double width) { this.setMaxWidth(new CGFloat(width)); }
this.aclPermissionCellPrototype.setButtonBordered(false); this.aclTable.setColumnAutoresizingStyle(NSTableView.NSTableViewUniformColumnAutoresizingStyle); this.aclTable.tableColumnWithIdentifier(AclColumn.PERMISSION.name()).setDataCell(aclPermissionCellPrototype); this.aclTable.setDataSource((aclTableModel = new ListDataSource() { @Override
c.setMinWidth(80f); c.setWidth(300f); c.setResizingMask(NSTableColumn.NSTableColumnAutoresizingMask); this.transferTable.addTableColumn(c);
public void outlineViewColumnDidResize(final NSNotification notification) { final NSTableColumn column = Rococoa.cast(notification.userInfo().objectForKey("NSTableColumn"), NSTableColumn.class); this.columnDidResize(column.identifier(), column.width().floatValue()); }
if(preferences.getBoolean(String.format("browser.column.%s", BrowserColumn.size.name()))) { NSTableColumn c = browserListColumnsFactory.create(BrowserColumn.size.name()); c.headerCell().setStringValue(BrowserColumn.size.toString()); c.setMinWidth(50f); c.setWidth(preferences.getFloat(String.format("browser.column.%s.width", BrowserColumn.size.name()))); c.setMaxWidth(150f); c.setResizingMask(NSTableColumn.NSTableColumnAutoresizingMask | NSTableColumn.NSTableColumnUserResizingMask); c.setDataCell(textCellPrototype); table.addTableColumn(c); if(preferences.getBoolean(String.format("browser.column.%s", BrowserColumn.modified.name()))) { NSTableColumn c = browserListColumnsFactory.create(BrowserColumn.modified.name()); c.headerCell().setStringValue(BrowserColumn.modified.toString()); c.setMinWidth(100f); c.setWidth(preferences.getFloat(String.format("browser.column.%s.width", BrowserColumn.modified.name()))); c.setMaxWidth(500); c.setResizingMask(NSTableColumn.NSTableColumnAutoresizingMask | NSTableColumn.NSTableColumnUserResizingMask); c.setDataCell(textCellPrototype); table.addTableColumn(c); if(preferences.getBoolean(String.format("browser.column.%s", BrowserColumn.owner.name()))) { NSTableColumn c = browserListColumnsFactory.create(BrowserColumn.owner.name()); c.headerCell().setStringValue(BrowserColumn.owner.toString()); c.setMinWidth(50); c.setWidth(preferences.getFloat(String.format("browser.column.%s.width", BrowserColumn.owner.name()))); c.setMaxWidth(500);
public String tableView_typeSelectStringForTableColumn_row(final NSTableView view, final NSTableColumn tableColumn, final NSInteger row) { if(tableColumn.identifier().equals(BrowserColumn.filename.name())) { return browserListModel.tableView_objectValueForTableColumn_row(view, tableColumn, row).toString(); } return null; }
c.headerCell().setStringValue(LocaleFactory.localizedString("Filename")); c.setMinWidth(100f); c.setWidth(220f); c.setMaxWidth(800f); c.setResizingMask(NSTableColumn.NSTableColumnAutoresizingMask | NSTableColumn.NSTableColumnUserResizingMask); c.setEditable(false); c.setDataCell(outlineCellPrototype); this.browserView.addTableColumn(c); this.browserView.setOutlineTableColumn(c); c.headerCell().setStringValue(StringUtils.EMPTY); c.setMinWidth(50f); c.setWidth(80f); c.setMaxWidth(100f); c.setResizingMask(NSTableColumn.NSTableColumnAutoresizingMask | NSTableColumn.NSTableColumnUserResizingMask); c.setEditable(false); c.setDataCell(textCellPrototype); this.browserView.addTableColumn(c); c.headerCell().setStringValue(StringUtils.EMPTY); c.setMinWidth(20f); c.setWidth(20f); c.setMaxWidth(20f); c.setResizingMask(NSTableColumn.NSTableColumnAutoresizingMask); c.setEditable(false); c.setDataCell(imageCellPrototype); c.dataCell().setAlignment(NSText.NSCenterTextAlignment); this.browserView.addTableColumn(c);
@Action public String outlineView_typeSelectStringForTableColumn_item(final NSOutlineView view, final NSTableColumn tableColumn, final NSObject item) { if(tableColumn.identifier().equals(BrowserColumn.filename.name())) { return browserOutlineModel.outlineView_objectValueForTableColumn_byItem(view, tableColumn, item).toString(); } return null; }
c.headerCell().setStringValue(StringUtils.EMPTY); c.setMinWidth((20)); c.setWidth(preferences.getFloat(String.format("browser.column.%s.width", BrowserColumn.icon.name()))); c.setMaxWidth((20)); c.setResizingMask(NSTableColumn.NSTableColumnAutoresizingMask); c.setDataCell(imageCellPrototype); c.dataCell().setAlignment(NSText.NSCenterTextAlignment); browserListView.addTableColumn(c); c.headerCell().setStringValue(BrowserColumn.filename.toString()); c.setMinWidth((100)); c.setWidth(preferences.getFloat(String.format("browser.column.%s.width", BrowserColumn.filename.name()))); c.setMaxWidth((1000)); c.setResizingMask(NSTableColumn.NSTableColumnAutoresizingMask | NSTableColumn.NSTableColumnUserResizingMask); filenameCellPrototype.setEditable(true); c.setDataCell(filenameCellPrototype); this.browserListView.addTableColumn(c);
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())); }
c.headerCell().setStringValue(StringUtils.EMPTY); c.setResizingMask(NSTableColumn.NSTableColumnNoResizing); c.setDataCell(imageCellPrototype); bookmarkTable.addTableColumn(c); c.headerCell().setStringValue(LocaleFactory.localizedString("Bookmarks", "Browser")); c.setMinWidth(150); c.setResizingMask(NSTableColumn.NSTableColumnAutoresizingMask); c.setDataCell(BookmarkCell.bookmarkCell()); bookmarkTable.addTableColumn(c); c.headerCell().setStringValue(StringUtils.EMPTY); c.setMinWidth(40); c.setWidth(40); c.setMaxWidth(40); c.setResizingMask(NSTableColumn.NSTableColumnAutoresizingMask); c.setDataCell(imageCellPrototype); c.dataCell().setAlignment(NSText.NSCenterTextAlignment); bookmarkTable.addTableColumn(c);
@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());