public class DashboardImpl extends io.jmix.ui.component.CompositeComponent<io.jmix.ui.component.VBoxLayout> implements Dashboard
io.jmix.ui.component.CompositeComponent.CreateEvent
io.jmix.ui.component.Component.Alignment, io.jmix.ui.component.Component.BelongToFrame, io.jmix.ui.component.Component.Disposable, io.jmix.ui.component.Component.Editable, io.jmix.ui.component.Component.Focusable, io.jmix.ui.component.Component.HasCaption, io.jmix.ui.component.Component.HasDescription, io.jmix.ui.component.Component.HasIcon, io.jmix.ui.component.Component.HasXmlDescriptor, io.jmix.ui.component.Component.Wrapper
Modifier and Type | Field and Description |
---|---|
protected AccessConstraintsHelper |
accessHelper |
protected java.lang.String |
assistantBeanName |
protected io.jmix.ui.component.VBoxLayout |
canvasBox |
protected CanvasFragment |
canvasFragment |
protected java.lang.String |
code |
protected io.jmix.ui.UiComponents |
componentsFactory |
protected DashboardModel |
dashboardModel |
protected DashboardViewAssistant |
dashboardViewAssistant |
protected io.jmix.core.DataManager |
dataManager |
protected io.jmix.ui.Facets |
facets |
protected io.jmix.ui.Fragments |
fragments |
protected JsonConverter |
jsonConverter |
protected java.lang.String |
jsonPath |
protected io.jmix.core.Messages |
messages |
protected io.jmix.core.Metadata |
metadata |
protected io.jmix.ui.Notifications |
notifications |
protected ParameterTransformer |
parameterTransformer |
protected org.springframework.core.io.ResourceLoader |
resourceLoader |
protected java.lang.Integer |
timerDelay |
protected io.jmix.ui.UiEventPublisher |
uiEventPublisher |
protected java.util.List<Parameter> |
xmlParameters |
Constructor and Description |
---|
DashboardImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
addXmlParameters(DashboardModel dashboardModel) |
void |
dashboardEventListener(DashboardEvent dashboardEvent) |
protected io.jmix.ui.component.Window |
findWindow(io.jmix.ui.component.Component frame) |
java.lang.String |
getAssistantBeanName()
Returns assistant bean name
|
DashboardModel |
getDashboardModel() |
protected java.util.List<Parameter> |
getDuplicatesParams(DashboardModel dashboardModel) |
int |
getTimerDelay()
Returns delay for timer
|
io.jmix.ui.screen.ScreenFragment |
getWidget(java.lang.String widgetId)
Returns widget by passed id.
|
void |
init(java.util.Map<java.lang.String,java.lang.Object> params)
Initialize dashboard with passed parameters, timer and assistant.
|
protected DashboardModel |
loadDashboardByCode(java.lang.String code) |
protected DashboardModel |
loadDashboardByJson(java.lang.String jsonPath) |
void |
refresh()
Refreshes dashboard.
|
void |
refresh(java.util.Map<java.lang.String,java.lang.Object> params)
Refreshes widget with passed parameters.
|
protected void |
refreshWidgets(DashboardEvent dashboardEvent) |
protected io.jmix.ui.screen.ScreenFragment |
searchWidgetFragment(io.jmix.ui.component.Component layout,
java.lang.String widgetId) |
void |
setAssistantBeanName(java.lang.String assistantBeanName)
Set assistant bean name
|
void |
setCode(java.lang.String code)
Dashboard can be configured by setting code of existing dashboard
To apply new changes the
Dashboard.init(Map) method required to be invoked |
void |
setJsonPath(java.lang.String jsonPath)
Dashboard can be configured from json file
|
void |
setTimerDelay(int delay)
Set delay for dashboard timer
|
void |
setXmlParameters(java.util.List<Parameter> parameters)
Sets passed parameters to dashboard component
|
protected void |
updateCanvasFragment(DashboardModel dashboardModel) |
protected void |
updateDashboard(DashboardModel dashboardModel) |
addAttachListener, addCreateListener, addDetachListener, addStyleName, assignDebugId, attached, detached, disableEventListeners, enableEventListeners, getAlignment, getComposition, getCompositionOrNull, getDebugId, getEventHub, getFrame, getFullId, getHeight, getHeightSizeUnit, getId, getInnerComponent, getInnerComponentOptional, getParent, getPrefixId, getStyleName, getUiEventListeners, getWidth, getWidthSizeUnit, hasSubscriptions, isAttached, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, publish, removeStyleName, setAlignment, setApplicationContext, setComposition, setDebugId, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setId, setParent, setResponsive, setStyleName, setUiEventListeners, setVisible, setWidth, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, updateComponentIds, updateIdIfNeeded, withUnwrapped, withUnwrappedComposition
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
protected io.jmix.ui.component.VBoxLayout canvasBox
@Autowired protected io.jmix.core.DataManager dataManager
@Autowired protected JsonConverter jsonConverter
@Autowired protected org.springframework.core.io.ResourceLoader resourceLoader
@Autowired protected io.jmix.core.Metadata metadata
@Autowired protected AccessConstraintsHelper accessHelper
@Autowired protected io.jmix.ui.UiComponents componentsFactory
@Autowired protected io.jmix.ui.Facets facets
@Autowired protected io.jmix.ui.Notifications notifications
@Autowired protected io.jmix.ui.Fragments fragments
@Autowired protected ParameterTransformer parameterTransformer
protected DashboardViewAssistant dashboardViewAssistant
@Autowired protected io.jmix.ui.UiEventPublisher uiEventPublisher
protected CanvasFragment canvasFragment
@Autowired protected io.jmix.core.Messages messages
protected java.lang.String code
protected java.lang.String jsonPath
protected java.lang.Integer timerDelay
protected java.util.List<Parameter> xmlParameters
protected java.lang.String assistantBeanName
protected DashboardModel dashboardModel
public void init(java.util.Map<java.lang.String,java.lang.Object> params)
Dashboard
public void refresh()
Dashboard
public void refresh(java.util.Map<java.lang.String,java.lang.Object> params)
@EventListener public void dashboardEventListener(DashboardEvent dashboardEvent) throws java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
protected void updateDashboard(@Nullable DashboardModel dashboardModel)
protected DashboardModel loadDashboardByJson(java.lang.String jsonPath)
@Nullable protected DashboardModel loadDashboardByCode(java.lang.String code)
protected void addXmlParameters(DashboardModel dashboardModel)
protected java.util.List<Parameter> getDuplicatesParams(DashboardModel dashboardModel)
protected void updateCanvasFragment(DashboardModel dashboardModel)
protected void refreshWidgets(DashboardEvent dashboardEvent)
@Nullable protected io.jmix.ui.component.Window findWindow(io.jmix.ui.component.Component frame)
public io.jmix.ui.screen.ScreenFragment getWidget(java.lang.String widgetId)
Dashboard
@Nullable protected io.jmix.ui.screen.ScreenFragment searchWidgetFragment(io.jmix.ui.component.Component layout, java.lang.String widgetId)
public void setCode(java.lang.String code)
Dashboard
Dashboard.init(Map)
method required to be invokedpublic void setJsonPath(java.lang.String jsonPath)
Dashboard
setJsonPath
in interface Dashboard
jsonPath
- path to json configuration filepublic void setXmlParameters(java.util.List<Parameter> parameters)
Dashboard
setXmlParameters
in interface Dashboard
parameters
- list of parameters to be setpublic void setTimerDelay(int delay)
Dashboard
setTimerDelay
in interface Dashboard
delay
- delay time in secondspublic int getTimerDelay()
Dashboard
getTimerDelay
in interface Dashboard
public DashboardModel getDashboardModel()
getDashboardModel
in interface Dashboard
public java.lang.String getAssistantBeanName()
Dashboard
getAssistantBeanName
in interface Dashboard
public void setAssistantBeanName(java.lang.String assistantBeanName)
Dashboard
setAssistantBeanName
in interface Dashboard
assistantBeanName
- name of the assistant bean