void (@NotNull IconCompOptionalCompPanel<SimpleColoredComponent> panel, boolean selected) { OnOffButton button = new OnOffButton(); button.setSelected(selected); panel.setRight(button); panel.setBorder(TOGGLE_BUTTON_BORDER); }