// Path: src/main/java/com/github/haixing_hu/javafx/control/menubutton/NoArrowMenuButton.java
// @SuppressWarnings("restriction")
// public class NoArrowMenuButton extends MenuButton {
// 
//   public static final String NO_ARROW_STYLE_CLASS = "no-arrow";
// 
//   /**
//    * Creates a new empty menu button. Use {@link #setText(String)},
//    * {@link #setGraphic(Node)} and {@link #getItems()} to set the content.
//    */
//   public NoArrowMenuButton() {
//     super();
//     getStyleClass().add(NO_ARROW_STYLE_CLASS);
//   }
// 
//   /**
//    * Creates a new empty menu button with the given text to display on the menu.
//    * Use {@link #setGraphic(Node)} and {@link #getItems()} to set the content.
//    *
//    * @param text
//    *          the text to display on the menu button
//    */
//   public NoArrowMenuButton(String text) {
//     super(text);
//     getStyleClass().add(NO_ARROW_STYLE_CLASS);
//   }
// 
//   /**
//    * Creates a new empty menu button with the given text and graphic to display
//    * on the menu. Use {@link #getItems()} to set the content.
//    *
//    * @param text
//    *          the text to display on the menu button
//    * @param graphic
//    *          the graphic to display on the menu button
//    */
//   public NoArrowMenuButton(String text, Node graphic) {
//     super(text, graphic);
//     getStyleClass().add(NO_ARROW_STYLE_CLASS);
//   }
// 
//   @Override
//   protected Skin<?> createDefaultSkin() {
//     return new NoArrowMenuButtonSkin(this);
//   }
// }


import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import javafx.beans.binding.Bindings;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.scene.control.ButtonBase;
import javafx.scene.control.ContextMenu;
import javafx.scene.control.Menu;
import javafx.scene.control.MenuBar;
import javafx.scene.control.MenuButton;
import javafx.scene.control.MenuItem;
import javafx.scene.control.SplitMenuButton;
import javafx.scene.control.ToolBar;
import javafx.scene.control.Tooltip;
import javax.annotation.Nullable;
import com.github.haixing_hu.javafx.control.menubutton.NoArrowMenuButton;
import com.github.haixing_hu.lang.Argument;
   *         {@link ActionGroup}.
   */
  public final ObservableList<IAction> getActions() {
    return actions;
  }

  /**
   * Adds an action to this action group.
   *
   * @param action
   *          the action to be added to this action group.
   */
  public final void add(IAction action) {
    actions.add(action);
  }

  @Override
  public ButtonBase createButton() {
    switch (options & ActionOption.BUTTON_TYPE_MASK) {
      case ActionOption.SPLIT_MENU_BUTTON: {
        final SplitMenuButton button = new SplitMenuButton();
        configMenuButton(button);
        return button;
      }
      case ActionOption.MENU_BUTTON:
      default: {
        final MenuButton button;
        if ((options & ActionOption.NO_ARROW) == 0) {
          button = new MenuButton();
        } else {
// Path: src/main/java/com/github/haixing_hu/javafx/control/menubutton/NoArrowMenuButton.java
// @SuppressWarnings("restriction")
// public class NoArrowMenuButton extends MenuButton {
// 
//   public static final String NO_ARROW_STYLE_CLASS = "no-arrow";
// 
//   /**
//    * Creates a new empty menu button. Use {@link #setText(String)},
//    * {@link #setGraphic(Node)} and {@link #getItems()} to set the content.
//    */
//   public NoArrowMenuButton() {
//     super();
//     getStyleClass().add(NO_ARROW_STYLE_CLASS);
//   }
// 
//   /**
//    * Creates a new empty menu button with the given text to display on the menu.
//    * Use {@link #setGraphic(Node)} and {@link #getItems()} to set the content.
//    *
//    * @param text
//    *          the text to display on the menu button
//    */
//   public NoArrowMenuButton(String text) {
//     super(text);
//     getStyleClass().add(NO_ARROW_STYLE_CLASS);
//   }
// 
//   /**
//    * Creates a new empty menu button with the given text and graphic to display
//    * on the menu. Use {@link #getItems()} to set the content.
//    *
//    * @param text
//    *          the text to display on the menu button
//    * @param graphic
//    *          the graphic to display on the menu button
//    */
//   public NoArrowMenuButton(String text, Node graphic) {
//     super(text, graphic);
//     getStyleClass().add(NO_ARROW_STYLE_CLASS);
//   }
// 
//   @Override
//   protected Skin<?> createDefaultSkin() {
//     return new NoArrowMenuButtonSkin(this);
//   }
// }


// Path: src/main/java/com/github/haixing_hu/javafx/action/ActionGroup.java
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import javafx.beans.binding.Bindings;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.scene.control.ButtonBase;
import javafx.scene.control.ContextMenu;
import javafx.scene.control.Menu;
import javafx.scene.control.MenuBar;
import javafx.scene.control.MenuButton;
import javafx.scene.control.MenuItem;
import javafx.scene.control.SplitMenuButton;
import javafx.scene.control.ToolBar;
import javafx.scene.control.Tooltip;
import javax.annotation.Nullable;
import com.github.haixing_hu.javafx.control.menubutton.NoArrowMenuButton;
import com.github.haixing_hu.lang.Argument;

   *         {@link ActionGroup}.
   */
  public final ObservableList<IAction> getActions() {
    return actions;
  }

  /**
   * Adds an action to this action group.
   *
   * @param action
   *          the action to be added to this action group.
   */
  public final void add(IAction action) {
    actions.add(action);
  }

  @Override
  public ButtonBase createButton() {
    switch (options & ActionOption.BUTTON_TYPE_MASK) {
      case ActionOption.SPLIT_MENU_BUTTON: {
        final SplitMenuButton button = new SplitMenuButton();
        configMenuButton(button);
        return button;
      }
      case ActionOption.MENU_BUTTON:
      default: {
        final MenuButton button;
        if ((options & ActionOption.NO_ARROW) == 0) {
          button = new MenuButton();
        } else {
          button = new NoArrowMenuButton();