Class ButtonLists

    • Constructor Detail

      • ButtonLists

        public ButtonLists​(@NotNull
                           @NotNull ButtonListsListener buttonListsListener)
        Creates a new instance.
        Parameters:
        buttonListsListener - the listener to notify
    • Method Detail

      • addTab

        @NotNull
        public @NotNull DoubleButtonList addTab​(@NotNull
                                                @NotNull Tab tab)
        Adds a Tab to the button list associated with the tab's location.
        Parameters:
        tab - the tab to add
        Returns:
        the button list the tab was added to
      • moveTab

        @NotNull
        public @NotNull DoubleButtonList @NotNull [] moveTab​(@NotNull
                                                             @NotNull Tab tab,
                                                             @NotNull
                                                             @NotNull Location location)
        Moves a Tab to a new location.
        Parameters:
        tab - the tab to move
        location - the new location
        Returns:
        an array consisting of two button lists the old button from which the tab has been removed from and the new button list to which the tab was added to
      • toggleTabSplitMode

        @NotNull
        public @NotNull DoubleButtonList toggleTabSplitMode​(@NotNull
                                                            @NotNull Tab tab)
      • getActiveTab

        @Nullable
        public @Nullable Tab getActiveTab​(@NotNull
                                          @NotNull Location location,
                                          boolean alternativeLocation)
        Returns the active Tab on a given Location of the main view.
        Parameters:
        location - the location
        alternativeLocation - whether the alternative location should be checked
        Returns:
        the tab or null if no active tab exists