code: private void updateState(String styleDependent) {
  
          if (CmsStringUtil.isEmptyOrWhitespaceOnly(styleDependent)) {
              // reseting to cmsState-up
              styleDependent = "up";
          }
          if (!styleDependent.equals(m_styleDependent)) {
              m_main.removeStyleDependentName(m_styleDependent);
              m_main.setStyleDependentName(styleDependent, true);
              m_styleDependent = styleDependent;
          }
      }
docs: Updates the CSS classes according to the button state.<p>
  
  @param styleDependent the dependent style name