@Action public void setStatusLabel(NSTextField statusLabel) { this.statusLabel = statusLabel; this.statusLabel.setFont(NSFont.monospacedDigitSystemFontOfSize(NSFont.smallSystemFontSize())); }
public void setProgressField(final NSTextField f) { this.progressField = f; this.progressField.setEditable(false); this.progressField.setSelectable(false); this.progressField.setTextColor(NSColor.controlTextColor()); this.progressField.setFont(NSFont.monospacedDigitSystemFontOfSize(NSFont.smallSystemFontSize())); }
/** * @param value Existing attributes * @param hyperlink URL * @return Clickable and underlined string to put into text field. */ private static NSAttributedString create(final NSMutableAttributedString value, final String hyperlink) { final NSRange range = NSRange.NSMakeRange(new NSUInteger(0), value.length()); value.beginEditing(); value.addAttributeInRange(NSMutableAttributedString.LinkAttributeName, hyperlink, range); // make the text appear in blue value.addAttributeInRange(NSMutableAttributedString.ForegroundColorAttributeName, NSColor.blueColor(), range); // system font value.addAttributeInRange(NSMutableAttributedString.FontAttributeName, NSFont.systemFontOfSize(NSFont.smallSystemFontSize()), range); // next make the text appear with an underline value.addAttributeInRange(NSMutableAttributedString.UnderlineStyleAttributeName, NSNumber.numberWithInt(NSMutableAttributedString.SingleUnderlineStyle), range); value.endEditing(); return value; } }
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);