use of org.talend.designer.runtime.visualization.internal.ui.RefreshJob in project tdi-studio-se by Talend.
the class TimelineSection method createControls.
/*
* @see AbstractJvmPropertySection#createControls(Composite)
*/
@Override
protected void createControls(Composite parent) {
timelinePageBook = new PageBook(parent, SWT.NONE);
chartsPage = new Composite(timelinePageBook, SWT.NONE);
messagePage = createMessagePage();
parent.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
GridLayout layout = new GridLayout(2, true);
layout.horizontalSpacing = 15;
chartsPage.setLayout(layout);
timelinePageBook.showPage(chartsPage);
mBeanServerChangeListener = new IMBeanServerChangeListener() {
@Override
public void serverChanged(MBeanServerEvent event) {
new RefreshJob(Messages.reconstructChartJobLabel, toString()) {
@Override
protected void refreshUI() {
IActiveJvm jvm = getJvm();
if (jvm != null) {
reconstructCharts(jvm, false);
}
}
}.schedule();
}
};
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IHelpContextIds.TIMELINE_PAGE);
}
use of org.talend.designer.runtime.visualization.internal.ui.RefreshJob in project tdi-studio-se by Talend.
the class StopMonitoringAction method run.
/*
* @see Action#run()
*/
@Override
public void run() {
RefreshJob refreshJob = new RefreshJob(Messages.stopMonitoringJobLabel, UUID.randomUUID().toString()) {
@Override
protected void refreshModel(IProgressMonitor monitor) {
for (IActiveJvm jvm : jvms) {
jvm.disconnect();
}
}
@Override
protected void refreshUI() {
if (!treeViewer.getControl().isDisposed()) {
treeViewer.refresh();
}
}
};
refreshJob.schedule();
}
Aggregations