setSelected
setSelected is a method commonly found in graphical user interface (GUI) toolkits and programming frameworks. Its primary purpose is to programmatically control the selection state of a UI element. Typically, this refers to elements that can be selected or deselected, such as checkboxes, radio buttons, list items, tabs, or even entire rows or cells in a table or grid.
When the setSelected method is invoked on a specific UI element, it changes that element's internal state
The inverse operation, often named deselect or clearSelection, is used to remove the selection from an element.