org.csstudio.opibuilder.scriptUtil

## Class WidgetUtil

- java.lang.Object
- - org.csstudio.opibuilder.scriptUtil.WidgetUtil

-     public class WidgetUtil
      extends java.lang.Object

  The Utility Class to help managing widgets.
  Author:
    Xihui Chen

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WidgetUtil()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static org.csstudio.opibuilder.model.AbstractWidgetModel` | `createWidgetModel(java.lang.String widgetTypeID)` Create a new widget model with the give widget type ID.

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

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

- - ### Constructor Detail

    - #### WidgetUtil

          public WidgetUtil()

  - ### Method Detail

    - #### createWidgetModel

          public static org.csstudio.opibuilder.model.AbstractWidgetModel createWidgetModel(java.lang.String widgetTypeID)
                                                                                     throws java.lang.Exception

      Create a new widget model with the give widget type ID.
      Parameters:
        `widgetTypeID` - type ID of the widget. You can get the typeID of a widget by opening an OPI with this widget in text editor.
      Returns:
        the widget model.
      Throws:
        `java.lang.Exception` - if the widget type ID does not exist.