Search in sources :

Example 1 with ParameterEstimationRunTaskPanel

use of org.vcell.optimization.gui.ParameterEstimationRunTaskPanel in project vcell by virtualcell.

the class ParameterEstimationPanel method initialize.

@Override
protected void initialize() {
    super.initialize();
    setName("Parameter Estimation");
    setLayout(new java.awt.BorderLayout());
    referenceDataPanel = new ReferenceDataPanel();
    runTaskPanel = new ParameterEstimationRunTaskPanel();
    getparameterMappingPanel().setBorder(GuiConstants.TAB_PANEL_BORDER);
    referenceDataPanel.setBorder(GuiConstants.TAB_PANEL_BORDER);
    getDataMappingPanel().setBorder(GuiConstants.TAB_PANEL_BORDER);
    runTaskPanel.setBorder(GuiConstants.TAB_PANEL_BORDER);
    tabbedPane.addTab(ParameterEstimationPanelTabID.parameters.title, getparameterMappingPanel());
    tabbedPane.addTab(ParameterEstimationPanelTabID.experimental_data_import.title, referenceDataPanel);
    tabbedPane.addTab(ParameterEstimationPanelTabID.experimental_data_mapping.title, getDataMappingPanel());
    tabbedPane.addTab(ParameterEstimationPanelTabID.run_task.title, runTaskPanel);
    add(tabbedPane, BorderLayout.CENTER);
    add(getButtonPanel(), BorderLayout.NORTH);
    getNewAnalysisTaskButton().addActionListener(eventHandler);
    getDeleteAnalysisTaskButton().addActionListener(eventHandler);
    getCopyButton().addActionListener(eventHandler);
    getAnalysisTaskComboBox().addActionListener(eventHandler);
    getMapButton().addActionListener(eventHandler);
    getEvaluateConfidenceIntervalButton().addActionListener(eventHandler);
    getDataModelMappingTable().getSelectionModel().addListSelectionListener(eventHandler);
    dataModelMappingTable.addMouseListener(eventHandler);
    getDataModelMappingTable().setDefaultRenderer(SymbolTableEntry.class, new DefaultScrollTableCellRenderer() {

        public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
            super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
            if (value == null) {
                setText("unmapped");
                return this;
            }
            SymbolTableEntry ste = (SymbolTableEntry) value;
            if (ste instanceof Model.ReservedSymbol) {
                setText(ste.getName());
            } else if (ste instanceof SpeciesContext) {
                setText("[" + ste.getName() + "]");
            } else if (ste instanceof KineticsParameter) {
                setText(ste.getNameScope().getName() + ":" + ste.getName());
            } else if (ste instanceof ModelParameter) {
                setText(ste.getName());
            } else if (ste instanceof ReservedVariable) {
                setText(ste.getName());
            } else {
                setText(ste.getNameScope().getAbsoluteScopePrefix() + ste.getName());
            }
            return this;
        }
    });
    getDataModelMappingTable().setModel(getreferenceDataMappingSpecTableModel());
    getDataModelMappingTable().createDefaultColumnsFromModel();
}
Also used : SpeciesContext(cbit.vcell.model.SpeciesContext) ParameterEstimationRunTaskPanel(org.vcell.optimization.gui.ParameterEstimationRunTaskPanel) ModelParameter(cbit.vcell.model.Model.ModelParameter) SymbolTableEntry(cbit.vcell.parser.SymbolTableEntry) ReservedVariable(cbit.vcell.math.ReservedVariable) KineticsParameter(cbit.vcell.model.Kinetics.KineticsParameter) ReferenceDataMappingSpecTableModel(org.vcell.optimization.gui.ReferenceDataMappingSpecTableModel) AnalysisTaskComboBoxModel(org.vcell.optimization.gui.AnalysisTaskComboBoxModel) Model(cbit.vcell.model.Model) DefaultScrollTableCellRenderer(org.vcell.util.gui.DefaultScrollTableCellRenderer) BorderLayout(java.awt.BorderLayout) ReferenceDataPanel(org.vcell.optimization.gui.ReferenceDataPanel)

Aggregations

ReservedVariable (cbit.vcell.math.ReservedVariable)1 KineticsParameter (cbit.vcell.model.Kinetics.KineticsParameter)1 Model (cbit.vcell.model.Model)1 ModelParameter (cbit.vcell.model.Model.ModelParameter)1 SpeciesContext (cbit.vcell.model.SpeciesContext)1 SymbolTableEntry (cbit.vcell.parser.SymbolTableEntry)1 BorderLayout (java.awt.BorderLayout)1 AnalysisTaskComboBoxModel (org.vcell.optimization.gui.AnalysisTaskComboBoxModel)1 ParameterEstimationRunTaskPanel (org.vcell.optimization.gui.ParameterEstimationRunTaskPanel)1 ReferenceDataMappingSpecTableModel (org.vcell.optimization.gui.ReferenceDataMappingSpecTableModel)1 ReferenceDataPanel (org.vcell.optimization.gui.ReferenceDataPanel)1 DefaultScrollTableCellRenderer (org.vcell.util.gui.DefaultScrollTableCellRenderer)1