public void setEncodingCombobox(NSPopUpButton b) { this.encodingCombobox = b; this.encodingCombobox.setTarget(this.id()); this.encodingCombobox.setAction(Foundation.selector("encodingComboboxClicked:")); this.encodingCombobox.removeAllItems(); this.encodingCombobox.addItemsWithTitles(NSArray.arrayWithObjects(new DefaultCharsetProvider().availableCharsets())); this.encodingCombobox.selectItemWithTitle(preferences.getProperty("browser.charset.encoding")); }