use of org.talend.designer.runtime.visualization.IActiveJvm in project tdi-studio-se by Talend.
the class TimelineSection method refreshConnectionIndicator.
/**
* Refreshes the connection indicator.
*/
private void refreshConnectionIndicator() {
IActiveJvm jvm = getJvm();
boolean isConnected = jvm != null && jvm.isConnected();
refreshBackground(chartsPage, isConnected);
for (TimelineChart chart : charts) {
refreshBackground(chart, isConnected);
refreshBackground(chart.getPlotArea(), isConnected);
refreshBackground(chart.getSection(), isConnected);
}
refreshBackground(messagePage, isConnected);
clearAction.setEnabled(isConnected);
refreshAction.setEnabled(isConnected);
newChartAction.setEnabled(isConnected);
loadChartSetAction.setEnabled(isConnected);
garbageCollectorAction.setEnabled(isConnected);
}
use of org.talend.designer.runtime.visualization.IActiveJvm 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.IActiveJvm in project tdi-studio-se by Talend.
the class StartMonitorJobAction method refresh.
/**
* Refreshes the enable state.
*/
public void refresh() {
boolean enable = true;
for (IActiveJvm jvm : jvms) {
if (jvm.isConnected() || !jvm.isConnectionSupported()) {
enable = false;
}
}
setEnabled(enable);
}
use of org.talend.designer.runtime.visualization.IActiveJvm 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();
}
use of org.talend.designer.runtime.visualization.IActiveJvm in project tdi-studio-se by Talend.
the class StopMonitoringAction method refresh.
/**
* Refreshes the enable state.
*/
protected void refresh() {
boolean enable = true;
for (IActiveJvm jvm : jvms) {
if (!jvm.isConnected() || !jvm.isConnectionSupported()) {
enable = false;
}
}
setEnabled(enable);
}
Aggregations