@Action public void setStatusLabel(NSTextField statusLabel) { this.statusLabel = statusLabel; this.statusLabel.setFont(NSFont.monospacedDigitSystemFontOfSize(NSFont.smallSystemFontSize())); }
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); }
public void setCommentField(final NSTextView field) { this.commentField = field; this.commentField.setFont(NSFont.userFixedPitchFontOfSize(11f)); this.notificationCenter.addObserver(this.id(), Foundation.selector("commentInputDidChange:"), NSText.TextDidChangeNotification, field.id()); this.addObserver(new BookmarkObserver() { @Override public void change(Host bookmark) { updateField(commentField, bookmark.getComment()); } }); }
/** * @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);
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())); }
NSFont.systemFontOfSize(preferences.getFloat("browser.font.size"))).intValue() + 2));
public void setDownloadSkipRegexField(NSTextView t) { this.downloadSkipRegexField = t; this.downloadSkipRegexField.setFont(NSFont.userFixedPitchFontOfSize(9.0f)); this.downloadSkipRegexField.setString(preferences.getProperty("queue.download.skip.regex")); notificationCenter.addObserver(this.id(), Foundation.selector("downloadSkipRegexFieldDidChange:"), NSText.TextDidChangeNotification, this.downloadSkipRegexField.id()); }
NSFont.systemFontOfSize(preferences.getFloat("browser.font.size"))).intValue() + 2));
public void setUploadSkipRegexField(NSTextView b) { this.uploadSkipRegexField = b; this.uploadSkipRegexField.setFont(NSFont.userFixedPitchFontOfSize(9.0f)); this.uploadSkipRegexField.setString(preferences.getProperty("queue.upload.skip.regex")); notificationCenter.addObserver(this.id(), Foundation.selector("uploadSkipRegexFieldDidChange:"), NSText.TextDidChangeNotification, this.uploadSkipRegexField.id()); }
this.browserView.setHeaderView(null); this.browserView.setRowHeight(new CGFloat(layoutManager.defaultLineHeightForFont( NSFont.systemFontOfSize(preferences.getFloat("browser.font.size"))).intValue() + 2));