csheets.ui.sheet
Class WorkbookPaneUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.TabbedPaneUI
javax.swing.plaf.basic.BasicTabbedPaneUI
javax.swing.plaf.metal.MetalTabbedPaneUI
csheets.ui.sheet.WorkbookPaneUI
- All Implemented Interfaces:
- SwingConstants
public class WorkbookPaneUI
- extends MetalTabbedPaneUI
An extension of the MetalTabbedPaneUI that adds a number of
navigation buttons to the pane.
- Author:
- Nobuo Tamemasa, Einar Pehrson
| 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 |
|
Method Summary |
protected void |
assureRectsCreated(int tabCount)
|
protected int |
calculateMaxTabHeight(int tabPlacement)
|
protected int |
calculateTabWidth(int tabPlacement,
int tabIndex,
FontMetrics metrics)
|
protected LayoutManager |
createLayoutManager()
|
protected void |
ensureCurrentLayout()
|
protected void |
ensureVisibleTabAt(int index)
|
protected FontMetrics |
getFontMetrics()
|
(package private) int |
getMaxTabHeight()
|
(package private) Rectangle[] |
getRects()
|
protected Insets |
getTabAreaInsets(int tabPlacement)
|
(package private) WorkbookPane |
getTabbedPane()
|
protected void |
installComponents()
|
protected void |
installListeners()
|
void |
installUI(JComponent c)
|
protected int |
lastTabInRun(int tabCount,
int run)
|
void |
paint(Graphics g,
JComponent c)
|
protected void |
paintContentBorderBottomEdge(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 |
selectNextTab(int current)
|
protected void |
selectPreviousTab(int current)
|
protected void |
setButtonsEnabled()
|
(package private) void |
setMaxTabHeight(int maxTabHeight)
|
int |
tabForCoordinate(JTabbedPane pane,
int x,
int y)
|
protected void |
uninstallComponents()
|
protected void |
uninstallListeners()
|
void |
uninstallUI(JComponent c)
|
| Methods inherited from class javax.swing.plaf.metal.MetalTabbedPaneUI |
createUI, getColorForGap, getTabLabelShiftX, getTabLabelShiftY, getTabRunOverlay, installDefaults, paintBottomTabBorder, paintContentBorderLeftEdge, paintContentBorderRightEdge, paintFocusIndicator, paintHighlightBelowTab, paintLeftTabBorder, paintRightTabBorder, paintTabBackground, paintTabBorder, paintTopTabBorder, shouldFillGap, shouldPadTabRun, shouldRotateTabRuns, update |
| Methods inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI |
calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, calculateTabHeight, createChangeListener, createFocusListener, createMouseListener, createPropertyChangeListener, createScrollButton, expandTabRunsArray, getContentBorderInsets, getFocusIndex, getIconForTab, getMaximumSize, getMinimumSize, getNextTabIndex, getNextTabIndexInRun, getNextTabRun, getPreviousTabIndex, getPreviousTabIndexInRun, getPreviousTabRun, getRolloverTab, getRunForTab, getSelectedTabPadInsets, getTabBounds, getTabBounds, getTabInsets, getTabRunCount, getTabRunIndent, getTabRunOffset, getTextViewForTab, getVisibleComponent, installKeyboardActions, layoutLabel, navigateSelectedTab, paintContentBorder, paintIcon, paintTab, paintTabArea, paintText, rotateInsets, selectAdjacentRunTab, selectNextTabInRun, selectPreviousTabInRun, setRolloverTab, setVisibleComponent, shouldRotateTabRuns, uninstallDefaults, uninstallKeyboardActions |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buttonListeners
protected ActionListener[] buttonListeners
WorkbookPaneUI
public WorkbookPaneUI()
- Creates a new WorkbookPane UI.
installUI
public void installUI(JComponent c)
- Overrides:
installUI in class BasicTabbedPaneUI
uninstallUI
public void uninstallUI(JComponent c)
- Overrides:
uninstallUI in class BasicTabbedPaneUI
createLayoutManager
protected LayoutManager createLayoutManager()
- Overrides:
createLayoutManager in class MetalTabbedPaneUI
installComponents
protected void installComponents()
- Overrides:
installComponents in class BasicTabbedPaneUI
uninstallComponents
protected void uninstallComponents()
- Overrides:
uninstallComponents in class BasicTabbedPaneUI
installListeners
protected void installListeners()
- Overrides:
installListeners in class BasicTabbedPaneUI
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListeners in class BasicTabbedPaneUI
tabForCoordinate
public int tabForCoordinate(JTabbedPane pane,
int x,
int y)
- Overrides:
tabForCoordinate in class BasicTabbedPaneUI
paint
public void paint(Graphics g,
JComponent c)
- Overrides:
paint in class MetalTabbedPaneUI
paintContentBorderTopEdge
protected void paintContentBorderTopEdge(Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
- Overrides:
paintContentBorderTopEdge in class MetalTabbedPaneUI
paintContentBorderBottomEdge
protected void paintContentBorderBottomEdge(Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
- Overrides:
paintContentBorderBottomEdge in class MetalTabbedPaneUI
getTabAreaInsets
protected Insets getTabAreaInsets(int tabPlacement)
- Overrides:
getTabAreaInsets in class BasicTabbedPaneUI
lastTabInRun
protected int lastTabInRun(int tabCount,
int run)
- Overrides:
lastTabInRun in class BasicTabbedPaneUI
ensureCurrentLayout
protected void ensureCurrentLayout()
setButtonsEnabled
protected void setButtonsEnabled()
ensureVisibleTabAt
protected void ensureVisibleTabAt(int index)
selectNextTab
protected void selectNextTab(int current)
- Overrides:
selectNextTab in class BasicTabbedPaneUI
selectPreviousTab
protected void selectPreviousTab(int current)
- Overrides:
selectPreviousTab in class BasicTabbedPaneUI
setMaxTabHeight
void setMaxTabHeight(int maxTabHeight)
getMaxTabHeight
int getMaxTabHeight()
getRects
Rectangle[] getRects()
getTabbedPane
WorkbookPane getTabbedPane()
getFontMetrics
protected FontMetrics getFontMetrics()
- Overrides:
getFontMetrics in class BasicTabbedPaneUI
calculateMaxTabHeight
protected int calculateMaxTabHeight(int tabPlacement)
- Overrides:
calculateMaxTabHeight in class MetalTabbedPaneUI
calculateTabWidth
protected int calculateTabWidth(int tabPlacement,
int tabIndex,
FontMetrics metrics)
- Overrides:
calculateTabWidth in class BasicTabbedPaneUI
assureRectsCreated
protected void assureRectsCreated(int tabCount)
- Overrides:
assureRectsCreated in class BasicTabbedPaneUI