Class Tab

    • Constructor Summary

      Constructors 
      Constructor Description
      Tab​(@NotNull java.lang.String ident, @NotNull javax.swing.JComponent component, @NotNull Location defaultLocation, boolean alternativeLocation, int index, boolean defaultOpen)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addTabListener​(@NotNull TabListener listener)
      Adds a TabListener to be notified.
      @NotNull javax.swing.AbstractButton getButton()
      Returns the AbstractButton for showing or hiding the component.
      @NotNull java.awt.Component getComponent()
      Returns the Component that is shown when this tab is active.
      @NotNull Location getLocation()
      Returns the tab's location.
      @NotNull javax.swing.JMenu getMoveToMenu()
      Returns the "Move To" menu within the button's context menu.
      @NotNull javax.swing.JPopupMenu getPopupMenu()
      Returns the button's context menu.
      @NotNull Severity getSeverity()
      Returns the tab's Severity.
      int getSize()
      Returns the tab's size.
      boolean isAlternativeLocation()
      Returns whether the button is shown in the alternative location.
      boolean isOpen()
      Returns the tab's open status.
      void removeTabListener​(@NotNull TabListener listener)
      Removes a TabListener to be notified.
      void setAlternativeLocation​(boolean alternativeLocation)
      Sets whether the button is shown in the alternative location.
      void setLocation​(@NotNull Location location)
      Sets the tab's location.
      void setOpen​(boolean open)
      Sets the tab's open status.
      protected void setSeverity​(@NotNull Severity severity)
      Sets the tab's Severity.
      void setSize​(int size)
      Sets the tab's size.
      void setSplitModeAction​(@Nullable net.sf.japi.swing.action.ToggleAction splitModeAction)
      Sets the ToggleAction to update if the "split mode" state changes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Tab

        public Tab​(@NotNull
                   @NotNull java.lang.String ident,
                   @NotNull
                   @NotNull javax.swing.JComponent component,
                   @NotNull
                   @NotNull Location defaultLocation,
                   boolean alternativeLocation,
                   int index,
                   boolean defaultOpen)
        Creates a new instance.
        Parameters:
        ident - the tab's identification string
        component - the component that is shown when this tab is active
        defaultLocation - the tab's default location
        alternativeLocation - whether the tab is shown in the alternative location
        index - the tab's index for ordering
        defaultOpen - the tab's default opened status
    • Method Detail

      • addTabListener

        public void addTabListener​(@NotNull
                                   @NotNull TabListener listener)
        Adds a TabListener to be notified.
        Parameters:
        listener - the listener
      • removeTabListener

        public void removeTabListener​(@NotNull
                                      @NotNull TabListener listener)
        Removes a TabListener to be notified.
        Parameters:
        listener - the listener
      • getComponent

        @NotNull
        public @NotNull java.awt.Component getComponent()
        Returns the Component that is shown when this tab is active.
        Returns:
        the component
      • getButton

        @NotNull
        public @NotNull javax.swing.AbstractButton getButton()
        Returns the AbstractButton for showing or hiding the component.
        Returns:
        the button
      • getPopupMenu

        @NotNull
        public @NotNull javax.swing.JPopupMenu getPopupMenu()
        Returns the button's context menu.
        Returns:
        the menu
      • getMoveToMenu

        @NotNull
        public @NotNull javax.swing.JMenu getMoveToMenu()
        Returns the "Move To" menu within the button's context menu.
        Returns:
        the "Move To" menu
      • setSplitModeAction

        public void setSplitModeAction​(@Nullable
                                       @Nullable net.sf.japi.swing.action.ToggleAction splitModeAction)
        Sets the ToggleAction to update if the "split mode" state changes.
        Parameters:
        splitModeAction - the toggle action
      • isAlternativeLocation

        public boolean isAlternativeLocation()
        Returns whether the button is shown in the alternative location.
        Returns:
        whether the button is shown in the alternative location
      • setAlternativeLocation

        public void setAlternativeLocation​(boolean alternativeLocation)
        Sets whether the button is shown in the alternative location.
        Parameters:
        alternativeLocation - whether the button is shown in the alternative location
      • getLocation

        @NotNull
        public @NotNull Location getLocation()
        Returns the tab's location.
        Returns:
        the location
      • setLocation

        public void setLocation​(@NotNull
                                @NotNull Location location)
        Sets the tab's location.
        Parameters:
        location - the location
      • getSize

        public int getSize()
        Returns the tab's size. Depending on the tab's location either width or height is returned.
        Returns:
        the size
      • setSize

        public void setSize​(int size)
        Sets the tab's size.
        Parameters:
        size - the size; depending on the tab's location either width or height
      • isOpen

        public boolean isOpen()
        Returns the tab's open status.
        Returns:
        whether the tab is open
      • setOpen

        public void setOpen​(boolean open)
        Sets the tab's open status.
        Parameters:
        open - the tab's open status
      • getSeverity

        @NotNull
        public @NotNull Severity getSeverity()
        Returns the tab's Severity.
        Returns:
        the severity
      • setSeverity

        protected void setSeverity​(@NotNull
                                   @NotNull Severity severity)
        Sets the tab's Severity.
        Parameters:
        severity - the severity