javax.swing.JTabbedPane .
Looks up the selectedTabPadInsets property from the Style,
which represents additional insets for the selected tab.
| Modifier and Type | Class and Description |
|---|---|
| private static class | SynthTabbedPaneUI.
A subclass of |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | extendTabsToBase
When a tabbed pane has multiple rows of tabs, this indicates whether the tabs in the upper row(s) should extend to the base of the tab area, or whether they should remain at their normal tab height. |
| private Rectangle | |
| private boolean | |
| private boolean | |
| private SynthStyle | |
| private Rectangle | |
| private SynthContext | |
| private boolean | |
| private SynthStyle | |
| private SynthContext | |
| private SynthStyle | |
| private SynthContext | |
| private int | tabOverlap
If non-zero, tabOverlap indicates the amount that the tab bounds should be altered such that they would overlap with a tab on either the leading or trailing end of a run (ie: in TOP, this would be on the left or right). |
| private SynthStyle | |
| private Rectangle |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected int | calculateMaxTabHeight(int tabPlacement)
Overrides javax. Calculates the maximum tab height. |
| protected int | calculateMaxTabWidth(int tabPlacement)
Overrides javax. Calculates the maximum tab width. |
| protected int | calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics)
Overrides javax. Calculates the tab width. |
| protected LayoutManager | createLayoutManager()
Overrides javax. Invoked by |
| protected MouseListener | createMouseListener()
Overrides javax. Creates a mouse listener. |
| protected JButton | createScrollButton(int direction)
Overrides javax. Creates and returns a JButton that will provide the user with a way to scroll the tabs in a particular direction. |
| public static ComponentUI | Returns: the UI objectcomponent to create UI object for c)Hides javax. Creates a new UI object for the given component. |
| private void | |
| protected int | getBaseline(int tab)
Overrides javax. Returns the baseline for the specified tab. |
| public SynthContext | getContext(JComponent c)
Implements javax. Returns the Context for the specified component. |
| private SynthContext | |
| private SynthContext | |
| protected FontMetrics | getFontMetrics()
Overrides javax. Returns the font metrics. |
| private FontMetrics | |
| protected Insets | getTabInsets(int tabPlacement, int tabIndex)
Overrides javax. Returns the tab insets. |
| protected int | getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)
Overrides javax. Returns the tab label shift x. |
| protected int | getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)
Overrides javax. Returns the tab label shift y. |
| protected void | installDefaults()
Overrides javax. Installs the defaults. |
| protected void | installListeners()
Overrides javax. Installs the listeners. |
| private void | layoutLabel(SynthContext ss, int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)
|
| public void | paint(Graphics
the g, JComponent Graphics object used for paintingthe component being painted c)Overrides javax. Paints the specified component according to the Look and Feel. |
| protected void | paint(SynthContext
context for the component being painted context, Graphics the g)Graphics object used for paintingPaints the specified component. |
| public void | paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Implements javax. Paints the border. |
| private void | |
| private void | |
| protected void | paintTabArea(Graphics g, int tabPlacement, int selectedIndex)
Overrides javax. Paints the tabs in the tab area. |
| private void | paintTabArea(SynthContext ss, Graphics g, int tabPlacement, int selectedIndex, Rectangle tabAreaBounds)
|
| private void | paintText(SynthContext ss, Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
|
| public void | propertyChange(PropertyChangeEvent e)
Implements java. This method gets called when a bound property is changed. |
| private boolean | |
| protected void | setRolloverTab(int index)
Overrides javax. Sets the tab the mouse is currently over to |
| protected void | uninstallDefaults()
Overrides javax. Uninstalls the defaults. |
| protected void | uninstallListeners()
Overrides javax. Uninstalls the listeners. |
| public void | update(Graphics
the g, JComponent Graphics object used for paintingthe component being painted c)Overrides javax. Notifies this UI delegate to repaint the specified component. |
| private void | |
| private void | updateTabContext(int index, boolean selected, boolean isMouseDown, boolean isMouseOver, boolean hasFocus)
|
| extendTabsToBase | back to summary |
|---|---|
| private boolean extendTabsToBase When a tabbed pane has multiple rows of tabs, this indicates whether the tabs in the upper row(s) should extend to the base of the tab area, or whether they should remain at their normal tab height. This does not affect the bounds of the tabs, only the bounds of area painted by the tabs. The text position does not change. The result is that the bottom border of the upper row of tabs becomes fully obscured by the lower tabs, resulting in a cleaner look. | |
| iconRect | back to summary |
|---|---|
| private Rectangle iconRect | |
| nudgeSelectedLabel | back to summary |
|---|---|
| private boolean nudgeSelectedLabel | |
| selectedTabIsPressed | back to summary |
|---|---|
| private boolean selectedTabIsPressed | |
| style | back to summary |
|---|---|
| private SynthStyle style | |
| tabAreaBounds | back to summary |
|---|---|
| private Rectangle tabAreaBounds | |
| tabAreaContext | back to summary |
|---|---|
| private SynthContext tabAreaContext | |
| tabAreaStatesMatchSelectedTab | back to summary |
|---|---|
| private boolean tabAreaStatesMatchSelectedTab | |
| tabAreaStyle | back to summary |
|---|---|
| private SynthStyle tabAreaStyle | |
| tabContentContext | back to summary |
|---|---|
| private SynthContext tabContentContext | |
| tabContentStyle | back to summary |
|---|---|
| private SynthStyle tabContentStyle | |
| tabContext | back to summary |
|---|---|
| private SynthContext tabContext | |
| tabOverlap | back to summary |
|---|---|
| private int tabOverlap If non-zero, tabOverlap indicates the amount that the tab bounds should be altered such that they would overlap with a tab on either the leading or trailing end of a run (ie: in TOP, this would be on the left or right). A positive overlap indicates that tabs should overlap right/down, while a negative overlap indicates that tabs should overlap left/up. When tabOverlap is specified, it both changes the x position and width of the tab if in TOP or BOTTOM placement, and changes the y position and height if in LEFT or RIGHT placement. This is done for the following reason. Consider a run of 10 tabs. There are 9 gaps between these tabs. If you specified a tabOverlap of "-1", then each of the tabs "x" values will be shifted left. This leaves 9 pixels of space to the right of the right-most tab unpainted. So, each tab's width is also extended by 1 pixel to make up the difference. This property respects the RTL component orientation. | |
| tabStyle | back to summary |
|---|---|
| private SynthStyle tabStyle | |
| textRect | back to summary |
|---|---|
| private Rectangle textRect | |
| SynthTabbedPaneUI | back to summary |
|---|---|
| public SynthTabbedPaneUI() Constructs a | |
| calculateMaxTabHeight | back to summary |
|---|---|
| protected int calculateMaxTabHeight(int tabPlacement) Overrides javax. Doc from javax. Calculates the maximum tab height.
| |
| calculateMaxTabWidth | back to summary |
|---|---|
| protected int calculateMaxTabWidth(int tabPlacement) Overrides javax. Doc from javax. Calculates the maximum tab width.
| |
| calculateTabWidth | back to summary |
|---|---|
| protected int calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics) Overrides javax. Doc from javax. Calculates the tab width.
| |
| createLayoutManager | back to summary |
|---|---|
| protected LayoutManager createLayoutManager() Overrides javax. Doc from javax. Invoked by
| |
| createMouseListener | back to summary |
|---|---|
| protected MouseListener createMouseListener() Overrides javax. Doc from javax. Creates a mouse listener. Overridden to keep track of whether the selected tab is also pressed.
| |
| createScrollButton | back to summary |
|---|---|
| protected JButton createScrollButton(int direction) Overrides javax. Doc from javax. Creates and returns a JButton that will provide the user with a way to scroll the tabs in a particular direction. The returned JButton must be instance of UIResource.
| |
| createUI | back to summary |
|---|---|
| public static ComponentUI createUI(JComponent c) Hides javax. Creates a new UI object for the given component.
| |
| ensureCurrentLayout | back to summary |
|---|---|
| private void ensureCurrentLayout() Hides javax. | |
| getBaseline | back to summary |
|---|---|
| protected int getBaseline(int tab) Overrides javax. Doc from javax. Returns the baseline for the specified tab.
| |
| getContext | back to summary |
|---|---|
| public SynthContext getContext(JComponent c) Implements javax. Doc from javax. Returns the Context for the specified component.
| |
| getContext | back to summary |
|---|---|
| private SynthContext getContext(JComponent c, int state) | |
| getContext | back to summary |
|---|---|
| private SynthContext getContext(JComponent c, Region subregion, int state) | |
| getFontMetrics | back to summary |
|---|---|
| protected FontMetrics getFontMetrics() Overrides javax. Doc from javax. Returns the font metrics.
| |
| getFontMetrics | back to summary |
|---|---|
| private FontMetrics getFontMetrics(Font font) | |
| getTabInsets | back to summary |
|---|---|
| protected Insets getTabInsets(int tabPlacement, int tabIndex) Overrides javax. Doc from javax. Returns the tab insets.
| |
| getTabLabelShiftX | back to summary |
|---|---|
| protected int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected) Overrides javax. Doc from javax. Returns the tab label shift x.
| |
| getTabLabelShiftY | back to summary |
|---|---|
| protected int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected) Overrides javax. Doc from javax. Returns the tab label shift y.
| |
| installDefaults | back to summary |
|---|---|
| protected void installDefaults() Overrides javax. Doc from javax. Installs the defaults.
| |
| installListeners | back to summary |
|---|---|
| protected void installListeners() Overrides javax. Doc from javax. Installs the listeners.
| |
| layoutLabel | back to summary |
|---|---|
| private void layoutLabel(SynthContext ss, int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected) | |
| paint | back to summary |
|---|---|
| public void paint(Graphics g, JComponent c) Overrides javax. Paints the specified component according to the Look and Feel. This method is not used by Synth Look and Feel.
Painting is handled by the
| |
| paint | back to summary |
|---|---|
| protected void paint(SynthContext context, Graphics g) Paints the specified component.
| |
| paintBorder | back to summary |
|---|---|
| public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) Implements javax. Doc from javax. Paints the border.
| |
| paintContentBorder | back to summary |
|---|---|
| private void paintContentBorder(SynthContext ss, Graphics g, int tabPlacement, int selectedIndex) | |
| paintTab | back to summary |
|---|---|
| private void paintTab(SynthContext ss, Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect) | |
| paintTabArea | back to summary |
|---|---|
| protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) Overrides javax. Doc from javax. Paints the tabs in the tab area.
Invoked by paint().
The graphics parameter must be a valid | |
| paintTabArea | back to summary |
|---|---|
| private void paintTabArea(SynthContext ss, Graphics g, int tabPlacement, int selectedIndex, Rectangle tabAreaBounds) | |
| paintText | back to summary |
|---|---|
| private void paintText(SynthContext ss, Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected) | |
| propertyChange | back to summary |
|---|---|
| public void propertyChange(PropertyChangeEvent e) Implements java. Doc from java. This method gets called when a bound property is changed.
| |
| scrollableTabLayoutEnabled | back to summary |
|---|---|
| private boolean scrollableTabLayoutEnabled() Hides javax. | |
| setRolloverTab | back to summary |
|---|---|
| protected void setRolloverTab(int index) Overrides javax. Doc from javax. Sets the tab the mouse is currently over to
| |
| uninstallDefaults | back to summary |
|---|---|
| protected void uninstallDefaults() Overrides javax. Doc from javax. Uninstalls the defaults.
| |
| uninstallListeners | back to summary |
|---|---|
| protected void uninstallListeners() Overrides javax. Doc from javax. Uninstalls the listeners.
| |
| update | back to summary |
|---|---|
| public void update(Graphics g, JComponent c) Overrides javax. Notifies this UI delegate to repaint the specified component.
This method paints the component background, then calls
the In general, this method does not need to be overridden by subclasses.
All Look and Feel rendering code should reside in the
| |
| updateStyle | back to summary |
|---|---|
| private void updateStyle(JTabbedPane c) | |
| updateTabContext | back to summary |
|---|---|
| private void updateTabContext(int index, boolean selected, boolean isMouseDown, boolean isMouseOver, boolean hasFocus) | |
SynthArrowButton that implements
UIResource.
| Access | Constructor and Description |
|---|---|
| public |
| SynthScrollableTabButton | back to summary |
|---|---|
| public SynthScrollableTabButton(int direction) | |