javax.swing.plaf
Class TabbedPaneUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.TabbedPaneUI
Direct Known Subclasses:
BasicTabbedPaneUI, MultiTabbedPaneUI

public abstract class TabbedPaneUI
extends ComponentUI

An abstract base class for delegates that implement the pluggable look and feel for a JTabbedPane.

See Also:
JTabbedPane

Constructor Summary
TabbedPaneUI()
          Constructs a new TabbedPaneUI.
 
Method Summary
abstract  Rectangle getTabBounds(JTabbedPane pane, int index)
          Calculates the bounding box of a tab.
abstract  int getTabRunCount(JTabbedPane pane)
          Determines how many runs are used to display tabs.
abstract  int tabForCoordinate(JTabbedPane pane, int x, int y)
          Determines which tab lies at a given position.
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, 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

TabbedPaneUI

public TabbedPaneUI()
Constructs a new TabbedPaneUI.

Method Detail

tabForCoordinate

public abstract int tabForCoordinate(JTabbedPane pane,
                                     int x,
                                     int y)
Determines which tab lies at a given position.

Parameters:
pane - the JTabbedPane for which this delegate object provides the user interface.
x - the horizontal position, where zero is the left edge of pane.
y - the vertical position, where zero is the top edge of pane.
Returns:
the zero-based index of the tab, or -1 if no tab is at the specified position.

getTabBounds

public abstract Rectangle getTabBounds(JTabbedPane pane,
                                       int index)
Calculates the bounding box of a tab.

Parameters:
pane - the JTabbedPane for which this delegate object provides the user interface.
index - the index of the tab, which must be an integer in the range [0 .. pane.getTabCount() - 1].
Returns:
the bounding box of the index-th tab, in the coordinate system of pane.

getTabRunCount

public abstract int getTabRunCount(JTabbedPane pane)
Determines how many runs are used to display tabs.

Parameters:
pane - the JTabbedPane for which this delegate object provides the user interface.
Returns:
the number of tab runs.
See Also:
JTabbedPane.getTabRunCount()