use of org.netxms.ui.android.main.views.DashboardView in project netxms by netxms.
the class EmbeddedDashboardElement method refresh.
/* (non-Javadoc)
* @see org.netxms.ui.android.main.dashboards.elements.AbstractDashboardElement#refresh()
*/
@Override
public void refresh() {
final Dashboard dashboard = (Dashboard) service.getSession().findObjectById(config.getDashboardObjects()[current], Dashboard.class);
current++;
if (current >= config.getDashboardObjects().length)
current = 0;
post(new Runnable() {
@Override
public void run() {
removeAllViews();
if (dashboard != null) {
DashboardView view = new DashboardView(getContext(), dashboard, service, scheduleTaskExecutor);
addView(view, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, Gravity.FILL));
}
}
});
}
Aggregations