public class CustomTabbedPaneUI
extends javax.swing.plaf.basic.BasicTabbedPaneUI
TabbedPaneUI
that makes any JTabbedPane
look like JDeveloper's CustomTab
.javax.swing.plaf.basic.BasicTabbedPaneUI.FocusHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.MouseHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout, javax.swing.plaf.basic.BasicTabbedPaneUI.TabSelectionHandler
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 |
---|
CustomTabbedPaneUI()
Similar to
. |
Modifier and Type | Method and Description |
---|---|
protected int |
calculateTabWidth(int tabPlacement,
int tabIndex,
java.awt.FontMetrics metrics) |
static CustomTabbedPaneUI |
createAsBottomTabForEditor(javax.swing.JTabbedPane target) |
static CustomTabbedPaneUI |
createAsTopTabForView(javax.swing.JTabbedPane target) |
protected java.awt.FontMetrics |
getFontMetrics() |
protected java.awt.Insets |
getTabAreaInsets(int tabPlacement) |
protected java.awt.Insets |
getTabInsets(int tabPlacement,
int tabIndex) |
protected int |
getTabLabelShiftY(int tabPlacement,
int tabIndex,
boolean isSelected) |
protected void |
installDefaults() |
void |
installUI(javax.swing.JComponent c) |
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) |
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 |
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 |
uninstallUI(javax.swing.JComponent c) |
assureRectsCreated, calculateMaxTabHeight, calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, calculateTabHeight, createChangeListener, createFocusListener, createLayoutManager, createMouseListener, createPropertyChangeListener, createScrollButton, createUI, expandTabRunsArray, getBaseline, getBaseline, getBaselineOffset, getBaselineResizeBehavior, getContentBorderInsets, getFocusIndex, getIconForTab, getMaximumSize, getMinimumSize, getNextTabIndex, getNextTabIndexInRun, getNextTabRun, getPreviousTabIndex, getPreviousTabIndexInRun, getPreviousTabRun, getRolloverTab, getRunForTab, getSelectedTabPadInsets, getTabBounds, getTabBounds, getTabLabelShiftX, getTabRunCount, getTabRunIndent, getTabRunOffset, getTabRunOverlay, getTextViewForTab, getVisibleComponent, installComponents, installKeyboardActions, installListeners, lastTabInRun, navigateSelectedTab, paint, paintIcon, paintTab, paintTabArea, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setRolloverTab, setVisibleComponent, shouldPadTabRun, shouldRotateTabRuns, tabForCoordinate, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners
public CustomTabbedPaneUI()
createAsTopTabForView(javax.swing.JTabbedPane)
.public static CustomTabbedPaneUI createAsTopTabForView(javax.swing.JTabbedPane target)
public static CustomTabbedPaneUI createAsBottomTabForEditor(javax.swing.JTabbedPane target)
public void installUI(javax.swing.JComponent c)
installUI
in class javax.swing.plaf.basic.BasicTabbedPaneUI
public void uninstallUI(javax.swing.JComponent c)
uninstallUI
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 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 java.awt.FontMetrics getFontMetrics()
getFontMetrics
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 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
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 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 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 int calculateTabWidth(int tabPlacement, int tabIndex, java.awt.FontMetrics metrics)
calculateTabWidth
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected java.awt.Insets getTabInsets(int tabPlacement, int tabIndex)
getTabInsets
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void installDefaults()
installDefaults
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 int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)
getTabLabelShiftY
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected java.awt.Insets getTabAreaInsets(int tabPlacement)
getTabAreaInsets
in class javax.swing.plaf.basic.BasicTabbedPaneUI