use of cbit.vcell.model.gui.ReactionElectricalPropertiesPanel in project vcell by virtualcell.
the class ReactionPropertiesPanel method initialize.
private void initialize() {
try {
setName("KineticsTypeTemplatePanel");
setLayout(new java.awt.GridBagLayout());
nameTextField = new JTextField();
nameTextField.setEditable(false);
nameTextField.addFocusListener(eventHandler);
nameTextField.addActionListener(eventHandler);
isReversibleCheckBox = new JCheckBox("");
isReversibleCheckBox.addActionListener(eventHandler);
isReversibleCheckBox.setBackground(Color.white);
// isReversibleCheckBox.setHorizontalTextPosition(SwingConstants.LEFT);
electricalPropertiesLabel = new JLabel("Electrical Properties");
electricalPropertiesLabel.setVisible(false);
reactionElectricalPropertiesPanel = new ReactionElectricalPropertiesPanel();
reactionElectricalPropertiesPanel.setVisible(false);
int gridy = 0;
GridBagConstraints gbc = new java.awt.GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = gridy;
gbc.insets = new java.awt.Insets(2, 4, 4, 4);
gbc.anchor = GridBagConstraints.LINE_END;
add(new JLabel("Reaction Name"), gbc);
gbc = new java.awt.GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = gridy;
gbc.insets = new java.awt.Insets(2, 4, 4, 4);
gbc.weightx = 1.0;
gbc.gridwidth = 3;
gbc.fill = GridBagConstraints.HORIZONTAL;
add(nameTextField, gbc);
gridy++;
gbc = new java.awt.GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = gridy;
gbc.anchor = java.awt.GridBagConstraints.LINE_END;
gbc.insets = new java.awt.Insets(0, 4, 4, 4);
add(electricalPropertiesLabel, gbc);
gbc = new java.awt.GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = gridy;
gbc.gridwidth = 3;
gbc.fill = java.awt.GridBagConstraints.HORIZONTAL;
gbc.weightx = 1.0;
gbc.insets = new java.awt.Insets(0, 4, 0, 4);
add(reactionElectricalPropertiesPanel, gbc);
// ----------------------------------------------------------------
JPanel p = new JPanel();
p.setLayout(new GridBagLayout());
p.setBackground(Color.white);
int gridyy = 0;
gbc = new java.awt.GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = gridyy;
gbc.anchor = GridBagConstraints.LINE_END;
p.add(new JLabel("Reversible"), gbc);
gbc = new java.awt.GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = gridyy;
gbc.fill = GridBagConstraints.HORIZONTAL;
p.add(isReversibleCheckBox, gbc);
gridy++;
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = gridy;
gbc.weightx = 0;
gbc.insets = new Insets(0, 4, 4, 4);
gbc.anchor = GridBagConstraints.WEST;
gbc.fill = GridBagConstraints.NONE;
add(p, gbc);
gbc = new java.awt.GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = gridy;
gbc.anchor = GridBagConstraints.LINE_END;
gbc.insets = new java.awt.Insets(0, 4, 4, 4);
add(new JLabel("Kinetic Type"), gbc);
gbc = new java.awt.GridBagConstraints();
gbc.gridx = 2;
gbc.gridy = gridy;
gbc.fill = java.awt.GridBagConstraints.HORIZONTAL;
gbc.weightx = 1.0;
gbc.insets = new java.awt.Insets(0, 4, 4, 4);
add(getKineticsTypeComboBox(), gbc);
gbc = new GridBagConstraints();
gbc.gridx = 3;
gbc.gridy = gridy;
gbc.insets = new java.awt.Insets(0, 4, 4, 4);
add(getJToggleButton(), gbc);
gridy++;
gbc = new java.awt.GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = gridy;
gbc.fill = java.awt.GridBagConstraints.BOTH;
gbc.weightx = 1.0;
gbc.weighty = 1.0;
gbc.gridwidth = 4;
add(getScrollPaneTable().getEnclosingScrollPane(), gbc);
CollapsiblePanel collapsiblePanel = new CollapsiblePanel("Annotation and Pathway Links", true);
collapsiblePanel.getContentPanel().setLayout(new GridBagLayout());
JPanel jp1 = new JPanel();
jp1.setLayout(new GridBagLayout());
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 0;
gbc.anchor = GridBagConstraints.LINE_START;
JLabel pathwayLink = new JLabel("Linked Pathway Object(s): ");
jp1.add(pathwayLink, gbc);
linkedPOScrollPane = new JScrollPane();
gbc = new GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = 0;
gbc.weightx = 1.0;
gbc.gridwidth = GridBagConstraints.REMAINDER;
gbc.fill = GridBagConstraints.HORIZONTAL;
jp1.add(linkedPOScrollPane, gbc);
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 0;
gbc.weightx = 1.0;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.anchor = GridBagConstraints.LINE_START;
collapsiblePanel.getContentPanel().add(jp1, gbc);
annotationTextArea = new JTextArea(2, 20);
annotationTextArea.setLineWrap(true);
annotationTextArea.setWrapStyleWord(true);
annotationTextArea.setFont(new Font("monospaced", Font.PLAIN, 11));
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 1;
gbc.weightx = 1.0;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.anchor = GridBagConstraints.LINE_START;
JScrollPane jp2 = new JScrollPane(annotationTextArea);
collapsiblePanel.getContentPanel().add(jp2, gbc);
gridy++;
gbc = new java.awt.GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = gridy;
gbc.gridwidth = 4;
gbc.weightx = 1.0;
gbc.weighty = 0.2;
gbc.fill = java.awt.GridBagConstraints.HORIZONTAL;
add(collapsiblePanel, gbc);
setBackground(Color.white);
getKineticsTypeComboBox().addActionListener(eventHandler);
getKineticsTypeComboBox().setEnabled(false);
initKineticChoices();
initConnections();
} catch (java.lang.Throwable ivjExc) {
handleException(ivjExc);
}
// user code begin {2}
// user code end
}
Aggregations