com.creamtec.ajaxswing.v4.utils

## Class ComponentUtils

- java.lang.Object
- - com.creamtec.ajaxswing.v4.utils.ComponentUtils

-     public class ComponentUtils
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ComponentUtils()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.awt.Component` | `findChildOfClass(java.awt.Container container, java.lang.Class cls)` Finds a child of the given class anywhere down the containment tree
    `static java.awt.Container` | `getActiveWindow()` Returns window that is supposed to receive user focus
    `static java.lang.String` | `getCssClasses(java.awt.Component comp)` Returns CSS class string for specified component, includes component class name (likeMyPanel_1 or JButton) for base customization, classes used by AjaxSwing javascript code (like window, modal, JDividerEnabledVertical)
    `static FileOpener` | `getFileOpener(java.awt.Component component)` Deprecated.
    `static java.util.Map<java.lang.String,java.lang.String>` | `getHtmlAttributes(javax.swing.JComponent component)` Deprecated. HTML attributes specified for Swing component are automatically appended to the rendered HTML element that represents the component. For instance, calling ComponentUtils.getHtmlAttributes(myButton).put("tabindex", "1") for a button that is represented with HTML element will result in the following HTML HTML attribute being added
    `static java.lang.String` | `getWindowTitle(java.awt.Component comp)`
    `static boolean` | `isHeavyPanel(java.awt.Component comp)` Check that component is heavy panel
    `static boolean` | `isTitledPane(java.lang.Object comp)`
    `static boolean` | `isWindow(java.awt.Component comp)`
    `static void` | `setFileOpener(javax.swing.JComponent component, FileOpener fileOpener)` Deprecated.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ComponentUtils

          public ComponentUtils()

  - ### Method Detail

    - #### findChildOfClass

          public static java.awt.Component findChildOfClass(java.awt.Container container,
                                            java.lang.Class cls)

      Finds a child of the given class anywhere down the containment tree
      Returns:
        child component if found, null otherwise

    - #### getActiveWindow

          public static java.awt.Container getActiveWindow()

      Returns window that is supposed to receive user focus

    - #### isHeavyPanel

          public static boolean isHeavyPanel(java.awt.Component comp)

      Check that component is heavy panel
      Parameters:
        `comp` - - component to be checked
      Returns:
        is component is heavy panel

    - #### getCssClasses

          public static java.lang.String getCssClasses(java.awt.Component comp)

      Returns CSS class string for specified component, includes component class name (likeMyPanel_1 or JButton) for base customization, classes used by AjaxSwing javascript code (like window, modal, JDividerEnabledVertical)
      Parameters:
        `comp` -

    - #### getFileOpener

          public static FileOpener getFileOpener(java.awt.Component component)

      Deprecated.

    - #### getHtmlAttributes

          public static java.util.Map<java.lang.String,java.lang.String> getHtmlAttributes(javax.swing.JComponent component)

      Deprecated. HTML attributes specified for Swing component are automatically appended to the rendered HTML element that represents the component. For instance, calling ComponentUtils.getHtmlAttributes(myButton).put("tabindex", "1") for a button that is represented with HTML element will result in the following HTML HTML attribute being added
      Parameters:
        `component` -
      Returns:
        map of HTML attributes associated with the given component

    - #### getWindowTitle

          public static java.lang.String getWindowTitle(java.awt.Component comp)

    - #### isTitledPane

          public static boolean isTitledPane(java.lang.Object comp)

    - #### isWindow

          public static boolean isWindow(java.awt.Component comp)

    - #### setFileOpener

          public static void setFileOpener(javax.swing.JComponent component,
                           FileOpener fileOpener)

      Deprecated.

Copyright © 2000-2012 CreamTec LLC. All Rights Reserved.