Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.util.swing.plaf
Class SIPCommTabbedPaneEnhancedUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.TabbedPaneUI
          extended by javax.swing.plaf.basic.BasicTabbedPaneUI
              extended by net.java.sip.communicator.util.swing.plaf.SIPCommTabbedPaneUI
                  extended by net.java.sip.communicator.util.swing.plaf.SIPCommTabbedPaneEnhancedUI
All Implemented Interfaces:
SwingConstants, Skinnable

public class SIPCommTabbedPaneEnhancedUI
extends SIPCommTabbedPaneUI
implements Skinnable

This UI displays a different interface, which is independent from the look and feel.

Author:
David Bismut, davidou@mageos.com, Yana Stamcheva, Adam Netocny

Nested Class Summary
protected  class SIPCommTabbedPaneEnhancedUI.ScrollableTabButton
           
 
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI
BasicTabbedPaneUI.FocusHandler, BasicTabbedPaneUI.MouseHandler, BasicTabbedPaneUI.PropertyChangeHandler, BasicTabbedPaneUI.TabbedPaneLayout
 
Field Summary
protected  List<Integer> highlightedTabs
           
 
Fields inherited from class net.java.sip.communicator.util.swing.plaf.SIPCommTabbedPaneUI
actionPopupMenu, BUTTONSIZE, closeItem, maxItem, motionListener, tabScroller, WIDTHDELTA
 
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
SIPCommTabbedPaneEnhancedUI()
           
 
Method Summary
protected  int calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics)
           
protected  SIPCommTabbedPaneUI.ScrollableTabButton createScrollableTabButton(int direction)
           
static ComponentUI createUI(JComponent c)
           
 boolean isTabHighlighted(int tabIndex)
           
 void loadSkin()
          Reloads color info.
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 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)
          Overriden to paint nothing.
protected  void paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
           
 void tabAddHightlight(int tabIndex)
           
 void tabRemoveHighlight(int tabIndex)
           
 
Methods inherited from class net.java.sip.communicator.util.swing.plaf.SIPCommTabbedPaneUI
calculateTabHeight, createChangeListener, createLayoutManager, createMouseListener, createMyActionMap, getMyInputMap, getOverTabIndex, getTabBounds, installComponents, installKeyboardActions, installListeners, isCloseEnabled, isMaxEnabled, isOneActionButtonEnabled, layoutLabel, newCloseRect, newMaxRect, paint, paintActionButton, paintCloseIcon, paintContentBorder, paintMaxIcon, paintTab, requestMyFocusForVisibleComponent, setCloseIcon, setMaxIcon, uninstallComponents, uninstallKeyboardActions, uninstallListeners, updateCloseIcon, updateMaxIcon, updateOverTab
 
Methods inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI
assureRectsCreated, calculateMaxTabHeight, calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, createFocusListener, createPropertyChangeListener, createScrollButton, expandTabRunsArray, getBaseline, getBaseline, getBaselineOffset, getBaselineResizeBehavior, getContentBorderInsets, getFocusIndex, getFontMetrics, getIconForTab, getMaximumSize, getMinimumSize, getNextTabIndex, getNextTabIndexInRun, getNextTabRun, getPreviousTabIndex, getPreviousTabIndexInRun, getPreviousTabRun, getRolloverTab, getRunForTab, getSelectedTabPadInsets, getTabAreaInsets, getTabBounds, getTabInsets, getTabLabelShiftX, getTabLabelShiftY, getTabRunCount, getTabRunIndent, getTabRunOffset, getTabRunOverlay, getTextViewForTab, getVisibleComponent, installDefaults, installUI, lastTabInRun, navigateSelectedTab, paintIcon, paintTabArea, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setRolloverTab, setVisibleComponent, shouldPadTabRun, shouldRotateTabRuns, tabForCoordinate, uninstallDefaults, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSize, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

highlightedTabs

protected final List<Integer> highlightedTabs
Constructor Detail

SIPCommTabbedPaneEnhancedUI

public SIPCommTabbedPaneEnhancedUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

paintFocusIndicator

protected void paintFocusIndicator(Graphics g,
                                   int tabPlacement,
                                   Rectangle[] rects,
                                   int tabIndex,
                                   Rectangle iconRect,
                                   Rectangle textRect,
                                   boolean isSelected)
Overrides:
paintFocusIndicator in class BasicTabbedPaneUI

paintTabBorder

protected void paintTabBorder(Graphics g,
                              int tabPlacement,
                              int tabIndex,
                              int x,
                              int y,
                              int w,
                              int h,
                              boolean isSelected)
Overriden to paint nothing.

Overrides:
paintTabBorder in class BasicTabbedPaneUI

paintContentBorderTopEdge

protected void paintContentBorderTopEdge(Graphics g,
                                         int tabPlacement,
                                         int selectedIndex,
                                         int x,
                                         int y,
                                         int w,
                                         int h)
Overrides:
paintContentBorderTopEdge in class BasicTabbedPaneUI

paintContentBorderLeftEdge

protected void paintContentBorderLeftEdge(Graphics g,
                                          int tabPlacement,
                                          int selectedIndex,
                                          int x,
                                          int y,
                                          int w,
                                          int h)
Overrides:
paintContentBorderLeftEdge in class BasicTabbedPaneUI

paintContentBorderBottomEdge

protected void paintContentBorderBottomEdge(Graphics g,
                                            int tabPlacement,
                                            int selectedIndex,
                                            int x,
                                            int y,
                                            int w,
                                            int h)
Overrides:
paintContentBorderBottomEdge in class BasicTabbedPaneUI

paintContentBorderRightEdge

protected void paintContentBorderRightEdge(Graphics g,
                                           int tabPlacement,
                                           int selectedIndex,
                                           int x,
                                           int y,
                                           int w,
                                           int h)
Overrides:
paintContentBorderRightEdge in class BasicTabbedPaneUI

paintTabBackground

protected void paintTabBackground(Graphics g,
                                  int tabPlacement,
                                  int tabIndex,
                                  int x,
                                  int y,
                                  int w,
                                  int h,
                                  boolean isSelected)
Overrides:
paintTabBackground in class BasicTabbedPaneUI

paintText

protected void paintText(Graphics g,
                         int tabPlacement,
                         Font font,
                         FontMetrics metrics,
                         int tabIndex,
                         String title,
                         Rectangle textRect,
                         boolean isSelected)
Overrides:
paintText in class BasicTabbedPaneUI

createScrollableTabButton

protected SIPCommTabbedPaneUI.ScrollableTabButton createScrollableTabButton(int direction)
Overrides:
createScrollableTabButton in class SIPCommTabbedPaneUI

calculateTabWidth

protected int calculateTabWidth(int tabPlacement,
                                int tabIndex,
                                FontMetrics metrics)
Overrides:
calculateTabWidth in class SIPCommTabbedPaneUI

tabAddHightlight

public void tabAddHightlight(int tabIndex)

tabRemoveHighlight

public void tabRemoveHighlight(int tabIndex)

isTabHighlighted

public boolean isTabHighlighted(int tabIndex)

loadSkin

public void loadSkin()
Reloads color info.

Specified by:
loadSkin in interface Skinnable
Overrides:
loadSkin in class SIPCommTabbedPaneUI

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.