code: public static void toggleButton(Button button) {
  
          if (isButtonPressed(button)) {
              button.removeStyleName(OpenCmsTheme.BUTTON_PRESSED);
          } else {
              button.addStyleName(OpenCmsTheme.BUTTON_PRESSED);
          }
      }
docs: Sets style of a toggle button depending on its current state.<p>
  
  @param button the button to update