Class JideTabbedPaneUI

Direct Known Subclasses:
BasicJideTabbedPaneUI

public abstract class JideTabbedPaneUI extends TabbedPaneUI
ComponentUI for JideTabbedPane.
  • Constructor Details

    • JideTabbedPaneUI

      public JideTabbedPaneUI()
  • Method Details

    • getTabPanel

      public abstract Component getTabPanel()
      Gets the tab panel for the JideTabbedPane. The tab panel contains all the tabs and the tabbed pane buttons (close, scroll left/right, list buttons). Sometimes you have to use this tab panel. For example, if you want to add a mouse listener to get double click event on tabs, you must use this tab panel to add mouse listener. In addition, as the tab panel is part of the TabbedPaneUI which is recreated when updateUI is called (which usually happens after switching Linvalid input: '&F'), you should override updateUI method in JideTabbedPane to add mouse listener so that it will get added again after updateUI.
      Returns:
      the tab panel.
    • editTabAt

      public abstract boolean editTabAt(int tabIndex)
      Edits the tab at the index.
      Parameters:
      tabIndex - the tab index.
      Returns:
      true if editing started. Otherwise false if the tab is already in editing mode when this method is called.
    • isTabEditing

      public abstract boolean isTabEditing()
      Checks if the tab is being edited.
      Returns:
      true or false.
    • stopTabEditing

      public abstract void stopTabEditing()
      Stops the editing and commits the change.
    • cancelTabEditing

      public abstract void cancelTabEditing()
      Cancels the editing and discards the change.
    • getEditingTabIndex

      public abstract int getEditingTabIndex()
      Gets the tab index that is editing, if any. -1 if no tab is being edited.
      Returns:
      the tab index or -1.
    • ensureActiveTabIsVisible

      public abstract void ensureActiveTabIsVisible(boolean scrollLeft)
      Scroll the selected tab visible in case the tab is outside of the viewport. This method is called by JideTabbedPane.scrollSelectedTabToVisible(boolean) method.
      Parameters:
      scrollLeft - true to scroll the first tab visible first then scroll left to make the selected tab visible. This will get a more consistent result. If false, it will simple scroll the selected tab visible. Sometimes the tab will appear as the first visible tab or the last visible tab depending on the previous viewport position.