|
org.netbeans.swing.tabcontrol 1.8 | |||||||||
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.ButtonUI
javax.swing.plaf.basic.BasicButtonUI
javax.swing.plaf.basic.BasicToggleButtonUI
org.netbeans.swing.tabcontrol.plaf.SlidingTabDisplayerButtonUI
public class SlidingTabDisplayerButtonUI
Button UI that can paint rotated text, which is used by 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 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.
Nested Class Summary | |
---|---|
static class |
SlidingTabDisplayerButtonUI.Aqua
Aqua ui for sliding buttons. |
Field Summary |
---|
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI |
---|
defaultTextIconGap, defaultTextShiftOffset |
Method Summary | |
---|---|
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 |
Methods inherited from class javax.swing.plaf.basic.BasicToggleButtonUI |
---|
getPropertyPrefix, getTextShiftOffset, paintIcon |
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI |
---|
clearTextShiftOffset, createButtonListener, getDefaultTextIconGap, installKeyboardActions, installListeners, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallListeners |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, getAccessibleChild, getAccessibleChildrenCount, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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)
|
org.netbeans.swing.tabcontrol 1.8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |