public class CloseTabPaneUI
extends javax.swing.plaf.basic.BasicTabbedPaneUI
CloseAndMaxTabbedPane
.
Credits to:
Modifier and Type | Class and Description |
---|---|
protected class |
CloseTabPaneUI.ScrollableTabButton |
class |
CloseTabPaneUI.TabSelectionHandler
This inner class is marked "public" due to a compiler bug.
|
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 |
protected static int |
BUTTONSIZE |
protected javax.swing.JMenuItem |
closeItem |
protected genius.gui.panels.tab.CloseTabPaneUI.MyMouseMotionListener |
motionListener |
protected genius.gui.panels.tab.CloseTabPaneUI.ScrollableTabSupport |
tabScroller |
protected 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 |
---|
CloseTabPaneUI() |
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 createFrom a layout manager object
to manage the JTabbedPane . |
protected java.awt.event.MouseListener |
createMouseListener() |
protected CloseTabPaneUI.ScrollableTabButton |
createScrollableTabButton(int direction) |
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c) |
protected void |
drawButton(java.awt.image.BufferedImage img,
int w,
int h) |
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() |
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) |
protected java.awt.Rectangle |
newCloseRect(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.BufferedImage image) |
protected void |
paintCloseIcon(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) |
void |
setCloseIcon(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 |
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, paintContentBorder, paintContentBorderBottomEdge, paintContentBorderLeftEdge, paintContentBorderRightEdge, paintContentBorderTopEdge, paintFocusIndicator, paintIcon, paintTabArea, paintTabBackground, paintTabBorder, paintText, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setRolloverTab, setVisibleComponent, shouldPadTabRun, shouldRotateTabRuns, tabForCoordinate, uninstallDefaults, uninstallUI
protected genius.gui.panels.tab.CloseTabPaneUI.ScrollableTabSupport tabScroller
protected genius.gui.panels.tab.CloseTabPaneUI.MyMouseMotionListener motionListener
protected static final int BUTTONSIZE
protected static final int WIDTHDELTA
protected javax.swing.JPopupMenu actionPopupMenu
protected javax.swing.JMenuItem closeItem
protected void drawButton(java.awt.image.BufferedImage img, int w, int h)
protected boolean isOneActionButtonEnabled()
public boolean isCloseEnabled()
public void setCloseIcon(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 CloseTabPaneUI.ScrollableTabButton createScrollableTabButton(int direction)
protected java.awt.Rectangle newCloseRect(java.awt.Rectangle rect)
protected void updateOverTab(int x, int y)
protected void updateCloseIcon(int x, int y)
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
protected java.awt.LayoutManager createLayoutManager()
installUI
to createFrom a layout manager object
to manage the JTabbedPane
.
see JTabbedPane.getTabLayoutPolicy()
createLayoutManager
in class javax.swing.plaf.basic.BasicTabbedPaneUI
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
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 paintActionButton(java.awt.Graphics g, int dx, int dy, int status, boolean isOver, javax.swing.JButton button, java.awt.image.BufferedImage 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()