private void updateStyleClasses() {
    if (!getItems().isEmpty()) {
      getStyleClass().setAll(TOOLBAR_MENU_BUTTON);
    } else if (!Objects.isNull(getOnClick())) {
      getStyleClass().setAll(TOOLBAR_BUTTON);
    } else {
      getStyleClass().setAll(TOOLBAR_LABEL);
    }
  }
Creates a new {@link ToolbarItem} which appears like a {@link MenuButton},
using the given {@code text} and {@code graphic} as button menu button content
and the {@code items} as its {@link MenuItem}s.

@param text  the text to be displayed on the {@link ToolbarItem}
@param graphic the graphic to be displayed on the {@link ToolbarItem}
@param items   the items to be displayed in the context-menu of the {@link ToolbarItem}
workbenchfx-core/src/main/java/com/dlsc/workbenchfx/view/controls/ToolbarItem.java