public class SlidingTabDisplayerButtonUI extends BasicToggleButtonUI
BasicSlidingTabDisplayerUI
.
Uses the lightweight HTML renderer for good performance when rendering HTML strings. It is
intended as a UI for BasicSlidingTabDisplayerUI.IndexButton
. Provide a subclass
of this class via UIDefaults to change the painting behavior or appearance of the tab buttons in
"sliding" style tabbed controls. Typically the only method of interest when
subclassing is SlidingTabDisplayerButtonUI.paintBackground(java.awt.Graphics2D, org.netbeans.swing.tabcontrol.plaf.BasicSlidingTabDisplayerUI.IndexButton)
.
As with its superclass BasicToggleButtonUI
, instances of this class should be stateless,
such that a single instance can manage any number of buttons.
Modifier and Type | Class and Description |
---|---|
static class |
SlidingTabDisplayerButtonUI.Aqua
Deprecated.
No brushed metal look and feel doesn't need this class anymore.
|
defaultTextIconGap, defaultTextShiftOffset
Modifier | Constructor and Description |
---|---|
protected |
SlidingTabDisplayerButtonUI()
Creates a new instance of SlidingTabDisplayerButtonUI
|
Modifier and Type | Method and Description |
---|---|
static ComponentUI |
createUI(JComponent c) |
Dimension |
getMaximumSize(JComponent c) |
Dimension |
getMinimumSize(JComponent c) |
Dimension |
getPreferredSize(JComponent c) |
protected void |
installBorder(AbstractButton b)
Install a border on the button
|
void |
installDefaults(AbstractButton b)
Overridden to not call super.installDefaults() and only set the button
to be non-focusable
|
void |
installUI(JComponent c)
Overridden to not install keyboard actions (the buttons aren't focusable
anyway) and not invoke the overhead of BasicHTML
|
void |
paint(Graphics g,
JComponent c)
Provides the painting logic.
|
protected void |
paintBackground(Graphics2D g,
BasicSlidingTabDisplayerUI.IndexButton b)
Paints the tab background
|
protected void |
paintIconAndText(Graphics2D g,
BasicSlidingTabDisplayerUI.IndexButton b,
Object orientation)
Paints the icon and text using the HTML mini renderer
|
void |
uninstallUI(JComponent c)
Overridden to not uninstall keyboard actions (the buttons aren't focusable
anyway) and not invoke the overhead of BasicHTML
|
getPropertyPrefix, getTextShiftOffset, paintIcon
clearTextShiftOffset, createButtonListener, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, installKeyboardActions, installListeners, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallListeners
contains, getAccessibleChild, getAccessibleChildrenCount, update
protected SlidingTabDisplayerButtonUI()
public static ComponentUI createUI(JComponent c)
public void installUI(JComponent c)
installUI
in class BasicButtonUI
protected void installBorder(AbstractButton b)
public void uninstallUI(JComponent c)
uninstallUI
in class BasicButtonUI
public void installDefaults(AbstractButton b)
installDefaults
in class BasicButtonUI
public Dimension getMinimumSize(JComponent c)
getMinimumSize
in class BasicButtonUI
public Dimension getPreferredSize(JComponent c)
getPreferredSize
in class BasicButtonUI
public Dimension getMaximumSize(JComponent c)
getMaximumSize
in class BasicButtonUI
public final void paint(Graphics g, JComponent c)
paint
in class BasicToggleButtonUI
protected void paintBackground(Graphics2D g, BasicSlidingTabDisplayerUI.IndexButton b)
protected final void paintIconAndText(Graphics2D g, BasicSlidingTabDisplayerUI.IndexButton b, Object orientation)