Search in sources :

Example 1 with InitialConditionsPanel

use of cbit.vcell.mapping.gui.InitialConditionsPanel in project vcell by virtualcell.

the class ApplicationSpecificationsPanel method initialize.

@Override
protected void initialize() {
    super.initialize();
    InitialConditionsPanel initialConditionsPanel = new InitialConditionsPanel();
    ModelProcessSpecsPanel modelProcessSpecsPanel = new ModelProcessSpecsPanel();
    networkConstraintsPanel = new NetworkConstraintsPanel();
    networkFreePanel = new NetworkFreePanel();
    MembraneConditionsPanel membraneConditionsPanel = new MembraneConditionsPanel();
    // order of calls determines display order
    setupTab("Species", initialConditionsPanel);
    setupTab("Reaction", modelProcessSpecsPanel);
    setupTab("Membrane", membraneConditionsPanel);
    setupTab("Network", networkConstraintsPanel);
    setupTab("Network-Free", networkFreePanel);
    activate(initialConditionsPanel);
    activate(modelProcessSpecsPanel);
    if (System.getProperty("showMembrane") != null) {
        activate(membraneConditionsPanel);
    }
    JPanel searchPanel = new JPanel();
    GridBagLayout gbl_searchPanel = new GridBagLayout();
    gbl_searchPanel.columnWeights = new double[] { 0.0, 1.0 };
    searchPanel.setLayout(gbl_searchPanel);
    JLabel lblNewLabel = new JLabel("Search");
    GridBagConstraints gbc_lblNewLabel = new GridBagConstraints();
    gbc_lblNewLabel.insets = new Insets(5, 5, 5, 5);
    gbc_lblNewLabel.anchor = GridBagConstraints.EAST;
    gbc_lblNewLabel.gridx = 0;
    gbc_lblNewLabel.gridy = 0;
    searchPanel.add(lblNewLabel, gbc_lblNewLabel);
    textField_1 = new JTextField();
    textField_1.getDocument().addDocumentListener(new DocumentListener() {

        @Override
        public void removeUpdate(DocumentEvent e) {
            searchTable();
        }

        @Override
        public void insertUpdate(DocumentEvent e) {
            searchTable();
        }

        @Override
        public void changedUpdate(DocumentEvent e) {
            searchTable();
        }
    });
    textField_1.putClientProperty("JTextField.variant", "search");
    GridBagConstraints gbc_textField_1 = new GridBagConstraints();
    gbc_textField_1.insets = new Insets(5, 5, 5, 5);
    gbc_textField_1.weightx = 1.0;
    gbc_textField_1.fill = GridBagConstraints.HORIZONTAL;
    gbc_textField_1.gridx = 1;
    gbc_textField_1.gridy = 0;
    searchPanel.add(textField_1, gbc_textField_1);
    textField_1.setColumns(10);
    add(searchPanel, BorderLayout.SOUTH);
    tabbedPane.addChangeListener(new ChangeListener() {

        @Override
        public void stateChanged(ChangeEvent e) {
            searchTable();
        }
    });
}
Also used : JPanel(javax.swing.JPanel) DocumentListener(javax.swing.event.DocumentListener) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) NetworkConstraintsPanel(org.vcell.model.rbm.gui.NetworkConstraintsPanel) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField) DocumentEvent(javax.swing.event.DocumentEvent) NetworkFreePanel(org.vcell.model.rbm.gui.NetworkFreePanel) ModelProcessSpecsPanel(cbit.vcell.mapping.gui.ModelProcessSpecsPanel) ChangeEvent(javax.swing.event.ChangeEvent) InitialConditionsPanel(cbit.vcell.mapping.gui.InitialConditionsPanel) MembraneConditionsPanel(cbit.vcell.mapping.gui.MembraneConditionsPanel) ChangeListener(javax.swing.event.ChangeListener)

Aggregations

InitialConditionsPanel (cbit.vcell.mapping.gui.InitialConditionsPanel)1 MembraneConditionsPanel (cbit.vcell.mapping.gui.MembraneConditionsPanel)1 ModelProcessSpecsPanel (cbit.vcell.mapping.gui.ModelProcessSpecsPanel)1 GridBagConstraints (java.awt.GridBagConstraints)1 GridBagLayout (java.awt.GridBagLayout)1 Insets (java.awt.Insets)1 JLabel (javax.swing.JLabel)1 JPanel (javax.swing.JPanel)1 JTextField (javax.swing.JTextField)1 ChangeEvent (javax.swing.event.ChangeEvent)1 ChangeListener (javax.swing.event.ChangeListener)1 DocumentEvent (javax.swing.event.DocumentEvent)1 DocumentListener (javax.swing.event.DocumentListener)1 NetworkConstraintsPanel (org.vcell.model.rbm.gui.NetworkConstraintsPanel)1 NetworkFreePanel (org.vcell.model.rbm.gui.NetworkFreePanel)1