|
||||||||||
| 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
javax.swing.plaf.metal.MetalTabbedPaneUI
uic.themes.UICTabbedPaneUI
public class UICTabbedPaneUI
Scrollable tab ui that also works for jdk1.3
| Nested Class Summary | |
|---|---|
class |
UICTabbedPaneUI.MouseHandler
This inner class is marked "public" due to a compiler bug. |
class |
UICTabbedPaneUI.TabSelectionHandler
|
| Nested classes/interfaces inherited from class javax.swing.plaf.metal.MetalTabbedPaneUI |
|---|
MetalTabbedPaneUI.TabbedPaneLayout |
| Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI |
|---|
BasicTabbedPaneUI.FocusHandler, BasicTabbedPaneUI.PropertyChangeHandler |
| Field Summary | |
|---|---|
protected GeneralPath |
brokenFill
|
protected GeneralPath |
brokenLine
|
protected ActionListener[] |
buttonListeners
|
protected BufferedImage |
gradientBackground
|
protected BufferedImage |
gradientSelectedBackground
|
protected int |
selectionExtraHeight
|
| Fields inherited from class javax.swing.plaf.metal.MetalTabbedPaneUI |
|---|
minTabWidth, selectColor, selectHighlight, 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 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 | |
|---|---|
UICTabbedPaneUI()
|
|
| Method Summary | |
|---|---|
protected ChangeListener |
createChangeListener()
|
protected LayoutManager |
createLayoutManager()
Create a correct layout |
protected MouseListener |
createMouseListener()
Override mouselistener to reimplement tab selection Only VISIBLE tabs can be selected |
static ComponentUI |
createUI(JComponent comp)
|
protected void |
ensureCurrentLayout()
|
protected int |
getBrowseOffset()
|
Dimension |
getButtonPreferredSize()
|
protected FontMetrics |
getFontMetrics()
|
protected Insets |
getTabAreaInsets(int tabPlacement)
Update the insets of the tabs, using the space of the buttons |
protected int |
getTabPlacementOffset()
|
protected int |
getVisibleOffset(int index)
|
protected void |
installComponents()
Add the browse buttons |
protected void |
installListeners()
Add actions to the browse buttons |
void |
installUI(JComponent c)
|
boolean |
isLastTabVisible()
|
void |
paint(Graphics g,
JComponent c)
Override default paint to set the correct layout and to update the browse buttons (enable/disable and visible/not-visible) |
protected void |
paintFocusIndicator(Graphics g,
int tabPlacement,
Rectangle[] rects,
int tabIndex,
Rectangle iconRect,
Rectangle textRect,
boolean isSelected)
Override paint focus, to draw a normal dashed line as focus |
protected void |
paintTab(Graphics g,
int tabPlacement,
Rectangle[] rects,
int tabIndex,
Rectangle iconRect,
Rectangle textRect)
Since this method is called from the superclass, do nothing when tab is not visible |
protected void |
paintTabBorder(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(Graphics g,
int tabPlacement,
Font font,
FontMetrics metrics,
int tabIndex,
String title,
Rectangle textRect,
boolean isSelected)
|
void |
setLastTabVisible(boolean lastTabVisible)
|
protected void |
setTabPlacementOffset(int offset)
|
protected void |
uninstallComponents()
Remove the browsebuttons |
protected void |
uninstallListeners()
Remove the browsebutton listeners |
void |
uninstallUI(JComponent c)
|
| 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 GeneralPath brokenLine
protected GeneralPath brokenFill
protected BufferedImage gradientBackground
protected BufferedImage gradientSelectedBackground
protected int selectionExtraHeight
protected ActionListener[] buttonListeners
| Constructor Detail |
|---|
public UICTabbedPaneUI()
| Method Detail |
|---|
public static ComponentUI createUI(JComponent comp)
public void installUI(JComponent c)
installUI in class BasicTabbedPaneUIpublic void uninstallUI(JComponent c)
uninstallUI in class BasicTabbedPaneUIprotected MouseListener createMouseListener()
createMouseListener in class BasicTabbedPaneUIprotected ChangeListener createChangeListener()
createChangeListener in class BasicTabbedPaneUIprotected LayoutManager createLayoutManager()
createLayoutManager in class MetalTabbedPaneUIprotected void installComponents()
installComponents in class BasicTabbedPaneUIprotected void uninstallComponents()
uninstallComponents in class BasicTabbedPaneUIprotected void installListeners()
installListeners in class BasicTabbedPaneUIprotected int getTabPlacementOffset()
protected void setTabPlacementOffset(int offset)
protected int getBrowseOffset()
protected void uninstallListeners()
uninstallListeners in class BasicTabbedPaneUI
public void paint(Graphics g,
JComponent c)
paint in class MetalTabbedPaneUIprotected Insets getTabAreaInsets(int tabPlacement)
getTabAreaInsets in class BasicTabbedPaneUIprotected void ensureCurrentLayout()
protected FontMetrics getFontMetrics()
getFontMetrics in class BasicTabbedPaneUIprotected int getVisibleOffset(int index)
public void setLastTabVisible(boolean lastTabVisible)
public boolean isLastTabVisible()
public Dimension getButtonPreferredSize()
protected void paintTab(Graphics g,
int tabPlacement,
Rectangle[] rects,
int tabIndex,
Rectangle iconRect,
Rectangle textRect)
paintTab in class BasicTabbedPaneUI
protected void paintFocusIndicator(Graphics g,
int tabPlacement,
Rectangle[] rects,
int tabIndex,
Rectangle iconRect,
Rectangle textRect,
boolean isSelected)
paintFocusIndicator in class MetalTabbedPaneUI
protected void paintTabBorder(Graphics g,
int tabPlacement,
int tabIndex,
int x,
int y,
int w,
int h,
boolean isSelected)
paintTabBorder in class MetalTabbedPaneUI
protected void paintText(Graphics g,
int tabPlacement,
Font font,
FontMetrics metrics,
int tabIndex,
String title,
Rectangle textRect,
boolean isSelected)
paintText in class BasicTabbedPaneUI
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||