private void update() {
      // background is determined by selected state
      // foreground by the rest
      updateBg();
      updateFg();
      updateBorder();
      // Tooltip:
      updateTooltip();
    }
private void update()