public class DMXAndroidViewManager extends AbstractViewManager
DMXViewManager
for
Android platform. This implementation should be able to handle registering
views with activities in a manner consistent with the rest of the framework.Modifier and Type | Field and Description |
---|---|
static String |
DMX_ANDROID_ROOT_VIEW
Name of the root view.
|
adapter, localeListeners, registeredViews
PARAM_DIALOG_TITLE, PARAM_PROGRESS_DIALOG, PARAM_VIEW_STATE, VAL_DLG_CLOSE, VAL_DLG_SHOW
Constructor and Description |
---|
DMXAndroidViewManager(DMXMainActivity activity,
DMXDefaultAdapter adapter)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
blockGui(boolean state,
GUIBlockingScope scope,
String... ids)
Block or unblock GUI based on specified parameters.
|
DMXAndroidDialogFactory |
getDialogFactory()
Retrieves dialog factory for the underlying platform.
|
void |
handleLocaleChange()
Invoked when application locale is changed.
|
protected void |
processDeferredViews(String parentId,
Set<String> childrenIds)
Called to complete registration of deferred views.
|
void |
registerEventHandler(DMXEventRegistrationHandler handler)
Registers event handler for UI components.
|
DMXView |
registerView(Class clazz)
Register view from specified class.
|
void |
registerView(DMXView view)
Registers specified view for management by this view manager.
|
void |
selectView(String viewId,
Map<String,Object> params)
Selects active view for display.
|
void |
setViewExtensionCallback(String viewId,
DMXExtensionCallback callback)
Sets extension callback of view with specified ID.
|
void |
updateView(String viewId,
Map<String,Object> dataValues)
Forces specified view to render itself due to change in model data.
|
void |
updateViewData(Map<String,Object> dataMap)
Updates views that depends on specified data.
|
afterInitialViewRegistration, getView, getViewDataIds, getViewIdsForData, handleExtensionData
public static final String DMX_ANDROID_ROOT_VIEW
public DMXAndroidViewManager(DMXMainActivity activity, DMXDefaultAdapter adapter)
activity
- main activityadapter
- adapter instanceprotected void processDeferredViews(String parentId, Set<String> childrenIds)
AbstractViewManager
processDeferredViews
in class AbstractViewManager
parentId
- registered parent viewchildrenIds
- ids of dependent viewspublic void selectView(String viewId, Map<String,Object> params)
Selects active view for display. If view is a dialog, it will be displayed within popup window.
Parameter params
controls the way view will be displayed. The following values are taken into account
by this implementation:
DMXViewManager.PARAM_PROGRESS_DIALOG
, with values DMXViewManager.VAL_DLG_SHOW
or DMXViewManager.VAL_DLG_CLOSE
.
If VAL_DLG_SHOW
is specified, dialog will be displayed. Otherwise, it will be closed.viewId
- view IDparams
- optional parametersDMXViewManager.selectView(java.lang.String, java.util.Map)
public void updateView(String viewId, Map<String,Object> dataValues)
DMXViewManager
#selectView()
method, the view does not become active.viewId
- ID of the view to updatedataValues
- new data values to set for viewpublic void updateViewData(Map<String,Object> dataMap)
DMXViewManager
dataMap
- data mappublic final void registerView(DMXView view)
AbstractViewManager
registerView
in interface DMXViewManager
registerView
in class AbstractViewManager
view
- view to registerpublic DMXView registerView(Class clazz)
DMXViewManager
registerView
in interface DMXViewManager
registerView
in class AbstractViewManager
clazz
- class objectnull
if not successfulpublic void handleLocaleChange()
DMXViewManager
public void blockGui(boolean state, GUIBlockingScope scope, String... ids)
DMXViewManager
state
- whether to block or unblock GUI. If true
block, otherwise unblockscope
- blocking scopeids
- optional IDs of elements to blockpublic DMXAndroidDialogFactory getDialogFactory()
DMXViewManager
DialogFactory
for the platformpublic void setViewExtensionCallback(String viewId, DMXExtensionCallback callback)
DMXViewManager
Sets extension callback of view with specified ID. The call to callback's
DMXExtensionCallback.getExtensionType()
method must return
DMXExtensionType#VIEW_EXTENSION
.
viewId
- view IDcallback
- callback to registerpublic void registerEventHandler(DMXEventRegistrationHandler handler)
DMXViewManager
handler
contains information
on what handler should be registered and on which UI components.handler
- event handlerCopyright © 2012-2014 Vektor Software. All Rights Reserved.