|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.plaf.ComponentUI javax.swing.plaf.TabbedPaneUI javax.swing.plaf.basic.BasicTabbedPaneUI javax.swing.plaf.metal.MetalTabbedPaneUI uic.themes.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 inherited from class javax.swing.plaf.metal.MetalTabbedPaneUI |
MetalTabbedPaneUI.TabbedPaneLayout |
Nested classes 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 |
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)
public void uninstallUI(JComponent c)
protected MouseListener createMouseListener()
protected ChangeListener createChangeListener()
protected LayoutManager createLayoutManager()
protected void installComponents()
protected void uninstallComponents()
protected void installListeners()
protected int getTabPlacementOffset()
protected void setTabPlacementOffset(int offset)
protected int getBrowseOffset()
protected void uninstallListeners()
public void paint(Graphics g, JComponent c)
protected Insets getTabAreaInsets(int tabPlacement)
protected void ensureCurrentLayout()
protected FontMetrics getFontMetrics()
protected 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)
protected void paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
protected void paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
protected void paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |