javax.swing.plaf

Class TabbedPaneUI

public abstract class TabbedPaneUI extends ComponentUI

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

See Also:

Constructor Summary
TabbedPaneUI()
Constructs a new TabbedPaneUI.
Method Summary
abstract RectanglegetTabBounds(JTabbedPane pane, int index)
Calculates the bounding box of a tab.
abstract intgetTabRunCount(JTabbedPane pane)
Determines how many runs are used to display tabs.
abstract inttabForCoordinate(JTabbedPane pane, int x, int y)
Determines which tab lies at a given position.

Constructor Detail

TabbedPaneUI

public TabbedPaneUI()
Constructs a new TabbedPaneUI.

Method Detail

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: getTabRunCount

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.