All Implemented Interfaces:
Activatable, Serializable, Iterable<Component>, IEventSink, IEventSource, IFeedbackContributor, IConverterLocator, IMetadataContext<Serializable,Component>, IHeaderContributor, IRequestableComponent, IHierarchical<Component>, IClusterable

public abstract class SplitButton extends DropDownButton
Use any button to trigger a dropdown menu by placing it within a .btn-group and providing the proper menu markup.
Author:
miha
See Also:
  • Constructor Details

  • Method Details

    • createCssClassName

      protected String createCssClassName()
      a SplitButton uses "btn-group" instead of "dropdown" as base css class.
      Overrides:
      createCssClassName in class DropDownButton
      Returns:
      css class name.
    • newCaret

      protected WebMarkupContainer newCaret(String markupId)
      creates a new caret button that opens the split button dropdown menu
      Parameters:
      markupId - the caret's markup id
      Returns:
      new caret component
    • newBaseButton

      protected abstract AbstractLink newBaseButton(String markupId, IModel<String> labelModel, IModel<IconType> iconTypeModel)
      creates a new base button
      Parameters:
      markupId - the base button markup id
      labelModel - the label of the base button
      iconTypeModel - the type of the icon
      Returns:
      new base button
    • newButton

      protected final WebMarkupContainer newButton(String markupId, IModel<String> labelModel, IModel<IconType> iconTypeModel)
      Description copied from class: DropDownButton
      creates a new button instance
      Overrides:
      newButton in class DropDownButton
      Parameters:
      markupId - The component's id
      labelModel - The label text as model
      iconTypeModel - The icon type as model
      Returns:
      a new button component
    • addIconToBaseButton

      protected void addIconToBaseButton(Icon icon)
      Description copied from class: DropDownButton
      adds an icon to the base button
      Overrides:
      addIconToBaseButton in class DropDownButton
      Parameters:
      icon - The icon to add
    • addButtonBehavior

      protected void addButtonBehavior(ButtonBehavior buttonBehavior)
      Description copied from class: DropDownButton
      adds the button behavior to the base button of this dropdown component
      Overrides:
      addButtonBehavior in class DropDownButton
      Parameters:
      buttonBehavior - - behavior to add