Update of /cvsroot/babeldoc/babeldoc/modules/gui/src/com/babeldoc/gui/wizard/setup
In directory sc8-pr-cvs1:/tmp/cvs-serv16008/gui/src/com/babeldoc/gui/wizard/setup
Modified Files:
Command.java FinalizeWizardPanel.java ProjectSetupModel.java
ProjectSetupWizardPanel.java SelectComponentsWizardPanel.java
Log Message:
Updates to the GUI code.
Index: Command.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/gui/src/com/babeldoc/gui/wizard/setup/Command.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Command.java 11 Jun 2003 23:35:39 -0000 1.2
--- Command.java 26 Aug 2003 22:23:32 -0000 1.3
***************
*** 72,77 ****
import org.apache.commons.cli.Options;
- import javax.swing.*;
-
/**
--- 72,75 ----
***************
*** 80,84 ****
public class Command extends BabeldocCommand {
/**
! * Creates a new Command object.
*/
public Command() {
--- 78,82 ----
public class Command extends BabeldocCommand {
/**
! * Creates a new LightConfigCommand object.
*/
public Command() {
***************
*** 101,104 ****
--- 99,103 ----
public void execute(CommandLine commandLine) {
ProjectSetupWizard.run();
+ System.exit(0);
}
***************
*** 110,114 ****
public static void main(String[] args) {
new Command(args);
- System.exit(0);
}
--- 109,112 ----
Index: FinalizeWizardPanel.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/gui/src/com/babeldoc/gui/wizard/setup/FinalizeWizardPanel.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** FinalizeWizardPanel.java 11 Jun 2003 23:35:39 -0000 1.2
--- FinalizeWizardPanel.java 26 Aug 2003 22:23:32 -0000 1.3
***************
*** 67,70 ****
--- 67,76 ----
import com.babeldoc.core.I18n;
+ import com.babeldoc.gui.pipeline.builder.PipelineBuilder;
+
+ import javax.swing.*;
+ import java.awt.*;
+ import java.awt.event.ActionListener;
+ import java.awt.event.ActionEvent;
***************
*** 83,86 ****
--- 89,100 ----
public FinalizeWizardPanel(ProjectSetupModel model) {
super(model, NUMBER, I18n.get("gui.wizard.setup.finalize"));
+ }
+
+ /**
+ * Override this method. This is called from the wizard dialog just prior to
+ * showing your wizard panel. This is used to setup the components on the
+ * the panel
+ */
+ protected void initialize() {
}
}
Index: ProjectSetupModel.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/gui/src/com/babeldoc/gui/wizard/setup/ProjectSetupModel.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ProjectSetupModel.java 11 Jun 2003 23:35:39 -0000 1.3
--- ProjectSetupModel.java 26 Aug 2003 22:23:32 -0000 1.4
***************
*** 70,73 ****
--- 70,74 ----
import com.babeldoc.gui.wizard.WizardModel;
+ import com.babeldoc.gui.pipeline.builder.PipelineBuilder;
import java.io.*;
***************
*** 88,101 ****
/**
! * TODO: DOCUMENT ME!
*
* @param configPipeline DOCUMENT ME!
*/
public void setConfigPipeline(boolean configPipeline) {
this.configPipeline = configPipeline;
}
/**
! * TODO: DOCUMENT ME!
*
* @return DOCUMENT ME!
--- 89,104 ----
/**
! * Set the configuration pipeline option - set this to enable creation
! * of first parts of the pipeline configuration
*
* @param configPipeline DOCUMENT ME!
*/
public void setConfigPipeline(boolean configPipeline) {
+ // System.out.println("Config pipeline: "+configPipeline);
this.configPipeline = configPipeline;
}
/**
! * Is the pipeline configuration enabled?
*
* @return DOCUMENT ME!
***************
*** 106,120 ****
/**
! * TODO: DOCUMENT ME!
*
* @param configScanner DOCUMENT ME!
*/
public void setConfigScanner(boolean configScanner) {
! //System.out.println("Scanner:"+configScanner);
this.configScanner = configScanner;
}
/**
! * TODO: DOCUMENT ME!
*
* @return DOCUMENT ME!
--- 109,123 ----
/**
! * Set this to true if scanner configuration is required.
*
* @param configScanner DOCUMENT ME!
*/
public void setConfigScanner(boolean configScanner) {
! // System.out.println("Scanner:"+configScanner);
this.configScanner = configScanner;
}
/**
! * Is the scanner configuration enabled.
*
* @return DOCUMENT ME!
***************
*** 125,129 ****
/**
! * TODO: DOCUMENT ME!
*
* @param name DOCUMENT ME!
--- 128,132 ----
/**
! * Set the name of the project
*
* @param name DOCUMENT ME!
***************
*** 134,138 ****
/**
! * TODO: DOCUMENT ME!
*
* @return DOCUMENT ME!
--- 137,141 ----
/**
! * Get the name of the configuration
*
* @return DOCUMENT ME!
***************
*** 180,196 ****
} else {
createProjectFile();
! if (this.isConfigPipeline()) {
! createPipelines();
}
! if (this.isConfigPipeline()) {
! createScanners();
! }
}
}
/**
! * TODO: DOCUMENT ME!
*
* @throws IOException DOCUMENT ME!
--- 183,207 ----
} else {
createProjectFile();
+ createConfiguration();
+ EnvironmentLoader.addSearchPath(getRootDir().getCanonicalPath());
! if(this.isConfigPipeline()) {
! PipelineBuilder.runAsDialog();
}
+ }
+ }
! private void createConfiguration() throws IOException {
! if (this.isConfigPipeline()) {
! createPipelines();
! }
!
! if (this.isConfigPipeline()) {
! createScanners();
}
}
/**
! * Create the pipeline configuration
*
* @throws IOException DOCUMENT ME!
***************
*** 208,212 ****
/**
! * TODO: DOCUMENT ME!
*
* @throws IOException DOCUMENT ME!
--- 219,223 ----
/**
! * Create the project file and the setup environment variables.
*
* @throws IOException DOCUMENT ME!
***************
*** 241,245 ****
/**
! * TODO: DOCUMENT ME!
*
* @throws IOException DOCUMENT ME!
--- 252,256 ----
/**
! * Create the scanner configuration files.
*
* @throws IOException DOCUMENT ME!
Index: ProjectSetupWizardPanel.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/gui/src/com/babeldoc/gui/wizard/setup/ProjectSetupWizardPanel.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ProjectSetupWizardPanel.java 11 Jun 2003 23:35:39 -0000 1.2
--- ProjectSetupWizardPanel.java 26 Aug 2003 22:23:32 -0000 1.3
***************
*** 71,77 ****
/**
* base class of all the wizard panes in project setup. Sets the model
! * information so that the views can get to the data.
*/
! public class ProjectSetupWizardPanel extends StandardWizardPanel {
private ProjectSetupModel model = null;
--- 71,77 ----
/**
* base class of all the wizard panes in project setup. Sets the model
! * information so that the views can getChild to the data.
*/
! public abstract class ProjectSetupWizardPanel extends StandardWizardPanel {
private ProjectSetupModel model = null;
***************
*** 105,114 ****
public ProjectSetupModel getModel() {
return model;
- }
-
- /**
- * Initialize the panel - does nothing.
- */
- protected void initialize() {
}
}
--- 105,108 ----
Index: SelectComponentsWizardPanel.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/gui/src/com/babeldoc/gui/wizard/setup/SelectComponentsWizardPanel.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SelectComponentsWizardPanel.java 11 Jun 2003 23:35:39 -0000 1.2
--- SelectComponentsWizardPanel.java 26 Aug 2003 22:23:32 -0000 1.3
***************
*** 102,122 ****
*/
public void actionPerformed(ActionEvent e) {
- // System.out.println(e.toString());
if (e.getSource().equals(scanner)) {
getModel().setConfigScanner(scanner.isSelected());
} else if (e.getSource().equals(pipeline)) {
! getModel().setConfigScanner(pipeline.isSelected());
}
}
/**
- * TODO: DOCUMENT ME!
- */
- protected void inititialize() {
- pipeline.setSelected(getModel().isConfigPipeline());
- scanner.setSelected(getModel().isConfigScanner());
- }
-
- /**
* Setup the right panel - add the two check boxes.
*/
--- 102,113 ----
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource().equals(scanner)) {
getModel().setConfigScanner(scanner.isSelected());
} else if (e.getSource().equals(pipeline)) {
! getModel().setConfigPipeline(pipeline.isSelected());
}
}
/**
* Setup the right panel - add the two check boxes.
*/
***************
*** 125,128 ****
--- 116,123 ----
downpanel.setLayout(new BoxLayout(downpanel, BoxLayout.PAGE_AXIS));
downpanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
+
+ // pipeline.setSelected(getModel().isConfigPipeline());
+ // scanner.setSelected(getModel().isConfigScanner());
+
downpanel.add(pipeline);
downpanel.add(scanner);
***************
*** 132,135 ****
--- 127,140 ----
pipeline.addActionListener(this);
scanner.addActionListener(this);
+ }
+
+ /**
+ * Override this method. This is called from the wizard dialog just prior to
+ * showing your wizard panel. This is used to setup the components on the
+ * the panel
+ */
+ protected void initialize() {
+ pipeline.setSelected(getModel().isConfigPipeline());
+ scanner.setSelected(getModel().isConfigScanner());
}
}
|