public class SIPCommTabbedPaneUI extends javax.swing.plaf.basic.BasicTabbedPaneUI implements Skinnable
Modifier and Type | Class and Description |
---|---|
protected static class |
SIPCommTabbedPaneUI.ScrollableTabButton |
protected class |
SIPCommTabbedPaneUI.ScrollableTabSupport |
protected static class |
SIPCommTabbedPaneUI.ScrollableTabViewport |
javax.swing.plaf.basic.BasicTabbedPaneUI.FocusHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.MouseHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout
Modifier and Type | Field and Description |
---|---|
protected javax.swing.JPopupMenu |
actionPopupMenu |
static int |
BUTTONSIZE |
protected javax.swing.JMenuItem |
closeItem |
protected javax.swing.JMenuItem |
maxItem |
protected net.java.sip.communicator.plugin.desktoputil.plaf.SIPCommTabbedPaneUI.MyMouseMotionListener |
motionListener |
protected SIPCommTabbedPaneUI.ScrollableTabSupport |
tabScroller |
static int |
WIDTHDELTA |
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
Constructor and Description |
---|
SIPCommTabbedPaneUI() |
Modifier and Type | Method and Description |
---|---|
protected int |
calculateTabHeight(int tabPlacement,
int tabIndex,
int fontHeight) |
protected int |
calculateTabWidth(int tabPlacement,
int tabIndex,
java.awt.FontMetrics metrics) |
protected javax.swing.event.ChangeListener |
createChangeListener() |
protected java.awt.LayoutManager |
createLayoutManager()
Invoked by
installUI to create a layout manager object to
manage the JTabbedPane . |
protected java.awt.event.MouseListener |
createMouseListener() |
(package private) javax.swing.ActionMap |
createMyActionMap() |
protected SIPCommTabbedPaneUI.ScrollableTabButton |
createScrollableTabButton(int direction) |
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c) |
protected int |
getClosestTab(int x,
int y)
Returns the index of the tab closest to the passed in location, note that
the returned tab may not contain the location x,y.
|
(package private) javax.swing.InputMap |
getMyInputMap(int condition) |
int |
getOverTabIndex() |
protected java.awt.Rectangle |
getTabBounds(int tabIndex,
java.awt.Rectangle dest)
Returns the bounds of the specified tab in the coordinate space of the
JTabbedPane component.
|
protected void |
installComponents()
Creates and installs any required subcomponents for the JTabbedPane.
|
protected void |
installKeyboardActions() |
protected void |
installListeners() |
boolean |
isCloseEnabled() |
boolean |
isMaxEnabled() |
protected boolean |
isOneActionButtonEnabled() |
protected void |
layoutLabel(int tabPlacement,
java.awt.FontMetrics metrics,
int tabIndex,
java.lang.String title,
javax.swing.Icon icon,
java.awt.Rectangle tabRect,
java.awt.Rectangle iconRect,
java.awt.Rectangle textRect,
boolean isSelected) |
void |
loadSkin()
Reloads close icon.
|
protected java.awt.Rectangle |
newCloseRect(java.awt.Rectangle rect) |
protected java.awt.Rectangle |
newMaxRect(java.awt.Rectangle rect) |
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c) |
protected void |
paintActionButton(java.awt.Graphics g,
int dx,
int dy,
int status,
boolean isOver,
javax.swing.JButton button,
java.awt.Image image) |
protected void |
paintCloseIcon(java.awt.Graphics g,
int dx,
int dy,
boolean isOver) |
protected void |
paintContentBorder(java.awt.Graphics g,
int tabPlacement,
int selectedIndex)
We don't want to have a content border.
|
protected void |
paintMaxIcon(java.awt.Graphics g,
int dx,
int dy,
boolean isOver) |
protected void |
paintTab(java.awt.Graphics g,
int tabPlacement,
java.awt.Rectangle[] rects,
int tabIndex,
java.awt.Rectangle iconRect,
java.awt.Rectangle textRect) |
(package private) boolean |
requestMyFocusForVisibleComponent() |
void |
setCloseIcon(boolean b) |
void |
setMaxIcon(boolean b) |
protected void |
uninstallComponents()
Removes any installed subcomponents from the JTabbedPane.
|
protected void |
uninstallKeyboardActions() |
protected void |
uninstallListeners() |
protected void |
updateCloseIcon(int x,
int y) |
protected void |
updateMaxIcon(int x,
int y) |
protected void |
updateOverTab(int x,
int y) |
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, paintContentBorderBottomEdge, paintContentBorderLeftEdge, paintContentBorderRightEdge, paintContentBorderTopEdge, paintFocusIndicator, paintIcon, paintTabArea, paintTabBackground, paintTabBorder, paintText, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setRolloverTab, setVisibleComponent, shouldPadTabRun, shouldRotateTabRuns, tabForCoordinate, uninstallDefaults, uninstallUI
protected SIPCommTabbedPaneUI.ScrollableTabSupport tabScroller
protected net.java.sip.communicator.plugin.desktoputil.plaf.SIPCommTabbedPaneUI.MyMouseMotionListener motionListener
public static final int BUTTONSIZE
public static final int WIDTHDELTA
protected javax.swing.JPopupMenu actionPopupMenu
protected javax.swing.JMenuItem maxItem
protected javax.swing.JMenuItem closeItem
protected boolean isOneActionButtonEnabled()
public boolean isCloseEnabled()
public boolean isMaxEnabled()
public void setCloseIcon(boolean b)
public void setMaxIcon(boolean b)
protected int calculateTabWidth(int tabPlacement, int tabIndex, java.awt.FontMetrics metrics)
calculateTabWidth
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight)
calculateTabHeight
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void layoutLabel(int tabPlacement, java.awt.FontMetrics metrics, int tabIndex, java.lang.String title, javax.swing.Icon icon, java.awt.Rectangle tabRect, java.awt.Rectangle iconRect, java.awt.Rectangle textRect, boolean isSelected)
layoutLabel
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected java.awt.event.MouseListener createMouseListener()
createMouseListener
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected SIPCommTabbedPaneUI.ScrollableTabButton createScrollableTabButton(int direction)
protected java.awt.Rectangle newCloseRect(java.awt.Rectangle rect)
protected java.awt.Rectangle newMaxRect(java.awt.Rectangle rect)
protected void updateOverTab(int x, int y)
protected void updateCloseIcon(int x, int y)
protected void updateMaxIcon(int x, int y)
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
protected java.awt.LayoutManager createLayoutManager()
installUI
to create a layout manager object to
manage the JTabbedPane
.createLayoutManager
in class javax.swing.plaf.basic.BasicTabbedPaneUI
JTabbedPane.getTabLayoutPolicy()
protected void installComponents()
installComponents
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void uninstallComponents()
uninstallComponents
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void installListeners()
installListeners
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void uninstallListeners()
uninstallListeners
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected javax.swing.event.ChangeListener createChangeListener()
createChangeListener
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void installKeyboardActions()
installKeyboardActions
in class javax.swing.plaf.basic.BasicTabbedPaneUI
javax.swing.InputMap getMyInputMap(int condition)
javax.swing.ActionMap createMyActionMap()
protected void uninstallKeyboardActions()
uninstallKeyboardActions
in class javax.swing.plaf.basic.BasicTabbedPaneUI
public void paint(java.awt.Graphics g, javax.swing.JComponent c)
paint
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void paintTab(java.awt.Graphics g, int tabPlacement, java.awt.Rectangle[] rects, int tabIndex, java.awt.Rectangle iconRect, java.awt.Rectangle textRect)
paintTab
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void paintCloseIcon(java.awt.Graphics g, int dx, int dy, boolean isOver)
protected void paintMaxIcon(java.awt.Graphics g, int dx, int dy, boolean isOver)
protected void paintActionButton(java.awt.Graphics g, int dx, int dy, int status, boolean isOver, javax.swing.JButton button, java.awt.Image image)
protected java.awt.Rectangle getTabBounds(int tabIndex, java.awt.Rectangle dest)
Rectangle
instance. The handling of invalid parameters is
unspecified.getTabBounds
in class javax.swing.plaf.basic.BasicTabbedPaneUI
tabIndex
- the index of the tabdest
- the rectangle where the result should be placedpublic int getOverTabIndex()
protected int getClosestTab(int x, int y)
boolean requestMyFocusForVisibleComponent()
protected void paintContentBorder(java.awt.Graphics g, int tabPlacement, int selectedIndex)
paintContentBorder
in class javax.swing.plaf.basic.BasicTabbedPaneUI
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.