public class CloseTabPaneUI extends BasicTabbedPaneUI
CloseAndMaxTabbedPane
.Modifier and Type | Class and Description |
---|---|
protected class |
CloseTabPaneUI.MyMouseMotionListener |
protected class |
CloseTabPaneUI.ScrollableTabButton |
protected class |
CloseTabPaneUI.ScrollableTabPanel |
protected class |
CloseTabPaneUI.ScrollableTabSupport |
protected static class |
CloseTabPaneUI.ScrollableTabViewport |
class |
CloseTabPaneUI.TabSelectionHandler
This inner class is marked "public" due to a compiler bug.
|
BasicTabbedPaneUI.FocusHandler, BasicTabbedPaneUI.MouseHandler, BasicTabbedPaneUI.PropertyChangeHandler, BasicTabbedPaneUI.TabbedPaneLayout
Modifier and Type | Field and Description |
---|---|
protected JPopupMenu |
actionPopupMenu |
protected static int |
BUTTONSIZE |
protected JMenuItem |
closeItem |
protected JMenuItem |
maxItem |
protected CloseTabPaneUI.MyMouseMotionListener |
motionListener |
protected 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
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
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,
FontMetrics metrics) |
protected ChangeListener |
createChangeListener() |
protected LayoutManager |
createLayoutManager()
Invoked by
installUI to create a layout manager object to
manage the JTabbedPane . |
protected MouseListener |
createMouseListener() |
protected CloseTabPaneUI.ScrollableTabButton |
createScrollableTabButton(int direction) |
static ComponentUI |
createUI(JComponent c) |
protected Insets |
getContentBorderInsets(int tabPlacement) |
int |
getOverTabIndex() |
protected String |
getShortTitle(String title) |
protected Rectangle |
getTabBounds(int tabIndex,
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() |
boolean |
isMaxEnabled() |
protected boolean |
isOneActionButtonEnabled() |
protected void |
layoutLabel(int tabPlacement,
FontMetrics metrics,
int tabIndex,
String title,
Icon icon,
Rectangle tabRect,
Rectangle iconRect,
Rectangle textRect,
boolean isSelected) |
protected Rectangle |
newCloseRect(Rectangle rect) |
protected Rectangle |
newMaxRect(Rectangle rect) |
void |
paint(Graphics g,
JComponent c) |
protected void |
paintActionButton(Graphics g,
int dx,
int dy,
int status,
boolean isOver,
JButton button,
BufferedImage image) |
protected void |
paintCloseIcon(Graphics g,
int dx,
int dy,
boolean isOver) |
protected void |
paintMaxIcon(Graphics g,
int dx,
int dy,
boolean isOver) |
protected void |
paintTab(Graphics g,
int tabPlacement,
Rectangle[] rects,
int tabIndex,
Rectangle iconRect,
Rectangle textRect) |
void |
scroll(int tab) |
void |
setCloseIcon(boolean b) |
void |
setCloseIconImage(BufferedImage img) |
void |
setMaxIcon(boolean b) |
void |
setMaxIconImage(BufferedImage img) |
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 |
updateMaxIcon(int x,
int y) |
protected void |
updateOverTab(int x,
int y) |
assureRectsCreated, calculateMaxTabHeight, calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, createFocusListener, createPropertyChangeListener, createScrollButton, expandTabRunsArray, getBaseline, getBaseline, getBaselineOffset, getBaselineResizeBehavior, 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
contains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSize, update
protected CloseTabPaneUI.ScrollableTabSupport tabScroller
protected CloseTabPaneUI.MyMouseMotionListener motionListener
protected static final int BUTTONSIZE
protected static final int WIDTHDELTA
protected JPopupMenu actionPopupMenu
protected JMenuItem maxItem
protected JMenuItem closeItem
protected Insets getContentBorderInsets(int tabPlacement)
getContentBorderInsets
in class BasicTabbedPaneUI
protected boolean isOneActionButtonEnabled()
public boolean isCloseEnabled()
public boolean isMaxEnabled()
public void scroll(int tab)
public void setCloseIcon(boolean b)
public void setCloseIconImage(BufferedImage img)
public void setMaxIcon(boolean b)
public void setMaxIconImage(BufferedImage img)
protected int calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics)
calculateTabWidth
in class BasicTabbedPaneUI
protected int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight)
calculateTabHeight
in class BasicTabbedPaneUI
protected void layoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)
layoutLabel
in class BasicTabbedPaneUI
protected MouseListener createMouseListener()
createMouseListener
in class BasicTabbedPaneUI
protected CloseTabPaneUI.ScrollableTabButton createScrollableTabButton(int direction)
protected void updateOverTab(int x, int y)
protected void updateCloseIcon(int x, int y)
protected void updateMaxIcon(int x, int y)
public static ComponentUI createUI(JComponent c)
protected LayoutManager createLayoutManager()
installUI
to create a layout manager object to
manage the JTabbedPane
.createLayoutManager
in class BasicTabbedPaneUI
TabbedPaneLayout
,
JTabbedPane.getTabLayoutPolicy()
protected void installComponents()
installComponents
in class BasicTabbedPaneUI
protected void uninstallComponents()
uninstallComponents
in class BasicTabbedPaneUI
protected void installListeners()
installListeners
in class BasicTabbedPaneUI
protected void uninstallListeners()
uninstallListeners
in class BasicTabbedPaneUI
protected ChangeListener createChangeListener()
createChangeListener
in class BasicTabbedPaneUI
protected void installKeyboardActions()
installKeyboardActions
in class BasicTabbedPaneUI
protected void uninstallKeyboardActions()
uninstallKeyboardActions
in class BasicTabbedPaneUI
public void paint(Graphics g, JComponent c)
paint
in class BasicTabbedPaneUI
protected void paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect)
paintTab
in class BasicTabbedPaneUI
protected void paintCloseIcon(Graphics g, int dx, int dy, boolean isOver)
protected void paintMaxIcon(Graphics g, int dx, int dy, boolean isOver)
protected void paintActionButton(Graphics g, int dx, int dy, int status, boolean isOver, JButton button, BufferedImage image)
protected Rectangle getTabBounds(int tabIndex, Rectangle dest)
Rectangle
instance. The handling of invalid parameters is
unspecified.getTabBounds
in class BasicTabbedPaneUI
tabIndex
- the index of the tabdest
- the rectangle where the result should be placedpublic int getOverTabIndex()
Copyright © 2015 OpenEstate. All rights reserved.