private void setSelectedIndex(int index) {
		selectedIndex = index;
		Color c = elements[selectedIndex].getColor();
		int style = elements[selectedIndex].getStyle();
		colorPanel.setBackground(c);
		colorChooser.setColor(c);
		if (style == -1) {
			customCheckbox.setSelected(false);
			boldCheckbox.setSelected(baseFont.isBold());
			italicsCheckbox.setSelected(baseFont.isItalic());
			boldCheckbox.setEnabled(false);
			italicsCheckbox.setEnabled(false);
		}
		else {
			customCheckbox.setSelected(true);
			boldCheckbox.setSelected((style & Font.BOLD) != 0);
			italicsCheckbox.setSelected((style & Font.ITALIC) != 0);
			boldCheckbox.setEnabled(true);
			italicsCheckbox.setEnabled(true);
		}
	}
callback for when the selected display field changes.

@param index the index in the JList of the selected field.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/options/OptionsGui.java