|
Quaqua 8.0 2011-10-02 | ||||||||
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.jaguar.QuaquaJaguarTabbedPaneUI
public class QuaquaJaguarTabbedPaneUI
A replacement for the AquaTabbedPaneUI for Mac OS X 10.2 Jaguar. Tabs of tabbed panes are stacked instead of moved into a popup menu, if not enough space is available to render all tabs in a single line.
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 |
QuaquaJaguarTabbedPaneUI.QuaquaMouseHandler
This inner class is marked "public" due to a compiler bug. |
class |
QuaquaJaguarTabbedPaneUI.QuaquaPropertyChangeHandler
This inner class is marked "public" due to a compiler bug. |
class |
QuaquaJaguarTabbedPaneUI.TabbedPaneLayout
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.FocusHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.MouseHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler |
Field Summary | |
---|---|
protected java.awt.Color |
disabledForeground
|
protected int |
minTabWidth
|
protected java.awt.Color |
selectColor
|
protected java.awt.Color |
selectHighlight
|
protected java.awt.Color |
tabAreaBackground
|
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 ch.randelshofer.quaqua.VisuallyLayoutable |
---|
CLIP_BOUNDS, COMPONENT_BOUNDS, TEXT_BOUNDS |
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 | |
---|---|
QuaquaJaguarTabbedPaneUI()
|
Method Summary | |
---|---|
protected void |
addMnemonic(int index,
int mnemonic)
Adds the specified mnemonic at the specified index. |
protected int |
calculateMaxTabHeight(int tabPlacement)
|
protected javax.swing.event.ChangeListener |
createChangeListener()
|
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)
|
int |
getBaseline(javax.swing.JComponent component,
int width,
int height)
Returns the baseline for the specified component, or -1 if the baseline can not be determined. |
protected java.awt.Color |
getColorForGap(int currentRun,
int x,
int y)
|
protected java.awt.Insets |
getContentBorderInsets(int tabPlacement)
|
java.lang.Integer |
getIndexForMnemonic(int mnemonic)
|
protected java.lang.String |
getPropertyPrefix()
|
protected java.awt.Insets |
getTabAreaInsets(int tabPlacement)
|
protected java.awt.Insets |
getTabInsets(int tabPlacement,
int tabIndex)
|
protected int |
getTabLabelShiftX(int tabPlacement,
int tabIndex,
boolean isSelected)
Overridden to do nothing for the Quaqua L&F. |
protected int |
getTabLabelShiftY(int tabPlacement,
int tabIndex,
boolean isSelected)
Overridden to return specific shift values for the Quaqua L&F. |
protected int |
getTabRunOverlay(int tabPlacement)
|
java.awt.Rectangle |
getVisualBounds(javax.swing.JComponent c,
int type,
int width,
int height)
Returns the visual bounds for the specified component, or null if the visual bounds can not be determined. |
protected java.awt.Insets |
getVisualMargin()
|
protected void |
installComponents()
|
protected void |
installDefaults()
|
void |
navigateSelectedTab(int direction)
Tab Navigation methods. |
void |
paint(java.awt.Graphics gr,
javax.swing.JComponent c)
|
protected void |
paintContentArea(java.awt.Graphics gr,
int x,
int y,
int width,
int height)
|
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)
Overridden to do nothing for the Quaqua L&F. |
protected void |
paintHighlightBelowTab()
|
protected void |
paintTabArea(java.awt.Graphics g,
int tabPlacement,
int selectedIndex)
Paints the tabs in the tab area. |
protected void |
paintTabBackground(java.awt.Graphics g,
int tabPlacement,
int tabIndex,
int x,
int y,
int w,
int h,
boolean isSelected)
Overridden to do nothing for the Quaqua L&F. |
protected void |
paintTabBorder(java.awt.Graphics g,
int tabPlacement,
int tabIndex,
int x,
int y,
int w,
int h,
boolean isSelected)
|
protected void |
paintTabBorderBottom(int tabIndex,
java.awt.Graphics g,
int x,
int y,
int w,
int h,
int btm,
int rght,
boolean isSelected)
|
protected void |
paintTabBorderLeft(int tabIndex,
java.awt.Graphics g,
int x,
int y,
int w,
int h,
int btm,
int rght,
boolean isSelected)
|
protected void |
paintTabBorderRight(int tabIndex,
java.awt.Graphics g,
int x,
int y,
int w,
int h,
int btm,
int rght,
boolean isSelected)
|
protected void |
paintTabBorderTop(int tabIndex,
java.awt.Graphics g,
int x,
int y,
int w,
int h,
int btm,
int rght,
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)
|
protected void |
repaintTabArea()
|
boolean |
requestFocusForVisibleComponent()
|
protected void |
resetMnemonics()
Resets the mnemonics bindings to an empty state. |
void |
setPropertyPrefix(java.lang.String newValue)
|
protected boolean |
shouldFillGap(int currentRun,
int tabIndex,
int x,
int y)
|
protected boolean |
shouldPadTabRun(int tabPlacement,
int run)
|
protected boolean |
shouldRotateTabRuns(int tabPlacement,
int selectedRun)
|
void |
update(java.awt.Graphics g,
javax.swing.JComponent c)
|
protected void |
updateMnemonics()
Reloads the mnemonics. |
Methods inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI |
---|
assureRectsCreated, calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, calculateTabHeight, calculateTabWidth, createFocusListener, createScrollButton, expandTabRunsArray, getBaseline, getBaselineOffset, getBaselineResizeBehavior, getFocusIndex, getFontMetrics, getIconForTab, getMaximumSize, getMinimumSize, getNextTabIndex, getNextTabIndexInRun, getNextTabRun, getPreviousTabIndex, getPreviousTabIndexInRun, getPreviousTabRun, getRolloverTab, getRunForTab, getSelectedTabPadInsets, getTabBounds, getTabBounds, getTabRunCount, getTabRunIndent, getTabRunOffset, getTextViewForTab, getVisibleComponent, installKeyboardActions, installListeners, installUI, lastTabInRun, layoutLabel, paintIcon, paintTab, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setRolloverTab, setVisibleComponent, shouldRotateTabRuns, tabForCoordinate, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int minTabWidth
protected java.awt.Color tabAreaBackground
protected java.awt.Color selectColor
protected java.awt.Color selectHighlight
protected java.awt.Color disabledForeground
Constructor Detail |
---|
public QuaquaJaguarTabbedPaneUI()
Method Detail |
---|
protected 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.LayoutManager createLayoutManager()
createLayoutManager
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected java.beans.PropertyChangeListener createPropertyChangeListener()
createPropertyChangeListener
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected java.awt.event.MouseListener createMouseListener()
createMouseListener
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void installDefaults()
installDefaults
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 paintTabBorderTop(int tabIndex, java.awt.Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
protected boolean shouldFillGap(int currentRun, int tabIndex, int x, int y)
protected java.awt.Color getColorForGap(int currentRun, int x, int y)
protected void paintTabBorderLeft(int tabIndex, java.awt.Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
protected void paintTabBorderBottom(int tabIndex, java.awt.Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
protected void paintTabBorderRight(int tabIndex, java.awt.Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
public void update(java.awt.Graphics g, javax.swing.JComponent c)
update
in class javax.swing.plaf.ComponentUI
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 int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)
getTabLabelShiftX
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected java.awt.Insets getVisualMargin()
protected int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)
getTabLabelShiftY
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void repaintTabArea()
public void paint(java.awt.Graphics gr, javax.swing.JComponent c)
paint
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void paintTabArea(java.awt.Graphics g, int tabPlacement, int selectedIndex)
Graphics
object. Tab placement may be either:
JTabbedPane.TOP
, JTabbedPane.BOTTOM
,
JTabbedPane.LEFT
, or JTabbedPane.RIGHT
.
The selected index must be a valid tabbed pane tab index (0 to
tab count - 1, inclusive) or -1 if no tab is currently selected.
The handling of invalid parameters is unspecified.
paintTabArea
in class javax.swing.plaf.basic.BasicTabbedPaneUI
g
- the graphics object to use for renderingtabPlacement
- the placement for the tabs within the JTabbedPaneselectedIndex
- the tab index of the selected componentprotected void updateMnemonics()
protected void resetMnemonics()
protected void addMnemonic(int index, int mnemonic)
protected void paintHighlightBelowTab()
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 java.awt.Insets getTabInsets(int tabPlacement, int tabIndex)
getTabInsets
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected java.awt.Insets getTabAreaInsets(int tabPlacement)
getTabAreaInsets
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected java.awt.Insets getContentBorderInsets(int tabPlacement)
getContentBorderInsets
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 paintContentArea(java.awt.Graphics gr, int x, int y, int width, int height)
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 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 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 int calculateMaxTabHeight(int tabPlacement)
calculateMaxTabHeight
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected int getTabRunOverlay(int tabPlacement)
getTabRunOverlay
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected boolean shouldRotateTabRuns(int tabPlacement, int selectedRun)
protected boolean shouldPadTabRun(int tabPlacement, int run)
shouldPadTabRun
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
public java.awt.Rectangle getVisualBounds(javax.swing.JComponent c, int type, int width, int height)
VisuallyLayoutable
getVisualBounds
in interface VisuallyLayoutable
c
- JComponent to calculate visual margin fortype
- The type of the visual margin.width
- Width of the componentheight
- Height of the component
public int getBaseline(javax.swing.JComponent component, int width, int height)
VisuallyLayoutable
getBaseline
in interface VisuallyLayoutable
getBaseline
in class javax.swing.plaf.basic.BasicTabbedPaneUI
component
- JComponent to calculate baseline forwidth
- Width of the component to determine baseline for.height
- Height of the component to determine baseline for.
public void navigateSelectedTab(int direction)
NavigatableTabbedPaneUI
navigateSelectedTab
in interface NavigatableTabbedPaneUI
navigateSelectedTab
in class javax.swing.plaf.basic.BasicTabbedPaneUI
public java.lang.Integer getIndexForMnemonic(int mnemonic)
getIndexForMnemonic
in interface NavigatableTabbedPaneUI
public boolean requestFocusForVisibleComponent()
requestFocusForVisibleComponent
in interface NavigatableTabbedPaneUI
protected void installComponents()
installComponents
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected javax.swing.event.ChangeListener createChangeListener()
createChangeListener
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 |