FileDocCategorySizeDatePackage
WindowsUtils.javaAPI DocJava SE 5 API2044Fri Aug 26 14:54:50 BST 2005com.sun.java.swing.plaf.windows

WindowsUtils

public class WindowsUtils extends Object
This is a collection of utility methods needed by the Windows L&F
version
1.9 04/16/04
author
Brian Beck

Fields Summary
Constructors Summary
Methods Summary
static booleanisLeftToRight(java.awt.Component c)

        return c.getComponentOrientation().isLeftToRight();
    
static voidrepaintMnemonicsInContainer(java.awt.Container cont)

        Component c;
        for(int i=0; i<cont.getComponentCount(); i++) {
            c = cont.getComponent(i);
            if(c == null || !c.isVisible()) {
                continue;
            }
            if(c instanceof AbstractButton
               && ((AbstractButton)c).getMnemonic() != '\0") {
                c.repaint();
                continue;
            } else if(c instanceof JLabel
                      && ((JLabel)c).getDisplayedMnemonic() != '\0") {
                c.repaint();
                continue;
            }
            if(c instanceof Container) {
                repaintMnemonicsInContainer((Container)c);
            }
        }
    
static voidrepaintMnemonicsInWindow(java.awt.Window w)

        if(w == null || !w.isShowing()) {
            return;
        }

        Window[] ownedWindows = w.getOwnedWindows();
        for(int i=0;i<ownedWindows.length;i++) {
            repaintMnemonicsInWindow(ownedWindows[i]);
        }

        repaintMnemonicsInContainer(w);