private void setStatusText() { statusField.setAttributedStringValue( NSAttributedString.attributedStringWithAttributes( transfer.isRunning() ? StringUtils.EMPTY : Locale.localizedString(transfer.getStatus(), "Status"), TRUNCATE_MIDDLE_ATTRIBUTES)); }
private void setMenuHighlighted(boolean highlighted) { for (int i = 0; i < filesPopup.numberOfItems().intValue(); i++) { filesPopup .itemAtIndex(new NSInteger(i)) .setAttributedTitle( NSAttributedString.attributedStringWithAttributes( filesPopup.itemAtIndex(new NSInteger(i)).title(), highlighted ? HIGHLIGHTED_FONT_ATTRIBUTES : NORMAL_FONT_ATTRIBUTES)); } }
private void setMessageText() { StringBuilder b = new StringBuilder(); if (null == messageText) { // Do not display any progress text when transfer is stopped final Date timestamp = transfer.getTimestamp(); if (null != timestamp) { messageText = UserDateFormatterFactory.get().getLongFormat(timestamp.getTime()); } } if (messageText != null) { b.append(messageText); } messageField.setAttributedStringValue( NSAttributedString.attributedStringWithAttributes( b.toString(), TRUNCATE_MIDDLE_ATTRIBUTES)); }
private void setProgressText() { progressField.setAttributedStringValue( NSAttributedString.attributedStringWithAttributes( meter.getProgress(), TRUNCATE_MIDDLE_ATTRIBUTES)); }