1
/*******************************************************************************
2
* Copyright (c) 2006 IBM Corporation.
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* http://www.eclipse.org/legal/epl-v10.html
9
* IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
10
*******************************************************************************/
12
package org.eclipse.linuxtools.systemtap.graphing.ui.wizards.graph;
14
import org.eclipse.jface.viewers.IStructuredSelection;
15
import org.eclipse.jface.wizard.Wizard;
16
import org.eclipse.linuxtools.internal.systemtap.graphing.ui.Localization;
17
import org.eclipse.linuxtools.systemtap.graphing.core.datasets.IDataSet;
18
import org.eclipse.linuxtools.systemtap.graphing.core.structures.GraphData;
19
import org.eclipse.ui.INewWizard;
20
import org.eclipse.ui.IWorkbench;
27
public class SelectGraphAndSeriesWizard extends Wizard implements INewWizard {
29
* The wizard for creating a new graph.
30
* @param data An IDataSet that contains the names of all possible series values (columns).
31
* @param gdata A GraphData instance that contains the saved settings of a previously-created graph.
32
* If this wizard is for creating a new graph, set this parameter to null.
34
public SelectGraphAndSeriesWizard(IDataSet data, GraphData gdata) {
35
model = new GraphModel(data);
36
edit = (gdata != null);
38
model.setGraph(gdata.graphID);
39
model.setKey(gdata.key);
40
model.setTitle(gdata.title);
41
model.setXSeries(gdata.xSeries);
42
model.setYSeries(gdata.ySeries);
47
public void init(IWorkbench workbench, IStructuredSelection selection) {
51
public void addPages() {
52
setWindowTitle(Localization.getString(!edit ? "SelectGraphAndSeriesWizard.CreateGraph" : "SelectGraphAndSeriesWizard.EditGraph")); //$NON-NLS-1$//$NON-NLS-2$
53
selectGraphandSeriesPage = new SelectGraphAndSeriesWizardPage();
54
addPage(selectGraphandSeriesPage);
58
public boolean canFinish() {
59
if (selectGraphandSeriesPage.isPageComplete()) {
66
public boolean performCancel() {
72
public boolean performFinish() {
76
public GraphData getGraphData() {
77
return model.getGraphData();
80
public boolean isEditing() {
84
public SelectGraphAndSeriesWizardPage selectGraphandSeriesPage;
85
public GraphModel model;
b'\\ No newline at end of file'