SwingConstantspublic class SubstanceTabbedPaneUI extends BasicTabbedPaneUI
| Modifier and Type | Class | 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.
|
BasicTabbedPaneUI.FocusHandler, BasicTabbedPaneUI.MouseHandler, BasicTabbedPaneUI.PropertyChangeHandler, BasicTabbedPaneUI.TabSelectionHandler| Modifier and Type | Field | Description |
|---|---|---|
protected SubstanceTabbedPaneUI.TabbedContainerListener |
substanceContainerListener |
Tracks changes to the tabbed pane contents.
|
protected Point |
substanceMouseLocation |
Current mouse location.
|
protected SubstanceTabbedPaneUI.MouseRolloverHandler |
substanceRolloverHandler |
Mouse handler for rollover effects.
|
protected 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, upKeyBOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST| Constructor | Description |
|---|---|
SubstanceTabbedPaneUI() |
Creates the new UI delegate.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected int |
calculateMaxTabHeight(int tabPlacement) |
|
protected int |
calculateTabHeight(int tabPlacement,
int tabIndex,
int fontHeight) |
|
protected int |
calculateTabWidth(int tabPlacement,
int tabIndex,
FontMetrics metrics) |
|
protected LayoutManager |
createLayoutManager() |
|
protected MouseListener |
createMouseListener() |
|
protected JButton |
createScrollButton(int direction) |
|
static ComponentUI |
createUI(JComponent comp) |
|
protected void |
ensureCurrentLayout() |
Ensures the current layout.
|
protected Rectangle |
getCloseButtonRectangleForDraw(int tabIndex,
int x,
int y,
int width,
int height) |
Retrieves the close button rectangle for drawing purposes.
|
protected Rectangle |
getCloseButtonRectangleForEvents(int tabIndex,
int x,
int y,
int w,
int h) |
Retrieves the close button rectangle for event handling.
|
protected Insets |
getContentBorderInsets(int tabPlacement) |
|
static 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.
|
Insets |
getTabAreaInsets() |
Returns tab area insets.
|
Rectangle |
getTabBounds(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) |
|
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(Graphics g,
JComponent c) |
|
protected void |
paintContentBorder(Graphics g,
int tabPlacement,
int selectedIndex) |
|
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 |
paintIcon(Graphics g,
int tabPlacement,
int tabIndex,
Icon icon,
Rectangle iconRect,
boolean isSelected) |
|
protected void |
paintTab(Graphics g,
int tabPlacement,
Rectangle[] rects,
int tabIndex,
Rectangle iconRect,
Rectangle textRect) |
|
protected void |
paintTabArea(Graphics g,
int tabPlacement,
int selectedIndex) |
|
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) |
|
protected void |
paintText(Graphics g,
int tabPlacement,
Font font,
FontMetrics metrics,
int tabIndex,
String title,
Rectangle textRect,
boolean isSelected) |
|
void |
setTabAreaInsets(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(Set<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, uninstallUIcontains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSize, updateprotected Point substanceMouseLocation
protected SubstanceTabbedPaneUI.MouseRolloverHandler substanceRolloverHandler
protected SubstanceTabbedPaneUI.TabbedContainerListener substanceContainerListener
SubstanceLookAndFeel.WINDOW_MODIFIED property.protected ChangeListener substanceSelectionListener
public SubstanceTabbedPaneUI()
public static ComponentUI createUI(JComponent comp)
protected void installListeners()
installListeners in class BasicTabbedPaneUIprotected void uninstallListeners()
uninstallListeners in class BasicTabbedPaneUIprotected void installDefaults()
installDefaults in class BasicTabbedPaneUIprotected void uninstallDefaults()
uninstallDefaults in class BasicTabbedPaneUIprotected void paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
paintTabBackground in class BasicTabbedPaneUIprotected void paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
paintFocusIndicator in class BasicTabbedPaneUIprotected void paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
paintTabBorder in class BasicTabbedPaneUIprotected JButton createScrollButton(int direction)
createScrollButton in class BasicTabbedPaneUIprotected int calculateTabHeight(int tabPlacement,
int tabIndex,
int fontHeight)
calculateTabHeight in class BasicTabbedPaneUIprotected int calculateTabWidth(int tabPlacement,
int tabIndex,
FontMetrics metrics)
calculateTabWidth in class BasicTabbedPaneUIprotected int calculateMaxTabHeight(int tabPlacement)
calculateMaxTabHeight in class BasicTabbedPaneUIprotected int getTabRunOverlay(int tabPlacement)
getTabRunOverlay in class BasicTabbedPaneUIpublic void paint(Graphics g, JComponent c)
paint in class BasicTabbedPaneUIprotected void paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect)
paintTab in class BasicTabbedPaneUIprotected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex)
paintTabArea in class BasicTabbedPaneUIprotected 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 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(Set<Integer> tabIndexes)
tabIndexes - Tab indexes.protected int getTabLabelShiftX(int tabPlacement,
int tabIndex,
boolean isSelected)
getTabLabelShiftX in class BasicTabbedPaneUIprotected int getTabLabelShiftY(int tabPlacement,
int tabIndex,
boolean isSelected)
getTabLabelShiftY in class BasicTabbedPaneUIprotected int getTabExtraWidth(int tabPlacement,
int tabIndex)
tabPlacement - Tab placement.tabIndex - Tab index.public int getRolloverTabIndex()
public void setTabAreaInsets(Insets insets)
insets - Tab area insets.public Insets getTabAreaInsets()
public Rectangle getTabRectangle(int tabIndex)
tabIndex - Index of a tab.public static String getMemoryUsage()
protected boolean shouldPadTabRun(int tabPlacement,
int run)
shouldPadTabRun in class BasicTabbedPaneUIprotected LayoutManager createLayoutManager()
createLayoutManager in class BasicTabbedPaneUIprotected Insets getContentBorderInsets(int tabPlacement)
getContentBorderInsets in class BasicTabbedPaneUIprotected void paintContentBorder(Graphics g, int tabPlacement, int selectedIndex)
paintContentBorder in class BasicTabbedPaneUIprotected void paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
paintContentBorderBottomEdge in class BasicTabbedPaneUIprotected void paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
paintContentBorderLeftEdge in class BasicTabbedPaneUIprotected void paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
paintContentBorderRightEdge in class BasicTabbedPaneUIprotected void paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
paintContentBorderTopEdge in class BasicTabbedPaneUIpublic Rectangle getTabBounds(JTabbedPane pane, int i)
getTabBounds in class BasicTabbedPaneUIprotected StateTransitionTracker.ModelStateInfo getModelStateInfo(int tabIndex)
protected ComponentState getTabState(int tabIndex)
tabIndex - Tab index.protected void paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
paintText in class BasicTabbedPaneUIprotected void paintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected)
paintIcon in class BasicTabbedPaneUIprotected MouseListener createMouseListener()
createMouseListener in class BasicTabbedPaneUIprotected boolean toRotateTabsOnPlacement(int tabPlacement)
tabPlacement - Tab placement.