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) ); } }
public void setBookmarkSizePopup(NSPopUpButton b) { this.bookmarkSizePopup = b; this.bookmarkSizePopup.setTarget(this.id()); this.bookmarkSizePopup.setAction(Foundation.selector("bookmarkSizePopupClicked:")); final int size = preferences.getInteger("bookmark.icon.size"); for(int i = 0; i < this.bookmarkSizePopup.numberOfItems().intValue(); i++) { this.bookmarkSizePopup.itemAtIndex(new NSInteger(i)).setState(NSCell.NSOffState); } if(BookmarkCell.SMALL_BOOKMARK_SIZE == size) { this.bookmarkSizePopup.selectItemAtIndex(new NSInteger(0)); } if(BookmarkCell.MEDIUM_BOOKMARK_SIZE == size) { this.bookmarkSizePopup.selectItemAtIndex(new NSInteger(1)); } if(BookmarkCell.LARGE_BOOKMARK_SIZE == size) { this.bookmarkSizePopup.selectItemAtIndex(new NSInteger(2)); } }