Exemplo n.º 1
0
  /**
   * Changes the current displayed status of the button.
   *
   * @param status the status of the button.
   */
  public void updateStatusLabel(String status) {
    switch (status) {
      case "visible":
        statusLab.setText("Button is currently VISIBLE");
        break;

      case "hidden":
        statusLab.setText("Button is currently NOT VISIBLE");
        break;

      case "kill":
        statusLab.setText("Button has been shutdown");
        parentFrame.closeAll();
        setServerDeadState();
        break;

      case "ringbell":
        playBell();
        break;

      default:
        statusLab.setText("Anomalous state: " + status + ". This should not happen");
        break;
    }
  }