Class Ribbon

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants

public class Ribbon extends JTabbedPane
See Also:
  • Constructor Details

    • Ribbon

      public Ribbon()
  • Method Details

    • setExitAction

      public void setExitAction(AbstractRibbonAction exitAction)
      Set a custom exit action to execute when the ribbon close icon is clicked. Most of the time you may want to add a windows closing listener on the top JFrame of the application.
      Parameters:
      exitAction - the action to execute when the ribbon close icon is clicked.
    • getExitAction

      public AbstractRibbonAction getExitAction()
    • addRibbonTab

      public void addRibbonTab(RibbonTab ribbonTab)
    • setSelectedRibbonTab

      public RibbonTab setSelectedRibbonTab(String title)
      Selects the ribbon tab whose name is given in parameter. Returns the RibbonTab found and null if no ribbon tab is found. If more than one ribbon tab have the same name, then the first one is returned.
      Parameters:
      title - the title of the ribbon tab we want to select
      Returns:
      RibbonTab instance found or null if none found for that title
    • setSelectedRibbonTab

      public void setSelectedRibbonTab(RibbonTab tab)
    • main

      public static void main(String... args)