API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.plaf.basic. BasicTabbedPaneUI View Source
Author(s)
Amy Fowler
Philip Milne
Steve Wilson
Tom Santos
Dave Moore
Since
Version
1.87 06/08/99
Serial
Hierarchy
 Object
      ComponentUI
          TabbedPaneUI
              BasicTabbedPaneUI
Implements
 SwingConstants
Subclasses
Description
public class BasicTabbedPaneUI
A Basic L&F implementation of TabbedPaneUI.
See also:   
Constructors
public BasicTabbedPaneUI ()
Methods
Hide/Show inherited methods
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)
public boolean contains (JComponent c, int x, int y) [Inherited From ComponentUI]
  Returns true if the specified x,y location is contained within the look and feel's defined shape of the specified component.
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.
publicstatic ComponentUI createUI (JComponent c) [Overrides ComponentUI]
protected void expandTabRunsArray ()
public Accessible getAccessibleChild (JComponent c, int i) [Inherited From ComponentUI]
  Returns the ith Accessible child of the object.
public int getAccessibleChildrenCount (JComponent c) [Inherited From ComponentUI]
  Returns the number of accessible children in the object.
protected int getBaseline (int tab)
  Returns the baseline for the specified tab.
public int getBaseline (JComponent c, int width, int height) [Overrides ComponentUI]
  Returns the baseline.
protected int getBaselineOffset ()
  Returns the amount the baseline is offset by.
public BaselineResizeBehavior getBaselineResizeBehavior (JComponent c) [Overrides ComponentUI]
  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)
pack-private InputMap getInputMap (int condition)
public Dimension getMaximumSize (JComponent c) [Overrides ComponentUI]
public Dimension getMinimumSize (JComponent c) [Overrides ComponentUI]
protected int getNextTabIndex (int base)
protected int getNextTabIndexInRun (int tabCount, int base)
protected int getNextTabRun (int baseRun)
public Dimension getPreferredSize (JComponent c) [Inherited From ComponentUI]
  Returns the specified component's preferred size appropriate for the look and feel.
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)
protected Rectangle getTabBounds (int tabIndex, Rectangle dest)
  Returns the bounds of the specified tab in the coordinate space of the JTabbedPane component.
public Rectangle getTabBounds (JTabbedPane pane, int i) [Specified in TabbedPaneUI]
  Returns the bounds of the specified tab index.
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) [Specified in TabbedPaneUI]
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) [Overrides ComponentUI]
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)
pack-privatestatic void loadActionMap (LazyActionMap map)
protected void navigateSelectedTab (int direction)
public void paint (Graphics g, JComponent c) [Overrides ComponentUI]
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.
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)
pack-private boolean requestFocusForVisibleComponent ()
protectedstatic 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)
pack-private void setFocusIndex (int index, boolean repaint)
protected void setRolloverTab (int index)
  Sets the tab the mouse is currently over to index.
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) [Specified in TabbedPaneUI]
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) [Overrides ComponentUI]
public void update (Graphics g, JComponent c) [Inherited From ComponentUI]
  Notifies this UI delegate that it's time to paint the specified component.
Fields
Hide/Show inherited fields
publicfinalstatic int BOTTOM = "3" [Inherited From SwingConstants]
Box-orientation constant used to specify the bottom of a box.
protectedtransient Rectangle calcRect
A rectangle used for general layout calculations in order to avoid constructing many new Rectangles on the fly.
publicfinalstatic int CENTER = "0" [Inherited From SwingConstants]
  The central position in an area.
protected Insets contentBorderInsets
protected Color darkShadow
@Deprecated
protected KeyStroke downKey
  As of Java 2 platform v1.3 this previously undocumented field is no longer used.
publicfinalstatic int EAST = "3" [Inherited From SwingConstants]
Compass-direction east (right).
protected Color focus
protected FocusListener focusListener
protected Color highlight
publicfinalstatic int HORIZONTAL = "0" [Inherited From SwingConstants]
  Horizontal orientation.
publicfinalstatic int LEADING = "10" [Inherited From SwingConstants]
  Identifies the leading edge of text for use with left-to-right and right-to-left languages.
publicfinalstatic int LEFT = "2" [Inherited From SwingConstants]
Box-orientation constant used to specify the left side of a box.
@Deprecated
protected KeyStroke leftKey
  As of Java 2 platform v1.3 this previously undocumented field is no longer used.
protected Color lightHighlight
protected int maxTabHeight
protected int maxTabWidth
protected MouseListener mouseListener
publicfinalstatic int NEXT = "12" [Inherited From SwingConstants]
  Identifies the next direction in a sequence.
publicfinalstatic int NORTH = "1" [Inherited From SwingConstants]
Compass-direction North (up).
publicfinalstatic int NORTH_EAST = "2" [Inherited From SwingConstants]
Compass-direction north-east (upper right).
publicfinalstatic int NORTH_WEST = "8" [Inherited From SwingConstants]
Compass-direction north west (upper left).
publicfinalstatic int PREVIOUS = "13" [Inherited From SwingConstants]
  Identifies the previous direction in a sequence.
protected PropertyChangeListener propertyChangeListener
protected Rectangle rects
publicfinalstatic int RIGHT = "4" [Inherited From SwingConstants]
Box-orientation constant used to specify the right side of a box.
@Deprecated
protected KeyStroke rightKey
  As of Java 2 platform v1.3 this previously undocumented field is no longer used.
protected int runCount
protected int selectedRun
protected Insets selectedTabPadInsets
protected Color shadow
publicfinalstatic int SOUTH = "5" [Inherited From SwingConstants]
Compass-direction south (down).
publicfinalstatic int SOUTH_EAST = "4" [Inherited From SwingConstants]
Compass-direction south-east (lower right).
publicfinalstatic int SOUTH_WEST = "6" [Inherited From SwingConstants]
Compass-direction south-west (lower left).
protected Insets tabAreaInsets
protected ChangeListener tabChangeListener
protected Insets tabInsets
protected JTabbedPane tabPane
protected int tabRunOverlay
protected int tabRuns
protected int textIconGap
publicfinalstatic int TOP = "1" [Inherited From SwingConstants]
Box-orientation constant used to specify the top of a box.
publicfinalstatic int TRAILING = "11" [Inherited From SwingConstants]
  Identifies the trailing edge of text for use with left-to-right and right-to-left languages.
@Deprecated
protected KeyStroke upKey
  As of Java 2 platform v1.3 this previously undocumented field is no longer used.
publicfinalstatic int VERTICAL = "1" [Inherited From SwingConstants]
  Vertical orientation.
publicfinalstatic int WEST = "7" [Inherited From SwingConstants]
Compass-direction west (left).
Nested Classes
  BasicTabbedPaneUI.TabbedPaneLayout
This class should be treated as a "protected" inner class.
  BasicTabbedPaneUI.PropertyChangeHandler
This class should be treated as a "protected" inner class.
  BasicTabbedPaneUI.TabSelectionHandler
This class should be treated as a "protected" inner class.
  BasicTabbedPaneUI.MouseHandler
This class should be treated as a "protected" inner class.
  BasicTabbedPaneUI.FocusHandler
This class should be treated as a "protected" inner class.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar