net.sourceforge.mlf.metouia
Class MetouiaTabbedPaneUI

java.lang.Object
  extended byjavax.swing.plaf.ComponentUI
      extended byjavax.swing.plaf.TabbedPaneUI
          extended byjavax.swing.plaf.basic.BasicTabbedPaneUI
              extended bynet.sourceforge.mlf.metouia.MetouiaTabbedPaneUI
All Implemented Interfaces:
javax.swing.SwingConstants

public class MetouiaTabbedPaneUI
extends javax.swing.plaf.basic.BasicTabbedPaneUI

This class represents the UI delegate for the JTabbedPane component.


Nested Class Summary
 
Nested classes inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI
javax.swing.plaf.basic.BasicTabbedPaneUI.FocusHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.MouseHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout, javax.swing.plaf.basic.BasicTabbedPaneUI.TabSelectionHandler
 
Field Summary
 
Fields inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI
calcRect, contentBorderInsets, darkShadow, downKey, focus, focusListener, highlight, leftKey, lightHighlight, maxTabHeight, maxTabWidth, mouseListener, propertyChangeListener, rects, rightKey, runCount, selectedRun, selectedTabPadInsets, shadow, tabAreaInsets, tabChangeListener, tabInsets, tabPane, tabRunOverlay, tabRuns, textIconGap, upKey
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Constructor Summary
MetouiaTabbedPaneUI()
           
 
Method Summary
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
          Creates the UI delegate for the given component.
protected  void paintContentBorder(java.awt.Graphics g, int tabPlacement, int selectedIndex)
          Paints the border of a given tab.
protected  void paintContentBorderBottomEdge(java.awt.Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
          Paints the bottom edge of the content border.
protected  void paintContentBorderLeftEdge(java.awt.Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
          Paints the left edge of the content border.
protected  void paintContentBorderRightEdge(java.awt.Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
          Paints the right edge of the content border.
protected  void paintContentBorderTopEdge(java.awt.Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
          Paints the top edge of the content border.
protected  void paintTabBackground(java.awt.Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
          Paints the backround of a given tab.
protected  void paintTabBorder(java.awt.Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
          Draws the border around each tab.
 
Methods inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI
assureRectsCreated, calculateMaxTabHeight, calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, calculateTabHeight, calculateTabWidth, createChangeListener, createFocusListener, createLayoutManager, createMouseListener, createPropertyChangeListener, expandTabRunsArray, getContentBorderInsets, getFontMetrics, getIconForTab, getMaximumSize, getMinimumSize, getNextTabIndex, getNextTabIndexInRun, getNextTabRun, getPreferredSize, getPreviousTabIndex, getPreviousTabIndexInRun, getPreviousTabRun, getRunForTab, getSelectedTabPadInsets, getTabAreaInsets, getTabBounds, getTabBounds, getTabInsets, getTabLabelShiftX, getTabLabelShiftY, getTabRunCount, getTabRunIndent, getTabRunOffset, getTabRunOverlay, getTextViewForTab, getVisibleComponent, installComponents, installDefaults, installKeyboardActions, installListeners, installUI, lastTabInRun, layoutLabel, navigateSelectedTab, paint, paintFocusIndicator, paintIcon, paintTab, paintTabArea, paintText, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setVisibleComponent, shouldPadTabRun, shouldRotateTabRuns, tabForCoordinate, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetouiaTabbedPaneUI

public MetouiaTabbedPaneUI()
Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
Creates the UI delegate for the given component.

Parameters:
c - The component to create its UI delegate.
Returns:
The UI delegate for the given component.

paintTabBackground

protected void paintTabBackground(java.awt.Graphics g,
                                  int tabPlacement,
                                  int tabIndex,
                                  int x,
                                  int y,
                                  int w,
                                  int h,
                                  boolean isSelected)
Paints the backround of a given tab.

Parameters:
g - The graphics context.
tabPlacement - The placement of the tab to paint.
tabIndex - The index of the tab to paint.
x - The x coordinate of the top left corner.
y - The y coordinate of the top left corner.
w - The width.
h - The height.
isSelected - True if the tab to paint is selected otherwise false.

paintContentBorder

protected void paintContentBorder(java.awt.Graphics g,
                                  int tabPlacement,
                                  int selectedIndex)
Paints the border of a given tab.

Parameters:
g - The graphics context.
tabPlacement - The placement of the tab to paint.
selectedIndex - The index of the selected tab.

paintContentBorderTopEdge

protected void paintContentBorderTopEdge(java.awt.Graphics g,
                                         int tabPlacement,
                                         int selectedIndex,
                                         int x,
                                         int y,
                                         int w,
                                         int h)
Paints the top edge of the content border.

Parameters:
g - The graphics context.
tabPlacement - The placement of the tabs.
selectedIndex - The index of the selected tab.
x - The x coordinate of the top left corner.
y - The y coordinate of the top left corner.
w - The width.
h - The height.

paintContentBorderLeftEdge

protected void paintContentBorderLeftEdge(java.awt.Graphics g,
                                          int tabPlacement,
                                          int selectedIndex,
                                          int x,
                                          int y,
                                          int w,
                                          int h)
Paints the left edge of the content border.

Parameters:
g - The graphics context.
tabPlacement - The placement of the tabs.
selectedIndex - The index of the selected tab.
x - The x coordinate of the top left corner.
y - The y coordinate of the top left corner.
w - The width.
h - The height.

paintContentBorderBottomEdge

protected void paintContentBorderBottomEdge(java.awt.Graphics g,
                                            int tabPlacement,
                                            int selectedIndex,
                                            int x,
                                            int y,
                                            int w,
                                            int h)
Paints the bottom edge of the content border.

Parameters:
g - The graphics context.
tabPlacement - The placement of the tabs.
selectedIndex - The index of the selected tab.
x - The x coordinate of the top left corner.
y - The y coordinate of the top left corner.
w - The width.
h - The height.

paintContentBorderRightEdge

protected void paintContentBorderRightEdge(java.awt.Graphics g,
                                           int tabPlacement,
                                           int selectedIndex,
                                           int x,
                                           int y,
                                           int w,
                                           int h)
Paints the right edge of the content border.

Parameters:
g - The graphics context.
tabPlacement - The placement of the tabs.
selectedIndex - The index of the selected tab.
x - The x coordinate of the top left corner.
y - The y coordinate of the top left corner.
w - The width.
h - The height.

paintTabBorder

protected void paintTabBorder(java.awt.Graphics g,
                              int tabPlacement,
                              int tabIndex,
                              int x,
                              int y,
                              int w,
                              int h,
                              boolean isSelected)
Draws the border around each tab.

Parameters:
g - The graphics context.
tabPlacement - The placement of the tabs.
tabIndex - The index of the tab to paint.
x - The x coordinate of the top left corner.
y - The y coordinate of the top left corner.
w - The width.
h - The height.
isSelected - True if the tab to paint is selected otherwise false.