| java.lang.Object javax.swing.plaf.ComponentUI javax.swing.plaf.TabbedPaneUI javax.swing.plaf.basic.BasicTabbedPaneUI
All known Subclasses: javax.swing.plaf.metal.MetalTabbedPaneUI, javax.swing.plaf.synth.SynthTabbedPaneUI,
BasicTabbedPaneUI | public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants(Code) | | A Basic L&F implementation of TabbedPaneUI.
version: 1.87 06/08/99 author: Amy Fowler author: Philip Milne author: Steve Wilson author: Tom Santos author: Dave Moore |
Inner Class :public class TabbedPaneLayout implements LayoutManager | |
Inner Class :public class TabSelectionHandler implements ChangeListener | |
Method Summary | |
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. | public static ComponentUI | createUI(JComponent c) | protected void | expandTabRunsArray() | public int | getBaseline(JComponent c, int width, int height) Returns the baseline. | protected int | getBaseline(int tab) Returns the baseline for the specified tab. | protected int | getBaselineOffset() Returns the amount the baseline is offset by. | public Component.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
-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. | protected Rectangle | getTabBounds(int tabIndex, Rectangle dest) Returns the bounds of the specified tab in the coordinate space
of the JTabbedPane component. | 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. | protected Component | getVisibleComponent() | protected void | installComponents() Creates and installs any required subcomponents for the JTabbedPane. | 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. | 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. | 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. | 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. | protected void | uninstallDefaults() | protected void | uninstallKeyboardActions() | protected void | uninstallListeners() | public void | uninstallUI(JComponent c) |
calcRect | protected transient Rectangle calcRect(Code) | | A rectangle used for general layout calculations in order
to avoid constructing many new Rectangles on the fly.
|
contentBorderInsets | protected Insets contentBorderInsets(Code) | | |
downKey | protected KeyStroke downKey(Code) | | 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.
|
leftKey | protected KeyStroke leftKey(Code) | | 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.
|
maxTabHeight | protected int maxTabHeight(Code) | | |
maxTabWidth | protected int maxTabWidth(Code) | | |
rightKey | protected KeyStroke rightKey(Code) | | 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.
|
runCount | protected int runCount(Code) | | |
selectedRun | protected int selectedRun(Code) | | |
selectedTabPadInsets | protected Insets selectedTabPadInsets(Code) | | |
tabRunOverlay | protected int tabRunOverlay(Code) | | |
tabRuns | protected int tabRuns(Code) | | |
textIconGap | protected int textIconGap(Code) | | |
upKey | protected KeyStroke upKey(Code) | | 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.
|
assureRectsCreated | protected void assureRectsCreated(int tabCount)(Code) | | |
calculateMaxTabHeight | protected int calculateMaxTabHeight(int tabPlacement)(Code) | | |
calculateMaxTabWidth | protected int calculateMaxTabWidth(int tabPlacement)(Code) | | |
calculateTabAreaHeight | protected int calculateTabAreaHeight(int tabPlacement, int horizRunCount, int maxTabHeight)(Code) | | |
calculateTabAreaWidth | protected int calculateTabAreaWidth(int tabPlacement, int vertRunCount, int maxTabWidth)(Code) | | |
calculateTabHeight | protected int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight)(Code) | | |
calculateTabWidth | protected int calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics)(Code) | | |
createScrollButton | protected JButton createScrollButton(int direction)(Code) | | 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.
Parameters: direction - One of the SwingConstants constants:SOUTH, NORTH, EAST or WEST Widget for user to See Also: javax.swing.JTabbedPane.setTabPlacement See Also: javax.swing.SwingConstants throws: IllegalArgumentException - if direction is not one ofNORTH, SOUTH, EAST or WEST since: 1.5 |
expandTabRunsArray | protected void expandTabRunsArray()(Code) | | |
getBaseline | protected int getBaseline(int tab)(Code) | | Returns the baseline for the specified tab.
Parameters: tab - index of tab to get baseline for exception: IndexOutOfBoundsException - if index is out of range (index < 0 || index >= tab count) baseline or a value < 0 indicating there is no reasonablebaseline since: 1.6 |
getBaselineOffset | protected int getBaselineOffset()(Code) | | Returns the amount the baseline is offset by. This is typically
the same as getTabLabelShiftY .
amount to offset the baseline by since: 1.6 |
getContentBorderInsets | protected Insets getContentBorderInsets(int tabPlacement)(Code) | | |
getFocusIndex | protected int getFocusIndex()(Code) | | Returns the index of the tab that has focus.
index of tab that has focus since: 1.5 |
getIconForTab | protected Icon getIconForTab(int tabIndex)(Code) | | |
getNextTabIndex | protected int getNextTabIndex(int base)(Code) | | |
getNextTabIndexInRun | protected int getNextTabIndexInRun(int tabCount, int base)(Code) | | |
getNextTabRun | protected int getNextTabRun(int baseRun)(Code) | | |
getPreviousTabIndex | protected int getPreviousTabIndex(int base)(Code) | | |
getPreviousTabIndexInRun | protected int getPreviousTabIndexInRun(int tabCount, int base)(Code) | | |
getPreviousTabRun | protected int getPreviousTabRun(int baseRun)(Code) | | |
getRolloverTab | protected int getRolloverTab()(Code) | | Returns the tab the mouse is currently over, or
-1 if the mouse is no
longer over any tab.
the tab the mouse is currently over, or -1 if the mouse is nolonger over any tab since: 1.5 |
getRunForTab | protected int getRunForTab(int tabCount, int tabIndex)(Code) | | |
getSelectedTabPadInsets | protected Insets getSelectedTabPadInsets(int tabPlacement)(Code) | | |
getTabAreaInsets | protected Insets getTabAreaInsets(int tabPlacement)(Code) | | |
getTabBounds | public Rectangle getTabBounds(JTabbedPane pane, int i)(Code) | | Returns the bounds of the specified tab index. The bounds are
with respect to the JTabbedPane's coordinate space.
|
getTabBounds | protected Rectangle getTabBounds(int tabIndex, Rectangle dest)(Code) | | 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.
Parameters: tabIndex - the index of the tab Parameters: dest - the rectangle where the result should be placed the resulting rectangle since: 1.4 |
getTabInsets | protected Insets getTabInsets(int tabPlacement, int tabIndex)(Code) | | |
getTabLabelShiftX | protected int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)(Code) | | |
getTabLabelShiftY | protected int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)(Code) | | |
getTabRunIndent | protected int getTabRunIndent(int tabPlacement, int run)(Code) | | |
getTabRunOffset | protected int getTabRunOffset(int tabPlacement, int tabCount, int tabIndex, boolean forward)(Code) | | |
getTabRunOverlay | protected int getTabRunOverlay(int tabPlacement)(Code) | | |
getTextViewForTab | protected View getTextViewForTab(int tabIndex)(Code) | | 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.
Parameters: tabIndex - the index of the tab the text view to render the tab's text or null if nospecialized rendering is required since: 1.4 |
installComponents | protected void installComponents()(Code) | | Creates and installs any required subcomponents for the JTabbedPane.
Invoked by installUI.
since: 1.4 |
installDefaults | protected void installDefaults()(Code) | | |
installKeyboardActions | protected void installKeyboardActions()(Code) | | |
installListeners | protected void installListeners()(Code) | | |
lastTabInRun | protected int lastTabInRun(int tabCount, int run)(Code) | | |
navigateSelectedTab | protected void navigateSelectedTab(int direction)(Code) | | |
paintContentBorder | protected void paintContentBorder(Graphics g, int tabPlacement, int selectedIndex)(Code) | | |
paintContentBorderBottomEdge | protected void paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)(Code) | | |
paintContentBorderLeftEdge | protected void paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)(Code) | | |
paintContentBorderRightEdge | protected void paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)(Code) | | |
paintContentBorderTopEdge | protected void paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)(Code) | | |
paintTabArea | protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex)(Code) | | 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.
Parameters: g - the graphics object to use for rendering Parameters: tabPlacement - the placement for the tabs within the JTabbedPane Parameters: selectedIndex - the tab index of the selected component since: 1.4 |
paintTabBackground | protected void paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)(Code) | | |
paintTabBorder | protected void paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)(Code) | | this function draws the border around each tab
note that this function does now draw the background of the tab.
that is done elsewhere
|
requestFocusForVisibleComponent | boolean requestFocusForVisibleComponent()(Code) | | |
rotateInsets | protected static void rotateInsets(Insets topInsets, Insets targetInsets, int targetPlacement)(Code) | | |
selectAdjacentRunTab | protected void selectAdjacentRunTab(int tabPlacement, int tabIndex, int offset)(Code) | | |
selectNextTab | protected void selectNextTab(int current)(Code) | | |
selectNextTabInRun | protected void selectNextTabInRun(int current)(Code) | | |
selectPreviousTab | protected void selectPreviousTab(int current)(Code) | | |
selectPreviousTabInRun | protected void selectPreviousTabInRun(int current)(Code) | | |
setFocusIndex | void setFocusIndex(int index, boolean repaint)(Code) | | |
setRolloverTab | protected void setRolloverTab(int index)(Code) | | 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.
Parameters: index - Index of the tab the mouse is over. since: 1.5 |
setVisibleComponent | protected void setVisibleComponent(Component component)(Code) | | |
shouldPadTabRun | protected boolean shouldPadTabRun(int tabPlacement, int run)(Code) | | |
shouldRotateTabRuns | protected boolean shouldRotateTabRuns(int tabPlacement)(Code) | | |
tabForCoordinate | public int tabForCoordinate(JTabbedPane pane, int x, int y)(Code) | | Returns the tab index which intersects the specified point
in the JTabbedPane's coordinate space.
|
uninstallComponents | protected void uninstallComponents()(Code) | | Removes any installed subcomponents from the JTabbedPane.
Invoked by uninstallUI.
since: 1.4 |
uninstallDefaults | protected void uninstallDefaults()(Code) | | |
uninstallKeyboardActions | protected void uninstallKeyboardActions()(Code) | | |
uninstallListeners | protected void uninstallListeners()(Code) | | |
|
|