public class SubstanceTabbedPaneUI
extends javax.swing.plaf.basic.BasicTabbedPaneUI
| Modifier and Type | Class and Description |
|---|---|
protected class |
SubstanceTabbedPaneUI.MouseRolloverHandler
Listener for rollover animation effects.
|
protected class |
SubstanceTabbedPaneUI.TabbedContainerListener
Tracks changes to the tabbed pane contents.
|
class |
SubstanceTabbedPaneUI.TabbedPaneLayout
Layout for the tabbed pane.
|
protected class |
SubstanceTabbedPaneUI.TabRepaintCallback
Implementation of the fade tracker callback that repaints a single tab.
|
javax.swing.plaf.basic.BasicTabbedPaneUI.FocusHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.MouseHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.TabSelectionHandler| Modifier and Type | Field and Description |
|---|---|
protected SubstanceTabbedPaneUI.TabbedContainerListener |
substanceContainerListener
Tracks changes to the tabbed pane contents.
|
protected java.awt.Point |
substanceMouseLocation
Current mouse location.
|
protected SubstanceTabbedPaneUI.MouseRolloverHandler |
substanceRolloverHandler
Mouse handler for rollover effects.
|
protected javax.swing.event.ChangeListener |
substanceSelectionListener
Listener for animation effects on tab selection.
|
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 |
|---|
SubstanceTabbedPaneUI()
Creates the new UI delegate.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
calculateMaxTabHeight(int tabPlacement) |
protected int |
calculateTabHeight(int tabPlacement,
int tabIndex,
int fontHeight) |
protected int |
calculateTabWidth(int tabPlacement,
int tabIndex,
java.awt.FontMetrics metrics) |
protected java.awt.LayoutManager |
createLayoutManager() |
protected java.awt.event.MouseListener |
createMouseListener() |
protected javax.swing.JButton |
createScrollButton(int direction) |
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent comp) |
protected void |
ensureCurrentLayout()
Ensures the current layout.
|
protected java.awt.Rectangle |
getCloseButtonRectangleForDraw(int tabIndex,
int x,
int y,
int width,
int height)
Retrieves the close button rectangle for drawing purposes.
|
protected java.awt.Rectangle |
getCloseButtonRectangleForEvents(int tabIndex,
int x,
int y,
int w,
int h)
Retrieves the close button rectangle for event handling.
|
protected java.awt.Insets |
getContentBorderInsets(int tabPlacement) |
static java.lang.String |
getMemoryUsage()
Returns the memory usage string.
|
protected StateTransitionTracker.ModelStateInfo |
getModelStateInfo(int tabIndex) |
int |
getRolloverTabIndex()
Returns the index of the tab currently being rolled-over.
|
java.awt.Insets |
getTabAreaInsets()
Returns tab area insets.
|
java.awt.Rectangle |
getTabBounds(javax.swing.JTabbedPane pane,
int i) |
protected int |
getTabExtraWidth(int tabPlacement,
int tabIndex)
Returns extra width for the specified tab.
|
protected int |
getTabLabelShiftX(int tabPlacement,
int tabIndex,
boolean isSelected) |
protected int |
getTabLabelShiftY(int tabPlacement,
int tabIndex,
boolean isSelected) |
java.awt.Rectangle |
getTabRectangle(int tabIndex)
Returns the tab rectangle for the specified tab.
|
protected int |
getTabRunOverlay(int tabPlacement) |
protected ComponentState |
getTabState(int tabIndex)
Returns the current state for the specified tab.
|
protected void |
installDefaults() |
protected void |
installListeners() |
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c) |
protected void |
paintContentBorder(java.awt.Graphics g,
int tabPlacement,
int selectedIndex) |
protected void |
paintContentBorderBottomEdge(java.awt.Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h) |
protected void |
paintContentBorderLeftEdge(java.awt.Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h) |
protected void |
paintContentBorderRightEdge(java.awt.Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h) |
protected void |
paintContentBorderTopEdge(java.awt.Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h) |
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 |
paintIcon(java.awt.Graphics g,
int tabPlacement,
int tabIndex,
javax.swing.Icon icon,
java.awt.Rectangle iconRect,
boolean isSelected) |
protected void |
paintTab(java.awt.Graphics g,
int tabPlacement,
java.awt.Rectangle[] rects,
int tabIndex,
java.awt.Rectangle iconRect,
java.awt.Rectangle textRect) |
protected void |
paintTabArea(java.awt.Graphics g,
int tabPlacement,
int selectedIndex) |
protected void |
paintTabBackground(java.awt.Graphics g,
int tabPlacement,
int tabIndex,
int x,
int y,
int w,
int h,
boolean isSelected) |
protected void |
paintTabBorder(java.awt.Graphics g,
int tabPlacement,
int tabIndex,
int x,
int y,
int w,
int h,
boolean isSelected) |
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 |
setTabAreaInsets(java.awt.Insets insets)
Sets new value for tab area insets.
|
protected boolean |
shouldPadTabRun(int tabPlacement,
int run) |
protected boolean |
toRotateTabsOnPlacement(int tabPlacement)
Extension point to allow horizontal orientation of left / right placed
tabs.
|
protected void |
tryCloseTab(int tabIndex)
Tries closing a single tab.
|
protected void |
tryCloseTabs(int tabIndex,
SubstanceConstants.TabCloseKind tabCloseKind)
Tries closing tabs based on the specified tab index and tab close kind.
|
protected void |
tryCloseTabs(java.util.Set<java.lang.Integer> tabIndexes)
Tries closing the specified tabs.
|
protected void |
uninstallDefaults() |
protected void |
uninstallListeners() |
assureRectsCreated, calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, createChangeListener, createFocusListener, createPropertyChangeListener, expandTabRunsArray, getBaseline, getBaseline, getBaselineOffset, getBaselineResizeBehavior, getFocusIndex, getFontMetrics, getIconForTab, getMaximumSize, getMinimumSize, getNextTabIndex, getNextTabIndexInRun, getNextTabRun, getPreviousTabIndex, getPreviousTabIndexInRun, getPreviousTabRun, getRolloverTab, getRunForTab, getSelectedTabPadInsets, getTabAreaInsets, getTabBounds, getTabInsets, getTabRunCount, getTabRunIndent, getTabRunOffset, getTextViewForTab, getVisibleComponent, installComponents, installKeyboardActions, installUI, lastTabInRun, layoutLabel, navigateSelectedTab, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setRolloverTab, setVisibleComponent, shouldRotateTabRuns, tabForCoordinate, uninstallComponents, uninstallKeyboardActions, uninstallUIprotected java.awt.Point substanceMouseLocation
protected SubstanceTabbedPaneUI.MouseRolloverHandler substanceRolloverHandler
protected SubstanceTabbedPaneUI.TabbedContainerListener substanceContainerListener
SubstanceLookAndFeel.WINDOW_MODIFIED property.protected javax.swing.event.ChangeListener substanceSelectionListener
public SubstanceTabbedPaneUI()
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent comp)
protected void installListeners()
installListeners in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected void uninstallListeners()
uninstallListeners in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected void installDefaults()
installDefaults in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected void uninstallDefaults()
uninstallDefaults in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected void paintTabBackground(java.awt.Graphics g,
int tabPlacement,
int tabIndex,
int x,
int y,
int w,
int h,
boolean isSelected)
paintTabBackground in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected void paintFocusIndicator(java.awt.Graphics g,
int tabPlacement,
java.awt.Rectangle[] rects,
int tabIndex,
java.awt.Rectangle iconRect,
java.awt.Rectangle textRect,
boolean isSelected)
paintFocusIndicator in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected void paintTabBorder(java.awt.Graphics g,
int tabPlacement,
int tabIndex,
int x,
int y,
int w,
int h,
boolean isSelected)
paintTabBorder in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected javax.swing.JButton createScrollButton(int direction)
createScrollButton in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected int calculateTabHeight(int tabPlacement,
int tabIndex,
int fontHeight)
calculateTabHeight in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected int calculateTabWidth(int tabPlacement,
int tabIndex,
java.awt.FontMetrics metrics)
calculateTabWidth in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected int calculateMaxTabHeight(int tabPlacement)
calculateMaxTabHeight in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected int getTabRunOverlay(int tabPlacement)
getTabRunOverlay in class javax.swing.plaf.basic.BasicTabbedPaneUIpublic void paint(java.awt.Graphics g,
javax.swing.JComponent c)
paint in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected 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.BasicTabbedPaneUIprotected void paintTabArea(java.awt.Graphics g,
int tabPlacement,
int selectedIndex)
paintTabArea in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected java.awt.Rectangle getCloseButtonRectangleForDraw(int tabIndex,
int x,
int y,
int width,
int height)
tabIndex - Tab index.x - X coordinate of the tab.y - Y coordinate of the tab.width - The tab width.height - The tab height.protected java.awt.Rectangle getCloseButtonRectangleForEvents(int tabIndex,
int x,
int y,
int w,
int h)
tabIndex - Tab index.x - X coordinate of the tab.y - Y coordinate of the tab.w - The tab width.h - The tab height.protected void ensureCurrentLayout()
protected void tryCloseTabs(int tabIndex,
SubstanceConstants.TabCloseKind tabCloseKind)
tabIndex - Tab index.tabCloseKind - Tab close kind.protected void tryCloseTab(int tabIndex)
tabIndex - Tab index.protected void tryCloseTabs(java.util.Set<java.lang.Integer> tabIndexes)
tabIndexes - Tab indexes.protected int getTabLabelShiftX(int tabPlacement,
int tabIndex,
boolean isSelected)
getTabLabelShiftX in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected int getTabLabelShiftY(int tabPlacement,
int tabIndex,
boolean isSelected)
getTabLabelShiftY in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected int getTabExtraWidth(int tabPlacement,
int tabIndex)
tabPlacement - Tab placement.tabIndex - Tab index.public int getRolloverTabIndex()
public void setTabAreaInsets(java.awt.Insets insets)
insets - Tab area insets.public java.awt.Insets getTabAreaInsets()
public java.awt.Rectangle getTabRectangle(int tabIndex)
tabIndex - Index of a tab.public static java.lang.String getMemoryUsage()
protected boolean shouldPadTabRun(int tabPlacement,
int run)
shouldPadTabRun in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected java.awt.LayoutManager createLayoutManager()
createLayoutManager in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected java.awt.Insets getContentBorderInsets(int tabPlacement)
getContentBorderInsets in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected void paintContentBorder(java.awt.Graphics g,
int tabPlacement,
int selectedIndex)
paintContentBorder in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected void paintContentBorderBottomEdge(java.awt.Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
paintContentBorderBottomEdge in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected void paintContentBorderLeftEdge(java.awt.Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
paintContentBorderLeftEdge in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected void paintContentBorderRightEdge(java.awt.Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
paintContentBorderRightEdge in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected void paintContentBorderTopEdge(java.awt.Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
paintContentBorderTopEdge in class javax.swing.plaf.basic.BasicTabbedPaneUIpublic java.awt.Rectangle getTabBounds(javax.swing.JTabbedPane pane,
int i)
getTabBounds in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected StateTransitionTracker.ModelStateInfo getModelStateInfo(int tabIndex)
protected ComponentState getTabState(int tabIndex)
tabIndex - Tab index.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)
paintText in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected void paintIcon(java.awt.Graphics g,
int tabPlacement,
int tabIndex,
javax.swing.Icon icon,
java.awt.Rectangle iconRect,
boolean isSelected)
paintIcon in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected java.awt.event.MouseListener createMouseListener()
createMouseListener in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected boolean toRotateTabsOnPlacement(int tabPlacement)
tabPlacement - Tab placement.