WidgetFactory

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.ctdp.rfdynhud.widgets.base.widget
Class WidgetFactory

    java.lang.Object
      net.ctdp.rfdynhud.widgets.base.widget.WidgetFactory

    public class WidgetFactory

extends java.lang.Object

Creates `Widget` instances by class name.

Author:
  Marvin Froehlich (CTDP)

Method Summary
`static AbstractAssembledWidget` | `createAssembledWidget(java.lang.String className, java.lang.String name)` Creates a new `Widget` instance.
`static Widget` | `createWidget(java.lang.Class<Widget> clazz, java.lang.String name)` Creates a new `Widget` instance.
`static Widget` | `createWidget(java.lang.Class<Widget> clazz, WidgetsConfiguration widgetsConfig)` Creates a new `Widget` instance.
`static Widget` | `createWidget(java.lang.String className, java.lang.String name)` Creates a new `Widget` instance.
`static Widget` | `createWidget(java.lang.String className, WidgetsConfiguration widgetsConfig)` Creates a new `Widget` instance.
`static java.lang.Class<Widget>` | `getWidgetClass(java.lang.String className)` Gets the `Widget` `Class` instance.
`static java.lang.Class<Widget>[]` | `getWidgetClasses()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getWidgetClasses

    public static final java.lang.Class<Widget>[] getWidgetClasses()

### getWidgetClass

    public static java.lang.Class<Widget> getWidgetClass(java.lang.String className)

  Gets the `Widget` `Class` instance.

  Parameters:
    `className` - the `Widget` class name
  Returns:
    the `Widget` `Class` instance or `null` on error.

### createWidget

    public static Widget createWidget(java.lang.Class<Widget> clazz,
                                      java.lang.String name)

  Creates a new `Widget` instance.

  Parameters:
    `clazz` - the `Widget` class
    `name` - the name to be given to the new `Widget` or `null`
  Returns:
    the create `Widget` or `null` on error.

### createWidget

    public static Widget createWidget(java.lang.Class<Widget> clazz,
                                      WidgetsConfiguration widgetsConfig)

  Creates a new `Widget` instance.

  Parameters:
    `clazz` - the `Widget` class
    `widgetsConfig` - the `WidgetsConfiguration` to search a free name in
  Returns:
    the create `Widget` or `null` on error.

### createWidget

    public static Widget createWidget(java.lang.String className,
                                      java.lang.String name)

  Creates a new `Widget` instance.

  Parameters:
    `className` - the `Widget` class name
    `name` - the name to be given to the new `Widget` or `null`
  Returns:
    the create `Widget` or `null` on error.

### createWidget

    public static Widget createWidget(java.lang.String className,
                                      WidgetsConfiguration widgetsConfig)

  Creates a new `Widget` instance.

  Parameters:
    `className` - the `Widget` class name
    `widgetsConfig` - the `WidgetsConfiguration` to search a free name in
  Returns:
    the create `Widget` or `null` on error.

### createAssembledWidget

    public static AbstractAssembledWidget createAssembledWidget(java.lang.String className,
                                                                java.lang.String name)

  Creates a new `Widget` instance.

  Parameters:
    `className` - the `Widget` class name
    `name` - the name to be given to the new `Widget` or `null`
  Returns:
    the create `Widget` or `null` on error.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD