站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

SlidingTabDisplayerButtonUI (Tab Control) - NetBeans API Javadoc (Current Development Version)

org.netbeans.swing.tabcontrol 1.8

org.netbeans.swing.tabcontrol.plaf
Class SlidingTabDisplayerButtonUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.ButtonUI
          extended by javax.swing.plaf.basic.BasicButtonUI
              extended by javax.swing.plaf.basic.BasicToggleButtonUI
                  extended by org.netbeans.swing.tabcontrol.plaf.SlidingTabDisplayerButtonUI
Direct Known Subclasses:
SlidingTabDisplayerButtonUI.Aqua

public class SlidingTabDisplayerButtonUI
extends BasicToggleButtonUI

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.

See Also:
BasicSlidingTabDisplayerUI, TabbedContainer.TYPE_SLIDING

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

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
Overridden to not install keyboard actions (the buttons aren't focusable anyway) and not invoke the overhead of BasicHTML

Overrides:
installUI in class BasicButtonUI

installBorder

protected void installBorder(AbstractButton b)
Install a border on the button


uninstallUI

public void uninstallUI(JComponent c)
Overridden to not uninstall keyboard actions (the buttons aren't focusable anyway) and not invoke the overhead of BasicHTML

Overrides:
uninstallUI in class BasicButtonUI

installDefaults

public void installDefaults(AbstractButton b)
Overridden to not call super.installDefaults() and only set the button to be non-focusable

Overrides:
installDefaults in class BasicButtonUI

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class BasicButtonUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class BasicButtonUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class BasicButtonUI

paint

public final void paint(Graphics g,
                        JComponent c)
Provides the painting logic. Note that this does not call any of the painting methods of BasicToggleButtonUI

Overrides:
paint in class BasicToggleButtonUI

paintBackground

protected void paintBackground(Graphics2D g,
                               BasicSlidingTabDisplayerUI.IndexButton b)
Paints the tab background


paintIconAndText

protected final void paintIconAndText(Graphics2D g,
                                      BasicSlidingTabDisplayerUI.IndexButton b,
                                      Object orientation)
Paints the icon and text using the HTML mini renderer


org.netbeans.swing.tabcontrol 1.8

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.