use of cbit.vcell.microscopy.gui.loaddatawizard.LoadFRAPData_MultiFileDescriptor in project vcell by virtualcell.
the class FRAPStudyPanel method getLoadFRAPDataWizard.
public Wizard getLoadFRAPDataWizard() {
// summarypanel) to frapdatapanel.
if (loadFRAPDataWizard == null) {
loadFRAPDataWizard = new Wizard(JOptionPane.getFrameForComponent(this));
loadFRAPDataWizard.getDialog().setTitle("Load FRAP Data");
LoadFRAPData_FileTypeDescriptor fTypeDescriptor = new LoadFRAPData_FileTypeDescriptor();
// goes next to single file input by default
fTypeDescriptor.setNextPanelDescriptorID(LoadFRAPData_SingleFileDescriptor.IDENTIFIER);
loadFRAPDataWizard.registerWizardPanel(LoadFRAPData_FileTypeDescriptor.IDENTIFIER, fTypeDescriptor);
LoadFRAPData_SingleFileDescriptor singleFileDescriptor = new LoadFRAPData_SingleFileDescriptor();
loadFRAPDataWizard.registerWizardPanel(LoadFRAPData_SingleFileDescriptor.IDENTIFIER, singleFileDescriptor);
(singleFileDescriptor).setFrapWorkspace(getFrapWorkspace());
LoadFRAPData_MultiFileDescriptor multiFileDescriptor = new LoadFRAPData_MultiFileDescriptor();
loadFRAPDataWizard.registerWizardPanel(LoadFRAPData_MultiFileDescriptor.IDENTIFIER, multiFileDescriptor);
(multiFileDescriptor).setFrapWorkspace(getFrapWorkspace());
LoadFRAPData_SummaryDescriptor fSummaryDescriptor = new LoadFRAPData_SummaryDescriptor();
// goes back to single file input by default
fSummaryDescriptor.setBackPanelDescriptorID(LoadFRAPData_SingleFileDescriptor.IDENTIFIER);
loadFRAPDataWizard.registerWizardPanel(LoadFRAPData_SummaryDescriptor.IDENTIFIER, fSummaryDescriptor);
fSummaryDescriptor.setFrapWorkspace(getFrapWorkspace());
final WizardPanelDescriptor fileTypeDescriptor = fTypeDescriptor;
final WizardPanelDescriptor fileSummaryDescriptor = fSummaryDescriptor;
// actionListener to single file input radio button
// this radio button affects the wizard series. especially on the next of file type and the back of summary
((LoadFRAPData_FileTypePanel) fTypeDescriptor.getPanelComponent()).getSingleFileButton().addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (((JRadioButton) e.getSource()).isSelected()) {
fileTypeDescriptor.setNextPanelDescriptorID(LoadFRAPData_SingleFileDescriptor.IDENTIFIER);
fileSummaryDescriptor.setBackPanelDescriptorID(LoadFRAPData_SingleFileDescriptor.IDENTIFIER);
}
}
});
// actionListener to multiple file input radio button
// this radio button affects the wizard series. especially on the next of file type and the back of summary
((LoadFRAPData_FileTypePanel) fTypeDescriptor.getPanelComponent()).getMultipleFileButton().addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (((JRadioButton) e.getSource()).isSelected()) {
fileTypeDescriptor.setNextPanelDescriptorID(LoadFRAPData_MultiFileDescriptor.IDENTIFIER);
fileSummaryDescriptor.setBackPanelDescriptorID(LoadFRAPData_MultiFileDescriptor.IDENTIFIER);
}
}
});
if (getDocumentWindowManager() != null) {
LoadFRAPData_PostProcessingDataDescriptor postProcessingDataDescriptor = new LoadFRAPData_PostProcessingDataDescriptor();
loadFRAPDataWizard.registerWizardPanel(LoadFRAPData_PostProcessingDataDescriptor.IDENTIFIER, postProcessingDataDescriptor);
postProcessingDataDescriptor.setFrapWorkspace(getFrapWorkspace());
postProcessingDataDescriptor.setDocumentWindowManager(getDocumentWindowManager());
// actionListener to multiple file input radio button
// this radio button affects the wizard series. especially on the next of file type and the back of summary
((LoadFRAPData_FileTypePanel) fTypeDescriptor.getPanelComponent()).getPostProcessDataButton().setVisible(true);
((LoadFRAPData_FileTypePanel) fTypeDescriptor.getPanelComponent()).getPostProcessDataButton().addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (((JRadioButton) e.getSource()).isSelected()) {
fileTypeDescriptor.setNextPanelDescriptorID(LoadFRAPData_PostProcessingDataDescriptor.IDENTIFIER);
fileSummaryDescriptor.setBackPanelDescriptorID(LoadFRAPData_PostProcessingDataDescriptor.IDENTIFIER);
}
}
});
}
}
// always start from the first page
loadFRAPDataWizard.setCurrentPanel(LoadFRAPData_FileTypeDescriptor.IDENTIFIER);
return loadFRAPDataWizard;
}
Aggregations