diff --git a/org.eclipse.swtchart.extensions.examples/src/org/eclipse/swtchart/extensions/examples/charts/InteractiveChartDemo.java b/org.eclipse.swtchart.extensions.examples/src/org/eclipse/swtchart/extensions/examples/charts/InteractiveChartDemo.java new file mode 100644 index 00000000..9c7ae1c3 --- /dev/null +++ b/org.eclipse.swtchart.extensions.examples/src/org/eclipse/swtchart/extensions/examples/charts/InteractiveChartDemo.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2024 SWTChart project. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Philip Wenig - menu demo extension + *******************************************************************************/ +package org.eclipse.swtchart.extensions.examples.charts; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swtchart.extensions.charts.InteractiveChart; + +public class InteractiveChartDemo { + + public static void main(String args[]) { + + Display display = new Display(); + Shell shell = new Shell(display); + shell.setText("InteractiveChartDemo"); + shell.setSize(500, 400); + shell.setLayout(new FillLayout()); + // + new InteractiveChart(shell, SWT.NONE); + shell.open(); + // + while(!shell.isDisposed()) { + if(!display.readAndDispatch()) { + display.sleep(); + } + } + display.dispose(); + } +} \ No newline at end of file