code: public static Component createAppButton(
          CmsObject cms,
          final I_CmsWorkplaceAppConfiguration appConfig,
          Locale locale) {
  
          Button button = createAppIconButton(appConfig, locale);
          button.addClickListener(new ClickListener() {
  
              private static final long serialVersionUID = 1L;
  
              public void buttonClick(ClickEvent event) {
  
                  if ((appConfig instanceof I_CmsHasAppLaunchCommand)
                      && (((I_CmsHasAppLaunchCommand)appConfig).getAppLaunchCommand() != null)) {
                      ((I_CmsHasAppLaunchCommand)appConfig).getAppLaunchCommand().run();
                  } else {
                      CmsAppWorkplaceUi ui = (CmsAppWorkplaceUi)A_CmsUI.get();
                      ui.showApp(appConfig);
                  }
              }
          });
          CmsAppVisibilityStatus status = appConfig.getVisibility(cms);
          if (!status.isActive()) {
              button.setEnabled(false);
              button.setDescription(status.getHelpText());
          } else {
              String helpText = appConfig.getHelpText(locale);
              button.setDescription(helpText);
          }
          return button;
      }
docs: Creates a properly styled button for the given app.<p>
  
  @param cms the cms context
  @param appConfig the app configuration
  @param locale the locale
  
  @return the button component