|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.TabbedPaneUI
javax.swing.plaf.basic.BasicTabbedPaneUI
org.jvnet.substance.SubstanceTabbedPaneUI
public class SubstanceTabbedPaneUI
UI for tabbed panes in Substance look and feel.
Nested Class Summary | |
---|---|
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. |
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.TabSelectionHandler |
Field Summary | |
---|---|
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. |
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 | |
---|---|
SubstanceTabbedPaneUI()
Creates the new UI delegate. |
Method Summary | |
---|---|
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. |
org.jvnet.lafwidget.animation.FadeTrackerCallback |
getCallback(int tabIndex)
Returns the repaint callback for the specified tab index. |
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 ComponentState |
getPrevTabState(int tabIndex)
Returns the previous state for the specified tab. |
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()
|
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()
|
Methods inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI |
---|
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, paint, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setRolloverTab, setVisibleComponent, shouldRotateTabRuns, tabForCoordinate, uninstallComponents, uninstallKeyboardActions, 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 |
---|
protected java.awt.Point substanceMouseLocation
protected SubstanceTabbedPaneUI.MouseRolloverHandler substanceRolloverHandler
protected SubstanceTabbedPaneUI.TabbedContainerListener substanceContainerListener
SubstanceLookAndFeel.WINDOW_MODIFIED
property.
protected javax.swing.event.ChangeListener substanceSelectionListener
Constructor Detail |
---|
public SubstanceTabbedPaneUI()
Method Detail |
---|
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent comp)
protected void installListeners()
installListeners
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void uninstallListeners()
uninstallListeners
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void installDefaults()
installDefaults
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void uninstallDefaults()
uninstallDefaults
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected 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.BasicTabbedPaneUI
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)
paintFocusIndicator
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected 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.BasicTabbedPaneUI
protected javax.swing.JButton createScrollButton(int direction)
createScrollButton
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 int calculateTabWidth(int tabPlacement, int tabIndex, java.awt.FontMetrics metrics)
calculateTabWidth
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected int calculateMaxTabHeight(int tabPlacement)
calculateMaxTabHeight
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected int getTabRunOverlay(int tabPlacement)
getTabRunOverlay
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 paintTabArea(java.awt.Graphics g, int tabPlacement, int selectedIndex)
paintTabArea
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected 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()
public org.jvnet.lafwidget.animation.FadeTrackerCallback getCallback(int tabIndex)
tabIndex
- Tab index.
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.BasicTabbedPaneUI
protected int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)
getTabLabelShiftY
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected 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.BasicTabbedPaneUI
protected java.awt.LayoutManager createLayoutManager()
createLayoutManager
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected java.awt.Insets getContentBorderInsets(int tabPlacement)
getContentBorderInsets
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void paintContentBorder(java.awt.Graphics g, int tabPlacement, int selectedIndex)
paintContentBorder
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected 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.BasicTabbedPaneUI
protected 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.BasicTabbedPaneUI
protected 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.BasicTabbedPaneUI
protected 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.BasicTabbedPaneUI
public java.awt.Rectangle getTabBounds(javax.swing.JTabbedPane pane, int i)
getTabBounds
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected ComponentState getPrevTabState(int tabIndex)
tabIndex
- Tab index.
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.BasicTabbedPaneUI
protected 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.BasicTabbedPaneUI
protected java.awt.event.MouseListener createMouseListener()
createMouseListener
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected boolean toRotateTabsOnPlacement(int tabPlacement)
tabPlacement
- Tab placement.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |