My favorites | Sign in
Project Logo
                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/* $Id$ */
/*
* OpenBiomind-GUI: GUI for OpenBiomind
* Copyright (C) 2008 Bhavesh Sanghvi
*
* This file (GraphFeaturesWizard.java) is part of OpenBiomind-GUI.
*
* OpenBiomind-GUI is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* OpenBiomind-GUI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with OpenBiomind-GUI. If not, see <http://www.gnu.org/licenses/>.
*
* Please visit the following pages to contact the author(s):
* Homepage: http://code.google.com/p/openbiomind-gui/
* Mailing list: http://groups.google.com/group/openbiomind-gui/
*/

package openbiomind.gui.wizards;

import openbiomind.gui.data.AbstractTaskData;
import openbiomind.gui.data.GraphFeaturesTaskData;
import openbiomind.gui.main.GraphvizHelper;

/**
* The class GraphFeaturesWizard.
*
* @author bsanghvi
* @since Jul 20, 2008
* @version Aug 18, 2008
*/
public class GraphFeaturesWizard extends AbstractTaskWizard {

/** The graph features wizard page. */
private final GraphFeaturesWizardPage GRAPH_FEATURES_WIZ_PAGE = new GraphFeaturesWizardPage();

/** The graph features task data. */
private GraphFeaturesTaskData graphFeaturesTaskData = null;

/** The Graphviz helper. */
private GraphvizHelper graphvizHelper = null;

/**
* Instantiates a new graph features wizard.
*/
public GraphFeaturesWizard() {
super(Messages.GraFeatureWiz_Title);
}

/*
* @see org.eclipse.jface.wizard.Wizard#addPages()
*/
@Override
public void addPages() {
addPage(this.GRAPH_FEATURES_WIZ_PAGE);
}

/*
* @see openbiomind.gui.wizards.AbstractTaskWizard#getTaskData()
*/
@Override
protected AbstractTaskData[] getTaskData() {
return new AbstractTaskData[] { getGraphFeaturesTaskData() };
}

/*
* @see openbiomind.gui.wizards.AbstractTaskWizard#getFirstWizardPage()
*/
@Override
protected AbstractTaskWizardPage getFirstWizardPage() {
return this.GRAPH_FEATURES_WIZ_PAGE;
}

/**
* Gets the graph features task data.
*
* @return the graph features task data
*/
private GraphFeaturesTaskData getGraphFeaturesTaskData() {
if (this.graphFeaturesTaskData == null) {
this.graphFeaturesTaskData = this.GRAPH_FEATURES_WIZ_PAGE.prepareTaskData();
}
return this.graphFeaturesTaskData;
}

/**
* Gets the graphviz helper.
*
* @return the graphviz helper
*/
private GraphvizHelper getGraphvizHelper() {
if (this.graphvizHelper == null) {
this.graphvizHelper = new GraphvizHelper(this.GRAPH_FEATURES_WIZ_PAGE.getOutputFile());
}
return this.graphvizHelper;
}

/*
* @see openbiomind.gui.wizards.AbstractTaskWizard#getPostSuccessfulExecutionProcess()
*/
@Override
protected Process getPostSuccessfulExecutionProcess() {
final Process dotProcess = getGraphvizHelper().createDotProcess();
if (dotProcess != null) {
getGraphFeaturesTaskData().setGraphImagePath(getGraphvizHelper().getOutputFilePath());
return dotProcess;
} else {
return super.getPostSuccessfulExecutionProcess();
}
}

}
Show details Hide details

Change log

r65 by bsanghvi on Aug 17, 2008   Diff
Added the license information.
Updated the version information.
Go to: 
Project members, sign in to write a code review

Older revisions

r54 by bsanghvi on Aug 10, 2008   Diff
Added setFocus method in
TextButtonComposite.
Refactored the GraphvizHelper to store
the output image path.
Added the following wizard options:
...
r53 by bsanghvi on Aug 09, 2008   Diff
Added new sub menu options for
executing Utility Computer starting
from Meta Task and for executing Meta
Task up to Utility Computer.
Added multi page wizard for executing
...
r52 by bsanghvi on Aug 09, 2008   Diff
Refactored the wizard and task data to
allow the execution of multiple tasks
at the end of a single wizard.
Updated the execution log to include a
TAB space before the task output.
All revisions of this file

File info

Size: 3607 bytes, 119 lines

File properties

svn:keywords
Id
Hosted by Google Code