|
Quaqua 7.2.1 2010-08-01 | ||||||||
| 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
ch.randelshofer.quaqua.panther.QuaquaPantherScrollTabbedPaneUI
public class QuaquaPantherScrollTabbedPaneUI
A replacement for Apple's AquaTabbedPaneUI for Mac OS X 10.3 Panther. All tabs are placed in one run. Tabs on the left and on the right are rotated by 90 degrees. If the tabs don't fit into one run, they are shortened. Tabs on the top and on the bottom are only shortend as at least one tab can be shown fully. If this isn't possible, a combo box is shown instead of the tabs.
Supports the following client properties on the JTabbedPane:
Quaqua.TabbedPane.contentBorderPainted specifies whether the
content border should be painted.Supports the following client properties on the children of the JTabbedPane:
Quaqua.TabbedPaneChild.contentBackground specifies the background
Color to be used to fill the content border.Quaqua.TabbedPaneChild.contentInsets specifies the insets
to be used to lay out the child component inside the JTabbedPane.
| Nested Class Summary | |
|---|---|
class |
QuaquaPantherScrollTabbedPaneUI.QuaquaMouseHandler
This inner class is marked "public" due to a compiler bug. |
class |
QuaquaPantherScrollTabbedPaneUI.QuaquaPropertyHandler
This inner class is marked "public" due to a compiler bug. |
class |
QuaquaPantherScrollTabbedPaneUI.QuaquaTabbedPaneLayout
This inner class is marked "public" due to a compiler bug. |
class |
QuaquaPantherScrollTabbedPaneUI.QuaquaTabSelectionHandler
This inner class is marked "public" due to a compiler bug. |
| Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI |
|---|
javax.swing.plaf.basic.BasicTabbedPaneUI.MouseHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout, javax.swing.plaf.basic.BasicTabbedPaneUI.TabSelectionHandler |
| Field Summary |
|---|
| 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 | |
|---|---|
QuaquaPantherScrollTabbedPaneUI()
Creates a new instance. |
|
| Method Summary | |
|---|---|
protected void |
addMnemonic(int index,
int mnemonic)
Adds the specified mnemonic at the specified index. |
protected int |
calculateTabAreaHeight(int tabPlacement,
int horizRunCount,
int maxTabHeight)
|
protected int |
calculateTabAreaWidth(int tabPlacement,
int vertRunCount,
int maxTabWidth)
|
protected int |
calculateTabHeight(int tabPlacement,
int tabIndex,
int fontHeight)
|
protected javax.swing.event.ChangeListener |
createChangeListener()
|
protected java.awt.event.FocusListener |
createFocusListener()
|
protected java.awt.event.ItemListener |
createItemListener()
|
protected java.awt.LayoutManager |
createLayoutManager()
|
protected java.awt.event.MouseListener |
createMouseListener()
|
protected java.beans.PropertyChangeListener |
createPropertyChangeListener()
|
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent x)
|
protected java.awt.Insets |
getContentBorderInsets(int tabPlacement)
|
java.lang.Integer |
getIndexForMnemonic(int mnemonic)
|
protected java.awt.Insets |
getInsets()
|
protected java.lang.String |
getPropertyPrefix()
|
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 java.awt.Insets |
getTabInsets(int tabPlacement,
int tabIndex)
|
protected int |
getTabLabelShiftX(int tabPlacement,
int tabIndex,
boolean isSelected)
|
protected int |
getTabLabelShiftY(int tabPlacement,
int tabIndex,
boolean isSelected)
|
protected java.awt.Insets |
getTabVisualMargin()
|
protected javax.swing.text.View |
getTextViewForTab(int tabIndex)
Returns the text View object required to render stylized text (HTML) for the specified tab or null if no specialized text rendering is needed for this tab. |
protected java.awt.Insets |
getVisualMargin()
|
protected void |
installComponents()
|
protected void |
installDefaults()
|
protected void |
installKeyboardActions()
|
protected void |
installListeners()
|
protected java.lang.String |
layoutTabLabel(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)
|
void |
navigateSelectedTab(int direction)
Tab Navigation methods. |
void |
paint(java.awt.Graphics gr,
javax.swing.JComponent c)
|
protected void |
paintContentBorder(java.awt.Graphics gr,
int tabPlacement,
int selectedIndex)
|
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 |
paintTab(java.awt.Graphics gr,
int tabPlacement,
java.awt.Rectangle[] rects,
int tabIndex,
java.awt.Rectangle iconRect,
java.awt.Rectangle textRect)
|
protected void |
paintTabArea(java.awt.Graphics gr,
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)
this function draws the border around each tab note that this function does now draw the background of the tab. |
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)
|
protected void |
repaintTabArea()
|
boolean |
requestFocusForVisibleComponent()
|
protected void |
resetMnemonics()
Resets the mnemonics bindings to an empty state. |
void |
setPropertyPrefix(java.lang.String newValue)
|
protected boolean |
shouldRotateTabRuns(int tabPlacement)
|
int |
tabForCoordinate(javax.swing.JTabbedPane pane,
int x,
int y)
Returns the tab index which intersects the specified point in the JTabbedPane's coordinate space. |
protected void |
uninstallComponents()
|
protected void |
uninstallListeners()
|
| Methods inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI |
|---|
assureRectsCreated, calculateMaxTabHeight, calculateMaxTabWidth, calculateTabWidth, createScrollButton, expandTabRunsArray, getBaseline, getBaseline, getBaselineOffset, getBaselineResizeBehavior, getFocusIndex, getFontMetrics, getIconForTab, getMaximumSize, getMinimumSize, getNextTabIndex, getNextTabIndexInRun, getNextTabRun, getPreviousTabIndex, getPreviousTabIndexInRun, getPreviousTabRun, getRolloverTab, getRunForTab, getSelectedTabPadInsets, getTabAreaInsets, getTabBounds, getTabRunCount, getTabRunIndent, getTabRunOffset, getTabRunOverlay, getVisibleComponent, installUI, lastTabInRun, layoutLabel, paintContentBorderBottomEdge, paintContentBorderLeftEdge, paintContentBorderRightEdge, paintContentBorderTopEdge, paintIcon, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setRolloverTab, setVisibleComponent, shouldPadTabRun, uninstallDefaults, 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 |
| Constructor Detail |
|---|
public QuaquaPantherScrollTabbedPaneUI()
| Method Detail |
|---|
public java.lang.Integer getIndexForMnemonic(int mnemonic)
getIndexForMnemonic in interface NavigatableTabbedPaneUIprotected java.lang.String getPropertyPrefix()
public void setPropertyPrefix(java.lang.String newValue)
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent x)
protected java.awt.event.ItemListener createItemListener()
protected java.awt.LayoutManager createLayoutManager()
createLayoutManager in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected void installDefaults()
installDefaults in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected void installComponents()
installComponents in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected void uninstallComponents()
uninstallComponents in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected void installListeners()
installListeners in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected void uninstallListeners()
uninstallListeners in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected java.awt.event.MouseListener createMouseListener()
createMouseListener in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected java.beans.PropertyChangeListener createPropertyChangeListener()
createPropertyChangeListener in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected javax.swing.event.ChangeListener createChangeListener()
createChangeListener in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected java.awt.event.FocusListener createFocusListener()
createFocusListener in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected void installKeyboardActions()
installKeyboardActions in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected java.awt.Insets getVisualMargin()
protected java.awt.Insets getTabVisualMargin()
protected java.awt.Insets getInsets()
protected java.awt.Insets getTabInsets(int tabPlacement,
int tabIndex)
getTabInsets in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected java.awt.Insets getContentBorderInsets(int tabPlacement)
getContentBorderInsets in class javax.swing.plaf.basic.BasicTabbedPaneUI
public void paint(java.awt.Graphics gr,
javax.swing.JComponent c)
paint in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void paintContentBorder(java.awt.Graphics gr,
int tabPlacement,
int selectedIndex)
paintContentBorder in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected java.lang.String layoutTabLabel(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 paintTabArea(java.awt.Graphics gr,
int tabPlacement,
int selectedIndex)
paintTabArea in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void paintTab(java.awt.Graphics gr,
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 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 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 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 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 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
public int tabForCoordinate(javax.swing.JTabbedPane pane,
int x,
int y)
tabForCoordinate in class javax.swing.plaf.basic.BasicTabbedPaneUI
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.BasicTabbedPaneUItabIndex - the index of the tabdest - the rectangle where the result should be placed
protected void resetMnemonics()
protected void addMnemonic(int index,
int mnemonic)
protected javax.swing.text.View getTextViewForTab(int tabIndex)
getTextViewForTab in class javax.swing.plaf.basic.BasicTabbedPaneUItabIndex - the index of the tab
protected int calculateTabHeight(int tabPlacement,
int tabIndex,
int fontHeight)
calculateTabHeight in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected int calculateTabAreaHeight(int tabPlacement,
int horizRunCount,
int maxTabHeight)
calculateTabAreaHeight in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected int calculateTabAreaWidth(int tabPlacement,
int vertRunCount,
int maxTabWidth)
calculateTabAreaWidth in class javax.swing.plaf.basic.BasicTabbedPaneUIprotected void repaintTabArea()
protected boolean shouldRotateTabRuns(int tabPlacement)
shouldRotateTabRuns in class javax.swing.plaf.basic.BasicTabbedPaneUIpublic boolean requestFocusForVisibleComponent()
requestFocusForVisibleComponent in interface NavigatableTabbedPaneUIpublic void navigateSelectedTab(int direction)
NavigatableTabbedPaneUI
navigateSelectedTab in interface NavigatableTabbedPaneUInavigateSelectedTab in class javax.swing.plaf.basic.BasicTabbedPaneUI
|
Copyright 2003-2007 (c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||