use of com.intellij.ide.browsers.BrowserFamily in project kotlin by JetBrains.
the class K2JSRunConfigurationEditor method setUpBrowserCombobox.
private void setUpBrowserCombobox() {
for (WebBrowser browser : WebBrowserManager.getInstance().getActiveBrowsers()) {
browserComboBox.addItem(browser.getFamily());
}
browserComboBox.setRenderer(new ListCellRendererWrapper<BrowserFamily>() {
@Override
public void customize(JList list, BrowserFamily family, int index, boolean selected, boolean hasFocus) {
if (family != null) {
setText(family.getName());
setIcon(family.getIcon());
}
}
});
if (browserComboBox.getItemCount() < 2) {
browserComboBox.setVisible(false);
browserComboBox.setVisible(false);
} else {
browserComboBox.setSelectedItem(0);
}
}
Aggregations