public static NSFont monospacedDigitSystemFontOfSize(double fontSize) { if(Rococoa.cast(CLASS, NSObject.class).respondsToSelector( Foundation.selector("monospacedDigitSystemFontOfSize:weight:"))) { return CLASS.monospacedDigitSystemFontOfSize_weight(new CGFloat(fontSize), new CGFloat(NSFontWeightRegular)); } return systemFontOfSize(fontSize); }
/** * @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);
NSFont.systemFontOfSize(preferences.getFloat("browser.font.size"))).intValue() + 2));
NSFont.systemFontOfSize(preferences.getFloat("browser.font.size"))).intValue() + 2));
this.browserView.setHeaderView(null); this.browserView.setRowHeight(new CGFloat(layoutManager.defaultLineHeightForFont( NSFont.systemFontOfSize(preferences.getFloat("browser.font.size"))).intValue() + 2));