public class DynamicWidgetFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<java.lang.String,java.lang.Class<? extends GenericWidget>> |
widgetFactory
A map of widget names to their widget classes.
|
Constructor and Description |
---|
DynamicWidgetFactory() |
Modifier and Type | Method and Description |
---|---|
static void |
create(java.lang.String widgetType,
handle h)
Create a widget, using the given widget type.
|
static void |
create(java.lang.String widgetType,
handle h,
character widgetPool)
Create a widget, using the given widget type.
|
static void |
create(java.lang.String widgetType,
handle h,
java.lang.String widgetPool)
Create a widget, using the given widget type.
|
static void |
createBrowse(handle h)
Create a BROWSE widget and save it in the given handle and in the unnamed pool, if
available.
|
static void |
createBrowse(handle h,
character widgetPool)
Create a BROWSE widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createBrowse(handle h,
java.lang.String widgetPool)
Create a BROWSE widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createButton(handle h)
Create a BUTTON widget and save it in the given handle and in the unnamed pool, if
available.
|
static void |
createButton(handle h,
character widgetPool)
Create a BUTTON widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createButton(handle h,
java.lang.String widgetPool)
Create a BUTTON widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createComboBox(handle h)
Create a COMBO-BOX widget and save it in the given handle and in the unnamed pool, if
available.
|
static void |
createComboBox(handle h,
character widgetPool)
Create a COMBO-BOX widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createComboBox(handle h,
java.lang.String widgetPool)
Create a COMBO-BOX widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createControlFrame(handle h)
Create a CONTROL-FRAME widget and save it in the given handle and in the unnamed pool, if
available.
|
static void |
createControlFrame(handle h,
character widgetPool)
Create a CONTROL-FRAME widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createControlFrame(handle h,
java.lang.String widgetPool)
Create a CONTROL-FRAME widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createDialogBox(handle h)
Create a DIALOG-BOX widget and save it in the given handle and in the unnamed pool, if
available.
|
static void |
createDialogBox(handle h,
character widgetPool)
Create a DIALOG-BOX widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createDialogBox(handle h,
java.lang.String widgetPool)
Create a DIALOG-BOX widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createEditor(handle h)
Create a EDITOR widget and save it in the given handle and in the unnamed pool, if
available.
|
static void |
createEditor(handle h,
character widgetPool)
Create a EDITOR widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createEditor(handle h,
java.lang.String widgetPool)
Create a EDITOR widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createFillIn(handle h)
Create a FILL-IN widget and save it in the given handle and in the unnamed pool, if
available.
|
static void |
createFillIn(handle h,
character widgetPool)
Create a FILL-IN widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createFillIn(handle h,
java.lang.String widgetPool)
Create a FILL-IN widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createFrame(handle h)
Create a FRAME widget and save it in the given handle and in the unnamed pool, if
available.
|
static void |
createFrame(handle h,
character widgetPool)
Create a FRAME widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createFrame(handle h,
java.lang.String widgetPool)
Create a FRAME widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createImage(handle h)
Create a IMAGE widget and save it in the given handle and in the unnamed pool, if
available.
|
static void |
createImage(handle h,
character widgetPool)
Create a IMAGE widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createImage(handle h,
java.lang.String widgetPool)
Create a IMAGE widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createMenu(handle h)
Create a MENU widget and save it in the given handle and in the unnamed pool, if
available.
|
static void |
createMenu(handle h,
character widgetPool)
Create a MENU widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createMenu(handle h,
java.lang.String widgetPool)
Create a MENU widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createMenuItem(handle h)
Create a MENU-ITEM widget and save it in the given handle and in the unnamed pool, if
available.
|
static void |
createMenuItem(handle h,
character widgetPool)
Create a MENU-ITEM widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createMenuItem(handle h,
java.lang.String widgetPool)
Create a MENU-ITEM widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createRadioSet(handle h)
Create a RADIO-SET widget and save it in the given handle and in the unnamed pool, if
available.
|
static void |
createRadioSet(handle h,
character widgetPool)
Create a RADIO-SET widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createRadioSet(handle h,
java.lang.String widgetPool)
Create a RADIO-SET widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createRectangle(handle h)
Create a RECTANGLE widget and save it in the given handle and in the unnamed pool, if
available.
|
static void |
createRectangle(handle h,
character widgetPool)
Create a RECTANGLE widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createRectangle(handle h,
java.lang.String widgetPool)
Create a RECTANGLE widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createSelectionList(handle h)
Create a SELECTION-LIST widget and save it in the given handle and in the unnamed pool, if
available.
|
static void |
createSelectionList(handle h,
character widgetPool)
Create a SELECTION-LIST widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createSelectionList(handle h,
java.lang.String widgetPool)
Create a SELECTION-LIST widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createSlider(handle h)
Create a SLIDER widget and save it in the given handle and in the unnamed pool, if
available.
|
static void |
createSlider(handle h,
character widgetPool)
Create a SLIDER widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createSlider(handle h,
java.lang.String widgetPool)
Create a SLIDER widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createSubMenu(handle h)
Create a SUB-MENU widget and save it in the given handle and in the unnamed pool, if
available.
|
static void |
createSubMenu(handle h,
character widgetPool)
Create a SUB-MENU widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createSubMenu(handle h,
java.lang.String widgetPool)
Create a SUB-MENU widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createText(handle h)
Create a TEXT widget and save it in the given handle and in the unnamed pool, if
available.
|
static void |
createText(handle h,
character widgetPool)
Create a TEXT widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createText(handle h,
java.lang.String widgetPool)
Create a TEXT widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createToggleBox(handle h)
Create a TOGGLE-BOX widget and save it in the given handle and in the unnamed pool, if
available.
|
static void |
createToggleBox(handle h,
character widgetPool)
Create a TOGGLE-BOX widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createToggleBox(handle h,
java.lang.String widgetPool)
Create a TOGGLE-BOX widget and save it in the given handle and in the specified pool
(which can be the unnamed pool if
widgetPool is null). |
static void |
createWindow(handle h)
Create a WINDOW widget and save it in the given handle and in the unnamed pool, if
available.
|
static void |
createWindow(handle h,
character widgetPool)
Create a WINDOW widget and save it in the given handle and in the specified pool (which can
be the unnamed pool if
widgetPool is null). |
static void |
createWindow(handle h,
java.lang.String widgetPool)
Create a WINDOW widget and save it in the given handle and in the specified pool (which can
be the unnamed pool if
widgetPool is null). |
private static boolean |
isAbleToCreateWindow()
Checks if it is possible to create new window.
|
static void |
pushScreenLock(handle h)
Lock the specified handle and any attribute assignments are cached until
lock is released. |
static void |
pushScreenUnlock(handle h)
Unlock the specified handle and push any pending changes to the client-side.
|
private static final java.util.Map<java.lang.String,java.lang.Class<? extends GenericWidget>> widgetFactory
public static void create(java.lang.String widgetType, handle h)
If the widgetType
is one of the above strings, the appropriate factory API to
create the widget will be called.
If available, the widget will be saved in the unnamed widget pool.
widgetType
- The widget type. Must be not-null.h
- A handle where to save the create widget. Must be not-null.public static void create(java.lang.String widgetType, handle h, java.lang.String widgetPool)
If the widgetType
is one of the above strings, the appropriate factory API to
create the widget will be called.
If available, the widget will be saved in the unnamed widget pool.
widgetType
- The widget type. Must be not-null.h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void create(java.lang.String widgetType, handle h, character widgetPool)
If the widgetType
is one of the above strings, the appropriate factory API to
create the widget will be called.
If available, the widget will be saved in the unnamed widget pool.
widgetType
- The widget type. Must be not-null.h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createButton(handle h)
h
- A handle where to save the create widget. Must be not-null.public static void createButton(handle h, java.lang.String widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createButton(handle h, character widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createComboBox(handle h)
h
- A handle where to save the create widget. Must be not-null.public static void createComboBox(handle h, java.lang.String widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createComboBox(handle h, character widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createControlFrame(handle h)
h
- A handle where to save the create widget. Must be not-null.public static void createControlFrame(handle h, java.lang.String widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createControlFrame(handle h, character widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createDialogBox(handle h)
h
- A handle where to save the create widget. Must be not-null.public static void createDialogBox(handle h, java.lang.String widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createDialogBox(handle h, character widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createEditor(handle h)
h
- A handle where to save the create widget. Must be not-null.public static void createEditor(handle h, java.lang.String widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createEditor(handle h, character widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createFillIn(handle h)
h
- A handle where to save the create widget. Must be not-null.public static void createFillIn(handle h, java.lang.String widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createFillIn(handle h, character widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createFrame(handle h)
h
- A handle where to save the create widget. Must be not-null.public static void createFrame(handle h, java.lang.String widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createFrame(handle h, character widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createImage(handle h)
h
- A handle where to save the create widget. Must be not-null.public static void createImage(handle h, java.lang.String widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createImage(handle h, character widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createMenu(handle h)
h
- A handle where to save the create widget. Must be not-null.public static void createMenu(handle h, java.lang.String widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createMenu(handle h, character widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createMenuItem(handle h)
h
- A handle where to save the create widget. Must be not-null.public static void createMenuItem(handle h, java.lang.String widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createMenuItem(handle h, character widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createRadioSet(handle h)
h
- A handle where to save the create widget. Must be not-null.public static void createRadioSet(handle h, java.lang.String widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createRadioSet(handle h, character widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createRectangle(handle h)
h
- A handle where to save the create widget. Must be not-null.public static void createRectangle(handle h, java.lang.String widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createRectangle(handle h, character widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createSelectionList(handle h)
h
- A handle where to save the create widget. Must be not-null.public static void createSelectionList(handle h, java.lang.String widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createSelectionList(handle h, character widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createSlider(handle h)
h
- A handle where to save the create widget. Must be not-null.public static void createSlider(handle h, java.lang.String widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createSlider(handle h, character widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createSubMenu(handle h)
h
- A handle where to save the create widget. Must be not-null.public static void createSubMenu(handle h, java.lang.String widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createSubMenu(handle h, character widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createText(handle h)
h
- A handle where to save the create widget. Must be not-null.public static void createText(handle h, java.lang.String widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createText(handle h, character widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createToggleBox(handle h)
h
- A handle where to save the create widget. Must be not-null.public static void createToggleBox(handle h, java.lang.String widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createToggleBox(handle h, character widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createWindow(handle h)
h
- A handle where to save the create widget. Must be not-null.public static void createWindow(handle h, java.lang.String widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createWindow(handle h, character widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void pushScreenUnlock(handle h)
h
- The widget handle to unlock.java.lang.IllegalArgumentException
- If the handle is not a valid, widget handle. This is a P2J-specific API so any
miss-usage is not allowed.public static void pushScreenLock(handle h)
lock
is released.h
- The widget handle to lock.java.lang.IllegalArgumentException
- If the handle is not a valid, widget handle. This is a P2J-specific API so any
miss-usage is not allowed.public static void createBrowse(handle h)
h
- A handle where to save the create widget. Must be not-null.public static void createBrowse(handle h, java.lang.String widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.public static void createBrowse(handle h, character widgetPool)
widgetPool
is null).h
- A handle where to save the create widget. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the unnamed
widget pool will be used.private static boolean isAbleToCreateWindow()
TRUE
- creation is possible,
FALSE
- otherwise