JavaTM 2 Platform
Std. Ed. v1.3

javax.swing.plaf
Class ComponentUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
Direct Known Subclasses:
ButtonUI, ColorChooserUI, ComboBoxUI, DesktopIconUI, DesktopPaneUI, FileChooserUI, InternalFrameUI, LabelUI, ListUI, MenuBarUI, OptionPaneUI, PanelUI, PopupMenuUI, ProgressBarUI, RootPaneUI, ScrollBarUI, ScrollPaneUI, SeparatorUI, SliderUI, SplitPaneUI, TabbedPaneUI, TableHeaderUI, TableUI, TextUI, ToolBarUI, ToolTipUI, TreeUI, ViewportUI

public abstract class ComponentUI
extends Object


Constructor Summary
ComponentUI()
           
 
Method Summary
 boolean contains(JComponent c, int x, int y)
           
static ComponentUI createUI(JComponent c)
           
 Accessible getAccessibleChild(JComponent c, int i)
          Return the nth Accessible child of the object.
 int getAccessibleChildrenCount(JComponent c)
          Returns the number of accessible children in the object.
 Dimension getMaximumSize(JComponent c)
           
 Dimension getMinimumSize(JComponent c)
           
 Dimension getPreferredSize(JComponent c)
           
 void installUI(JComponent c)
           
 void paint(Graphics g, JComponent c)
           
 void uninstallUI(JComponent c)
           
 void update(Graphics g, JComponent c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentUI

public ComponentUI()
Method Detail

installUI

public void installUI(JComponent c)

uninstallUI

public void uninstallUI(JComponent c)

paint

public void paint(Graphics g,
                  JComponent c)

update

public void update(Graphics g,
                   JComponent c)

getPreferredSize

public Dimension getPreferredSize(JComponent c)

getMinimumSize

public Dimension getMinimumSize(JComponent c)

getMaximumSize

public Dimension getMaximumSize(JComponent c)

contains

public boolean contains(JComponent c,
                        int x,
                        int y)

createUI

public static ComponentUI createUI(JComponent c)

getAccessibleChildrenCount

public int getAccessibleChildrenCount(JComponent c)
Returns the number of accessible children in the object. If all of the children of this object implement Accessible, than this method should return the number of children of this object. UI's might wish to override this if they present areas on the screen that can be viewed as components, but actual components are not used for presenting those areas. Note: as of the Java 2 platform v1.3, it is recommended that developers call Component.AccessibleAWTComponent.getAccessibleChildrenCount() instead of using this method.
Returns:
the number of accessible children in the object.
See Also:
getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild

public Accessible getAccessibleChild(JComponent c,
                                     int i)
Return the nth Accessible child of the object. UI's might wish to override this if they present areas on the screen that can be viewed as components, but actual components are not used for presenting those areas. Note: as of the Java 2 platform v1.3, it is recommended that developers call Component.AccessibleAWTComponent.getAccessibleChild() instead of using this method.
Parameters:
i - zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
getAccessibleChildrenCount(javax.swing.JComponent)

JavaTM 2 Platform
Std. Ed. v1.3

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.