Home » openjdk-7 » javax » swing » plaf » basic » [javadoc | source]
javax.swing.plaf.basic
public class: BasicTabbedPaneUI [javadoc | source]
java.lang.Object
   javax.swing.plaf.ComponentUI
      javax.swing.plaf.TabbedPaneUI
         javax.swing.plaf.basic.BasicTabbedPaneUI

All Implemented Interfaces:
    SwingConstants

Direct Known Subclasses:
    MetalTabbedPaneUI, SynthTabbedPaneUI

A Basic L&F implementation of TabbedPaneUI.
Nested Class Summary:
public class  BasicTabbedPaneUI.TabbedPaneLayout  This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicTabbedPaneUI. 
public class  BasicTabbedPaneUI.PropertyChangeHandler  This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicTabbedPaneUI. 
public class  BasicTabbedPaneUI.TabSelectionHandler  This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicTabbedPaneUI. 
public class  BasicTabbedPaneUI.MouseHandler  This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicTabbedPaneUI. 
public class  BasicTabbedPaneUI.FocusHandler  This class should be treated as a "protected" inner class. Instantiate it only within subclasses of BasicTabbedPaneUI. 
Field Summary
protected  JTabbedPane tabPane     
protected  Color highlight     
protected  Color lightHighlight     
protected  Color shadow     
protected  Color darkShadow     
protected  Color focus     
protected  int textIconGap     
protected  int tabRunOverlay     
protected  Insets tabInsets     
protected  Insets selectedTabPadInsets     
protected  Insets tabAreaInsets     
protected  Insets contentBorderInsets     
protected  KeyStroke upKey    As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.
     
    protected  KeyStroke downKey    As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.
       
      protected  KeyStroke leftKey    As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.
         
        protected  KeyStroke rightKey    As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.
           
          protected  int[] tabRuns     
          protected  int runCount     
          protected  int selectedRun     
          protected  Rectangle[] rects     
          protected  int maxTabHeight     
          protected  int maxTabWidth     
          protected  ChangeListener tabChangeListener     
          protected  PropertyChangeListener propertyChangeListener     
          protected  MouseListener mouseListener     
          protected  FocusListener focusListener     
          protected transient  Rectangle calcRect    A rectangle used for general layout calculations in order to avoid constructing many new Rectangles on the fly. 
          Method from javax.swing.plaf.basic.BasicTabbedPaneUI Summary:
          assureRectsCreated,   calculateMaxTabHeight,   calculateMaxTabWidth,   calculateTabAreaHeight,   calculateTabAreaWidth,   calculateTabHeight,   calculateTabWidth,   createChangeListener,   createFocusListener,   createLayoutManager,   createMouseListener,   createPropertyChangeListener,   createScrollButton,   createUI,   expandTabRunsArray,   getBaseline,   getBaseline,   getBaselineOffset,   getBaselineResizeBehavior,   getContentBorderInsets,   getFocusIndex,   getFontMetrics,   getIconForTab,   getInputMap,   getMaximumSize,   getMinimumSize,   getNextTabIndex,   getNextTabIndexInRun,   getNextTabRun,   getPreviousTabIndex,   getPreviousTabIndexInRun,   getPreviousTabRun,   getRolloverTab,   getRunForTab,   getSelectedTabPadInsets,   getTabAreaInsets,   getTabBounds,   getTabBounds,   getTabInsets,   getTabLabelShiftX,   getTabLabelShiftY,   getTabRunCount,   getTabRunIndent,   getTabRunOffset,   getTabRunOverlay,   getTextViewForTab,   getVisibleComponent,   installComponents,   installDefaults,   installKeyboardActions,   installListeners,   installUI,   lastTabInRun,   layoutLabel,   loadActionMap,   navigateSelectedTab,   paint,   paintContentBorder,   paintContentBorderBottomEdge,   paintContentBorderLeftEdge,   paintContentBorderRightEdge,   paintContentBorderTopEdge,   paintFocusIndicator,   paintIcon,   paintTab,   paintTabArea,   paintTabBackground,   paintTabBorder,   paintText,   requestFocusForVisibleComponent,   rotateInsets,   selectAdjacentRunTab,   selectNextTab,   selectNextTabInRun,   selectPreviousTab,   selectPreviousTabInRun,   setFocusIndex,   setRolloverTab,   setVisibleComponent,   shouldPadTabRun,   shouldRotateTabRuns,   tabForCoordinate,   uninstallComponents,   uninstallDefaults,   uninstallKeyboardActions,   uninstallListeners,   uninstallUI
          Methods from javax.swing.plaf.TabbedPaneUI:
          getTabBounds,   getTabRunCount,   tabForCoordinate
          Methods from javax.swing.plaf.ComponentUI:
          contains,   createUI,   getAccessibleChild,   getAccessibleChildrenCount,   getBaseline,   getBaselineResizeBehavior,   getMaximumSize,   getMinimumSize,   getPreferredSize,   installUI,   paint,   uninstallUI,   update
          Methods from java.lang.Object:
          clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
          Method from javax.swing.plaf.basic.BasicTabbedPaneUI Detail:
           protected  void assureRectsCreated(int tabCount) 
           protected int calculateMaxTabHeight(int tabPlacement) 
           protected int calculateMaxTabWidth(int tabPlacement) 
           protected int calculateTabAreaHeight(int tabPlacement,
              int horizRunCount,
              int maxTabHeight) 
           protected int calculateTabAreaWidth(int tabPlacement,
              int vertRunCount,
              int maxTabWidth) 
           protected int calculateTabHeight(int tabPlacement,
              int tabIndex,
              int fontHeight) 
           protected int calculateTabWidth(int tabPlacement,
              int tabIndex,
              FontMetrics metrics) 
           protected ChangeListener createChangeListener() 
           protected FocusListener createFocusListener() 
           protected LayoutManager createLayoutManager() 
            Invoked by installUI to create a layout manager object to manage the JTabbedPane.
           protected MouseListener createMouseListener() 
           protected PropertyChangeListener createPropertyChangeListener() 
           protected JButton createScrollButton(int direction) 
            Creates and returns a JButton that will provide the user with a way to scroll the tabs in a particular direction. The returned JButton must be instance of UIResource.
           public static ComponentUI createUI(JComponent c) 
           protected  void expandTabRunsArray() 
           protected int getBaseline(int tab) 
            Returns the baseline for the specified tab.
           public int getBaseline(JComponent c,
              int width,
              int height) 
            Returns the baseline.
           protected int getBaselineOffset() 
            Returns the amount the baseline is offset by. This is typically the same as getTabLabelShiftY.
           public BaselineResizeBehavior getBaselineResizeBehavior(JComponent c) 
            Returns an enum indicating how the baseline of the component changes as the size changes.
           protected Insets getContentBorderInsets(int tabPlacement) 
           protected int getFocusIndex() 
            Returns the index of the tab that has focus.
           protected FontMetrics getFontMetrics() 
           protected Icon getIconForTab(int tabIndex) 
           InputMap getInputMap(int condition) 
           public Dimension getMaximumSize(JComponent c) 
           public Dimension getMinimumSize(JComponent c) 
           protected int getNextTabIndex(int base) 
           protected int getNextTabIndexInRun(int tabCount,
              int base) 
           protected int getNextTabRun(int baseRun) 
           protected int getPreviousTabIndex(int base) 
           protected int getPreviousTabIndexInRun(int tabCount,
              int base) 
           protected int getPreviousTabRun(int baseRun) 
           protected int getRolloverTab() 
            Returns the tab the mouse is currently over, or {@code -1} if the mouse is no longer over any tab.
           protected int getRunForTab(int tabCount,
              int tabIndex) 
           protected Insets getSelectedTabPadInsets(int tabPlacement) 
           protected Insets getTabAreaInsets(int tabPlacement) 
           public Rectangle getTabBounds(JTabbedPane pane,
              int i) 
            Returns the bounds of the specified tab index. The bounds are with respect to the JTabbedPane's coordinate space.
           protected Rectangle getTabBounds(int tabIndex,
              Rectangle dest) 
            Returns the bounds of the specified tab in the coordinate space of the JTabbedPane component. This is required because the tab rects are by default defined in the coordinate space of the component where they are rendered, which could be the JTabbedPane (for WRAP_TAB_LAYOUT) or a ScrollableTabPanel (SCROLL_TAB_LAYOUT). This method should be used whenever the tab rectangle must be relative to the JTabbedPane itself and the result should be placed in a designated Rectangle object (rather than instantiating and returning a new Rectangle each time). The tab index parameter must be a valid tabbed pane tab index (0 to tab count - 1, inclusive). The destination rectangle parameter must be a valid Rectangle instance. The handling of invalid parameters is unspecified.
           protected Insets getTabInsets(int tabPlacement,
              int tabIndex) 
           protected int getTabLabelShiftX(int tabPlacement,
              int tabIndex,
              boolean isSelected) 
           protected int getTabLabelShiftY(int tabPlacement,
              int tabIndex,
              boolean isSelected) 
           public int getTabRunCount(JTabbedPane pane) 
           protected int getTabRunIndent(int tabPlacement,
              int run) 
           protected int getTabRunOffset(int tabPlacement,
              int tabCount,
              int tabIndex,
              boolean forward) 
           protected int getTabRunOverlay(int tabPlacement) 
           protected View getTextViewForTab(int tabIndex) 
            Returns the text View object required to render stylized text (HTML) for the specified tab or null if no specialized text rendering is needed for this tab. This is provided to support html rendering inside tabs.
           protected Component getVisibleComponent() 
           protected  void installComponents() 
            Creates and installs any required subcomponents for the JTabbedPane. Invoked by installUI.
           protected  void installDefaults() 
           protected  void installKeyboardActions() 
           protected  void installListeners() 
           public  void installUI(JComponent c) 
           protected int lastTabInRun(int tabCount,
              int run) 
           protected  void layoutLabel(int tabPlacement,
              FontMetrics metrics,
              int tabIndex,
              String title,
              Icon icon,
              Rectangle tabRect,
              Rectangle iconRect,
              Rectangle textRect,
              boolean isSelected) 
           static  void loadActionMap(LazyActionMap map) 
           protected  void navigateSelectedTab(int direction) 
           public  void paint(Graphics g,
              JComponent c) 
           protected  void paintContentBorder(Graphics g,
              int tabPlacement,
              int selectedIndex) 
           protected  void paintContentBorderBottomEdge(Graphics g,
              int tabPlacement,
              int selectedIndex,
              int x,
              int y,
              int w,
              int h) 
           protected  void paintContentBorderLeftEdge(Graphics g,
              int tabPlacement,
              int selectedIndex,
              int x,
              int y,
              int w,
              int h) 
           protected  void paintContentBorderRightEdge(Graphics g,
              int tabPlacement,
              int selectedIndex,
              int x,
              int y,
              int w,
              int h) 
           protected  void paintContentBorderTopEdge(Graphics g,
              int tabPlacement,
              int selectedIndex,
              int x,
              int y,
              int w,
              int h) 
           protected  void paintFocusIndicator(Graphics g,
              int tabPlacement,
              Rectangle[] rects,
              int tabIndex,
              Rectangle iconRect,
              Rectangle textRect,
              boolean isSelected) 
           protected  void paintIcon(Graphics g,
              int tabPlacement,
              int tabIndex,
              Icon icon,
              Rectangle iconRect,
              boolean isSelected) 
           protected  void paintTab(Graphics g,
              int tabPlacement,
              Rectangle[] rects,
              int tabIndex,
              Rectangle iconRect,
              Rectangle textRect) 
           protected  void paintTabArea(Graphics g,
              int tabPlacement,
              int selectedIndex) 
            Paints the tabs in the tab area. Invoked by paint(). The graphics parameter must be a valid Graphics object. Tab placement may be either: JTabbedPane.TOP, JTabbedPane.BOTTOM, JTabbedPane.LEFT, or JTabbedPane.RIGHT. The selected index must be a valid tabbed pane tab index (0 to tab count - 1, inclusive) or -1 if no tab is currently selected. The handling of invalid parameters is unspecified.
           protected  void paintTabBackground(Graphics g,
              int tabPlacement,
              int tabIndex,
              int x,
              int y,
              int w,
              int h,
              boolean isSelected) 
           protected  void paintTabBorder(Graphics g,
              int tabPlacement,
              int tabIndex,
              int x,
              int y,
              int w,
              int h,
              boolean isSelected) 
            this function draws the border around each tab note that this function does now draw the background of the tab. that is done elsewhere
           protected  void paintText(Graphics g,
              int tabPlacement,
              Font font,
              FontMetrics metrics,
              int tabIndex,
              String title,
              Rectangle textRect,
              boolean isSelected) 
           boolean requestFocusForVisibleComponent() 
           protected static  void rotateInsets(Insets topInsets,
              Insets targetInsets,
              int targetPlacement) 
           protected  void selectAdjacentRunTab(int tabPlacement,
              int tabIndex,
              int offset) 
           protected  void selectNextTab(int current) 
           protected  void selectNextTabInRun(int current) 
           protected  void selectPreviousTab(int current) 
           protected  void selectPreviousTabInRun(int current) 
            void setFocusIndex(int index,
              boolean repaint) 
           protected  void setRolloverTab(int index) 
            Sets the tab the mouse is currently over to index. index will be -1 if the mouse is no longer over any tab. No checking is done to ensure the passed in index identifies a valid tab.
           protected  void setVisibleComponent(Component component) 
           protected boolean shouldPadTabRun(int tabPlacement,
              int run) 
           protected boolean shouldRotateTabRuns(int tabPlacement) 
           public int tabForCoordinate(JTabbedPane pane,
              int x,
              int y) 
            Returns the tab index which intersects the specified point in the JTabbedPane's coordinate space.
           protected  void uninstallComponents() 
            Removes any installed subcomponents from the JTabbedPane. Invoked by uninstallUI.
           protected  void uninstallDefaults() 
           protected  void uninstallKeyboardActions() 
           protected  void uninstallListeners() 
           public  void uninstallUI(JComponent c)