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

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

org.netbeans.swing.tabcontrol 1.8

org.netbeans.swing.tabcontrol
Class SlidingButtonUI

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.SlidingButtonUI
Direct Known Subclasses:
AquaSlidingButtonUI, GtkSlidingButtonUI, MetalSlidingButtonUI, WindowsSlidingButtonUI

public class SlidingButtonUI
extends BasicToggleButtonUI

Button UI for SlidingButton component that can paint rotated text. To change appearance, provide a subclass of this class or subclass of ComponentUI and register it via UIDefaults in standard Swing way. Typically the methods of interest when subclassing are paintBackground and paintIconAndText.

Instances of this class should be stateless, taking all data from model, such that a single instance can manage any number of buttons.

See Also:
SlidingButton

Field Summary
 
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
 
Constructor Summary
protected SlidingButtonUI()
          Private, no need for outer classes to instantiate
 
Method Summary
static ComponentUI createUI(JComponent c)
           
 Dimension getMaximumSize(JComponent c)
           
 Dimension getMinimumSize(JComponent c)
           
 Dimension getPreferredSize(JComponent c)
           
protected  String getPropertyPrefix()
           
 void paint(Graphics g, JComponent c)
           
protected  void paintBackground(Graphics2D g, AbstractButton b)
           
 
Methods inherited from class javax.swing.plaf.basic.BasicToggleButtonUI
getTextShiftOffset, paintIcon
 
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, createButtonListener, getDefaultTextIconGap, installDefaults, installKeyboardActions, installListeners, installUI, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
 
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
 

Constructor Detail

SlidingButtonUI

protected SlidingButtonUI()
Private, no need for outer classes to instantiate

Method Detail

createUI

public static ComponentUI createUI(JComponent c)

getPropertyPrefix

protected String getPropertyPrefix()
Overrides:
getPropertyPrefix in class BasicToggleButtonUI

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class BasicToggleButtonUI

paintBackground

protected void paintBackground(Graphics2D g,
                               AbstractButton b)

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

org.netbeans.swing.tabcontrol 1.8

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