com.birosoft.liquid
Class LiquidTabbedPaneUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.TabbedPaneUI
          extended by javax.swing.plaf.basic.BasicTabbedPaneUI
              extended by com.birosoft.liquid.LiquidTabbedPaneUI
All Implemented Interfaces:
javax.swing.SwingConstants

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

This class represents the UI delegate for the JTabbedPane component.


Nested Class Summary
 class LiquidTabbedPaneUI.MyMouseHandler
           
 
Nested classes/interfaces 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
LiquidTabbedPaneUI()
           
 
Method Summary
protected  java.awt.event.MouseListener createMouseListener()
           
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
          Creates the UI delegate for the given component.
 Skin getSkinBorder()
           
 Skin getSkinBorderRight()
           
 Skin getSkinBottom()
           
 Skin getSkinLeft()
           
 Skin getSkinRight()
           
 Skin getSkinTop()
           
protected  int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)
           
protected  int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)
           
protected  void installListeners()
           
 void paint(java.awt.Graphics g, javax.swing.JComponent c)
           
protected  void paintContentBorder(java.awt.Graphics g, int tabPlacement, int selectedIndex)
          Paints the border of a given tab.
protected  void paintFocusIndicator(java.awt.Graphics g, int tabPlacement, java.awt.Rectangle[] rects, int tabIndex, java.awt.Rectangle iconRect, java.awt.Rectangle textRect, boolean isSelected)
           
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.
protected  void paintText(java.awt.Graphics g, int tabPlacement, java.awt.Font font, java.awt.FontMetrics metrics, int tabIndex, java.lang.String title, java.awt.Rectangle textRect, boolean isSelected)
           
 void update(java.awt.Graphics g, javax.swing.JComponent c)
           
 
Methods inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI
assureRectsCreated, calculateMaxTabHeight, calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, calculateTabHeight, calculateTabWidth, createChangeListener, createFocusListener, createLayoutManager, createPropertyChangeListener, createScrollButton, expandTabRunsArray, getBaseline, getBaseline, getBaselineOffset, getBaselineResizeBehavior, getContentBorderInsets, getFocusIndex, getFontMetrics, getIconForTab, getMaximumSize, getMinimumSize, getNextTabIndex, getNextTabIndexInRun, getNextTabRun, getPreviousTabIndex, getPreviousTabIndexInRun, getPreviousTabRun, getRolloverTab, getRunForTab, getSelectedTabPadInsets, getTabAreaInsets, getTabBounds, getTabBounds, getTabInsets, getTabRunCount, getTabRunIndent, getTabRunOffset, getTabRunOverlay, getTextViewForTab, getVisibleComponent, installComponents, installDefaults, installKeyboardActions, installUI, lastTabInRun, layoutLabel, navigateSelectedTab, paintContentBorderBottomEdge, paintContentBorderLeftEdge, paintContentBorderRightEdge, paintContentBorderTopEdge, paintIcon, paintTab, paintTabArea, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setRolloverTab, setVisibleComponent, shouldPadTabRun, shouldRotateTabRuns, tabForCoordinate, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LiquidTabbedPaneUI

public LiquidTabbedPaneUI()
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.

installListeners

protected void installListeners()
Overrides:
installListeners in class javax.swing.plaf.basic.BasicTabbedPaneUI

createMouseListener

protected java.awt.event.MouseListener createMouseListener()
Overrides:
createMouseListener in class javax.swing.plaf.basic.BasicTabbedPaneUI

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.

Overrides:
paintTabBackground in class javax.swing.plaf.basic.BasicTabbedPaneUI
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.

paintFocusIndicator

protected void paintFocusIndicator(java.awt.Graphics g,
                                   int tabPlacement,
                                   java.awt.Rectangle[] rects,
                                   int tabIndex,
                                   java.awt.Rectangle iconRect,
                                   java.awt.Rectangle textRect,
                                   boolean isSelected)
Overrides:
paintFocusIndicator in class javax.swing.plaf.basic.BasicTabbedPaneUI

paintContentBorder

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

Overrides:
paintContentBorder in class javax.swing.plaf.basic.BasicTabbedPaneUI
Parameters:
g - The graphics context.
tabPlacement - The placement of the tab to paint.
selectedIndex - The index of the selected tab.

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.

Overrides:
paintTabBorder in class javax.swing.plaf.basic.BasicTabbedPaneUI
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.

paintText

protected void paintText(java.awt.Graphics g,
                         int tabPlacement,
                         java.awt.Font font,
                         java.awt.FontMetrics metrics,
                         int tabIndex,
                         java.lang.String title,
                         java.awt.Rectangle textRect,
                         boolean isSelected)
Overrides:
paintText in class javax.swing.plaf.basic.BasicTabbedPaneUI

paint

public void paint(java.awt.Graphics g,
                  javax.swing.JComponent c)
Overrides:
paint in class javax.swing.plaf.basic.BasicTabbedPaneUI

update

public void update(java.awt.Graphics g,
                   javax.swing.JComponent c)
Overrides:
update in class javax.swing.plaf.ComponentUI

getTabLabelShiftX

protected int getTabLabelShiftX(int tabPlacement,
                                int tabIndex,
                                boolean isSelected)
Overrides:
getTabLabelShiftX in class javax.swing.plaf.basic.BasicTabbedPaneUI

getTabLabelShiftY

protected int getTabLabelShiftY(int tabPlacement,
                                int tabIndex,
                                boolean isSelected)
Overrides:
getTabLabelShiftY in class javax.swing.plaf.basic.BasicTabbedPaneUI

getSkinTop

public Skin getSkinTop()

getSkinLeft

public Skin getSkinLeft()

getSkinRight

public Skin getSkinRight()

getSkinBottom

public Skin getSkinBottom()

getSkinBorder

public Skin getSkinBorder()

getSkinBorderRight

public Skin getSkinBorderRight()