// Set the colors of the filter buttons according to which filters are active
  private void setColors() {
    // Panel 1 - Bearing & Distance
    if (inpDist.getText().length() > 0
        || !(chkNW.state
            && chkNNW.state
            && chkN.state
            && chkNNE.state
            && chkNE.state
            && chkENE.state
            && chkE.state
            && chkESE.state
            && chkSE.state
            && chkSSE.state
            && chkS.state
            && chkSSW.state
            && chkSW.state
            && chkWSW.state
            && chkW.state
            && chkWNW.state)) btnBearing.backGround = COLOR_FILTERACTIVE;
    else btnBearing.backGround = COLOR_FILTERINACTIVE;
    if (!(chkNW.state
        || chkNNW.state
        || chkN.state
        || chkNNE.state
        || chkNE.state
        || chkENE.state
        || chkE.state
        || chkESE.state
        || chkSE.state
        || chkSSE.state
        || chkS.state
        || chkSSW.state
        || chkSW.state
        || chkWSW.state
        || chkW.state
        || chkWNW.state)) btnBearing.backGround = COLOR_FILTERALL;
    btnBearing.repaint();

    // Panel 2 - Cache attributes
    if (!(chkArchived.state
        && chkAvailable.state
        && chkFound.state
        && chkOwned.state
        && chkNotArchived.state
        && chkNotAvailable.state
        && chkNotFound.state
        && chkNotOwned.state
        && chcStatus.getText().equals(""))) btnAttributes.backGround = COLOR_FILTERACTIVE;
    else btnAttributes.backGround = COLOR_FILTERINACTIVE;
    if ((chkArchived.state == false && chkNotArchived.state == false)
        || (chkAvailable.state == false && chkNotAvailable.state == false)
        || (chkFound.state == false && chkNotFound.state == false)
        || (chkOwned.state == false && chkNotOwned.state == false))
      btnAttributes.backGround = COLOR_FILTERALL;
    btnAttributes.repaint();

    // Panel 3 - Cache ratings
    if (inpDiff.getText().length() > 0 || inpTerr.getText().length() > 0)
      btnRatings.backGround = COLOR_FILTERACTIVE;
    else btnRatings.backGround = COLOR_FILTERINACTIVE;
    btnRatings.repaint();

    // Panel 5 - Addi Waypoints
    if (chkParking.state
        || chkStage.state
        || chkQuestion.state
        || chkFinal.state
        || chkTrailhead.state
        || chkReference.state) { // At least one tick
      btnAddi.backGround = COLOR_FILTERACTIVE;
      addiWptChk.state = true;
      if (chkParking.state
          && chkStage.state
          && chkQuestion.state
          && chkFinal.state
          && chkTrailhead.state
          && chkReference.state) { // All ticked?
        addiWptChk.bgColor = Color.White;
        btnAddi.backGround = COLOR_FILTERINACTIVE;
      } else {
        addiWptChk.bgColor = Color.LightGray;
      }
    } else { // All not ticked
      btnAddi.backGround = COLOR_FILTERACTIVE;
      addiWptChk.bgColor = Color.White;
      addiWptChk.state = false;
    }
    btnAddi.repaint();

    // Panel 4 - Cache types
    boolean allAddis =
        (chkParking.state
            && chkStage.state
            && chkQuestion.state
            && chkFinal.state
            && chkTrailhead.state
            && chkReference.state);
    if (!(chkTrad.state
        && chkMulti.state
        && chkVirtual.state
        && chkLetter.state
        && chkEvent.state
        && chkWebcam.state
        && chkMystery.state
        && chkEarth.state
        && chkLocless.state
        && chkMega.state
        && chkCito.state
        && chkWherigo.state
        && chkCustom.state
        && allAddis)) btnTypes.backGround = COLOR_FILTERACTIVE;
    else btnTypes.backGround = COLOR_FILTERINACTIVE;
    if (!(chkTrad.state
        || chkMulti.state
        || chkVirtual.state
        || chkLetter.state
        || chkEvent.state
        || chkWebcam.state
        || chkMystery.state
        || chkEarth.state
        || chkLocless.state
        || chkMega.state
        || chkCustom.state
        || chkParking.state
        || chkStage.state
        || chkQuestion.state
        || chkFinal.state
        || chkTrailhead.state
        || chkCito.state
        || chkWherigo.state
        || chkReference.state)) btnTypes.backGround = COLOR_FILTERALL;
    btnTypes.repaint();

    // Panel 6 - Cache container
    if (!(chkMicro.state
        && chkSmall.state
        && chkRegular.state
        && chkLarge.state
        && chkVeryLarge.state
        && chkOther.state)) btnContainer.backGround = COLOR_FILTERACTIVE;
    else btnContainer.backGround = COLOR_FILTERINACTIVE;
    if (!(chkMicro.state
        || chkSmall.state
        || chkRegular.state
        || chkLarge.state
        || chkVeryLarge.state
        || chkOther.state)) btnContainer.backGround = COLOR_FILTERALL;
    btnContainer.repaint();

    // Panel 7 - Search

    // Panel 8 - Cache attributes
    if (attV.selectionMaskYes == 0l && attV.selectionMaskNo == 0l)
      btnCacheAttributes.backGround = COLOR_FILTERINACTIVE;
    else btnCacheAttributes.backGround = COLOR_FILTERACTIVE;
    btnCacheAttributes.repaint();
  }