Class JideTabbedPaneUI

  • Direct Known Subclasses:
    BasicJideTabbedPaneUI

    public abstract class JideTabbedPaneUI
    extends javax.swing.plaf.TabbedPaneUI
    ComponentUI for JideTabbedPane.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract void cancelTabEditing()
      Cancels the editing and discards the change.
      abstract boolean editTabAt​(int tabIndex)
      Edits the tab at the index.
      abstract void ensureActiveTabIsVisible​(boolean scrollLeft)
      Scroll the selected tab visible in case the tab is outside of the viewport.
      abstract int getEditingTabIndex()
      Gets the tab index that is editing, if any.
      abstract java.awt.Component getTabPanel()
      Gets the tab panel for the JideTabbedPane.
      abstract boolean isTabEditing()
      Checks if the tab is being edited.
      abstract void stopTabEditing()
      Stops the editing and commits the change.
      • Methods inherited from class javax.swing.plaf.TabbedPaneUI

        getTabBounds, getTabRunCount, tabForCoordinate
      • Methods inherited from class javax.swing.plaf.ComponentUI

        contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
      • Methods inherited from class java.lang.Object

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

      • JideTabbedPaneUI

        public JideTabbedPaneUI()
    • Method Detail

      • getTabPanel

        public abstract java.awt.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 L&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.