public class JFXViewManager extends AbstractViewManager
DMXViewManager
used for JavaFX applications.adapter, localeListeners, registeredViews
PARAM_DIALOG_TITLE, PARAM_PROGRESS_DIALOG, PARAM_VIEW_STATE, VAL_DLG_CLOSE, VAL_DLG_SHOW
Constructor and Description |
---|
JFXViewManager(javafx.stage.Stage stage,
DMXDefaultAdapter adapter)
Creates new instance of this view manager.
|
Modifier and Type | Method and Description |
---|---|
void |
blockGui(boolean state,
GUIBlockingScope scope,
String... ids)
Block or unblock GUI based on specified parameters.
|
JFXDialogFactory |
getDialogFactory()
Retrieves dialog factory for the underlying platform.
|
void |
handleLocaleChange()
This method will update GUI based on locale change.
|
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.
|
void |
registerView(DMXView view)
Registers specified view for management by this view manager.
|
void |
selectView(String viewId,
Map<String,Object> params)
Set the view with specified ID as currently active.
|
void |
setMenuService(DMXMenuService menuService)
Sets menu service for use with this view manager.
|
void |
setToolbarService(DMXToolbarService toolbarService)
Sets toolbar service for this view manager.
|
void |
setViewExtensionCallback(String viewId,
DMXExtensionCallback callback)
Sets extension callback of view with specified ID.
|
void |
updateView(String viewId,
Map 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, registerView
public JFXViewManager(javafx.stage.Stage stage, DMXDefaultAdapter adapter)
stage
- JavaFX stageadapter
- adapter instancepublic void setMenuService(DMXMenuService menuService)
menuService
- menu service to setpublic void setToolbarService(DMXToolbarService toolbarService)
toolbarService
- toolbar servicepublic void selectView(String viewId, Map<String,Object> params)
Set the view with specified ID as currently active. This implementation uses JavaFX-specific operations for showing the view.
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.DMXViewManager.PARAM_DIALOG_TITLE
- if present, it's value will be used as dialog title DMXViewManager.PARAM_VIEW_STATE
- if present, it's value will be use as view state (true or false).viewId
- view IDparams
- parametersDMXViewManager.selectView(java.lang.String, java.util.Map)
public JFXDialogFactory getDialogFactory()
DMXViewManager
DialogFactory
for the platformpublic void updateView(String viewId, Map 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 registerprotected void processDeferredViews(String parentId, Set<String> childrenIds)
AbstractViewManager
processDeferredViews
in class AbstractViewManager
parentId
- registered parent viewchildrenIds
- ids of dependent viewspublic 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 handlerpublic void handleLocaleChange()
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 blockCopyright © 2012-2014 Vektor Software. All Rights Reserved.