use of uk.ac.babraham.SeqMonk.Utilities.NumberKeyListener in project SeqMonk by s-andrews.
the class FixedValueQuantitation method getOptionsPanel.
/* (non-Javadoc)
* @see uk.ac.babraham.SeqMonk.Quantitation.Quantitation#getOptionsPanel(uk.ac.babraham.SeqMonk.SeqMonkApplication)
*/
public JPanel getOptionsPanel() {
if (optionPanel != null) {
// We've done this already
return optionPanel;
}
optionPanel = new JPanel();
optionPanel.setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = 1;
gbc.weightx = 0.5;
gbc.weighty = 0.1;
gbc.fill = GridBagConstraints.HORIZONTAL;
optionPanel.add(new JLabel("Value to assign"), gbc);
gbc.gridx = 2;
valueToAssignField = new JTextField("1", 5);
valueToAssignField.addKeyListener(new NumberKeyListener(true, true));
optionPanel.add(valueToAssignField, gbc);
return optionPanel;
}
use of uk.ac.babraham.SeqMonk.Utilities.NumberKeyListener in project SeqMonk by s-andrews.
the class ChromosomeViewReport method getOptionsPanel.
/* (non-Javadoc)
* @see uk.ac.babraham.SeqMonk.Reports.Report#getOptionsPanel()
*/
public JPanel getOptionsPanel() {
if (optionsPanel != null)
return optionsPanel;
optionsPanel = new JPanel();
optionsPanel.setLayout(new BorderLayout());
JPanel choicePanel = new JPanel();
choicePanel.setLayout(new BoxLayout(choicePanel, BoxLayout.Y_AXIS));
JPanel choicePanel1 = new JPanel();
choicePanel1.add(new JLabel("Upstream context "));
upstreamContextField = new JTextField("", 10);
upstreamContextField.addKeyListener(new NumberKeyListener(false, true));
choicePanel1.add(upstreamContextField);
choicePanel.add(choicePanel1);
JPanel choicePanel2 = new JPanel();
choicePanel2.add(new JLabel("Downstream context "));
downstreamContextField = new JTextField("", 10);
downstreamContextField.addKeyListener(new NumberKeyListener(false, true));
choicePanel2.add(downstreamContextField);
choicePanel.add(choicePanel2);
optionsPanel.add(choicePanel, BorderLayout.CENTER);
return optionsPanel;
}
use of uk.ac.babraham.SeqMonk.Utilities.NumberKeyListener in project SeqMonk by s-andrews.
the class SmoothingQuantitation method getOptionsPanel.
/* (non-Javadoc)
* @see uk.ac.babraham.SeqMonk.Quantitation.Quantitation#getOptionsPanel(uk.ac.babraham.SeqMonk.SeqMonkApplication)
*/
public JPanel getOptionsPanel() {
if (optionPanel != null) {
// We've done this already
return optionPanel;
}
optionPanel = new JPanel();
optionPanel.setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = 1;
gbc.weightx = 0.5;
gbc.weighty = 0.1;
gbc.fill = GridBagConstraints.HORIZONTAL;
optionPanel.add(new JLabel("Smoothing method"), gbc);
gbc.gridx = 2;
correctionActions = new JComboBox(new String[] { "Adjacent Probes", "Window Size" });
optionPanel.add(correctionActions, gbc);
gbc.gridx = 1;
gbc.gridy++;
optionPanel.add(new JLabel("Size"), gbc);
distanceField = new JTextField("" + distance);
distanceField.addKeyListener(new NumberKeyListener(false, false));
distanceField.addKeyListener(new KeyListener() {
public void keyTyped(KeyEvent arg0) {
}
public void keyReleased(KeyEvent arg0) {
optionsChanged();
}
public void keyPressed(KeyEvent arg0) {
}
});
gbc.gridx++;
optionPanel.add(distanceField, gbc);
return optionPanel;
}
use of uk.ac.babraham.SeqMonk.Utilities.NumberKeyListener in project SeqMonk by s-andrews.
the class MacsPeakCaller method getOptionsPanel.
public JPanel getOptionsPanel() {
if (optionPanel != null) {
// We've done this already
return optionPanel;
}
optionPanel = new JPanel();
optionPanel.setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = 1;
gbc.weightx = 0.5;
gbc.weighty = 0.1;
gbc.fill = GridBagConstraints.BOTH;
optionPanel.add(new JLabel("ChIP Stores to use"), gbc);
gbc.gridy++;
gbc.weighty = 0.5;
DataStore[] stores = collection.getAllDataStores();
chipStoresList = new JList(stores);
chipStoresList.getSelectionModel().addListSelectionListener(this);
chipStoresList.setCellRenderer(new TypeColourRenderer());
optionPanel.add(new JScrollPane(chipStoresList), gbc);
gbc.gridy++;
gbc.weighty = 0.1;
optionPanel.add(new JLabel("Input Stores to use"), gbc);
gbc.gridy++;
gbc.weighty = 0.5;
inputStoresList = new JList(stores);
inputStoresList.getSelectionModel().addListSelectionListener(this);
inputStoresList.setCellRenderer(new TypeColourRenderer());
optionPanel.add(new JScrollPane(inputStoresList), gbc);
gbc.gridy++;
JPanel bottomPanel = new JPanel();
bottomPanel.setLayout(new GridBagLayout());
GridBagConstraints bgbc = new GridBagConstraints();
bgbc.gridx = 0;
bgbc.gridy = 0;
bgbc.weightx = 0.5;
bgbc.weighty = 0.5;
bgbc.fill = GridBagConstraints.HORIZONTAL;
bottomPanel.add(new JLabel("P-value cutoff "), bgbc);
pValueField = new JTextField("" + pValue);
pValueField.addKeyListener(new NumberKeyListener(true, false, 1));
bgbc.gridx = 1;
bottomPanel.add(pValueField, bgbc);
bgbc.gridx = 0;
bgbc.gridy++;
bottomPanel.add(new JLabel("Sonicated fragment size "), bgbc);
fragmentSizeField = new JTextField("300");
fragmentSizeField.addKeyListener(new NumberKeyListener(false, false));
bgbc.gridx = 1;
bottomPanel.add(fragmentSizeField, bgbc);
bgbc.gridx = 0;
bgbc.gridy++;
bottomPanel.add(new JLabel("Skip deduplication step "), bgbc);
skipDeduplicationBox = new JCheckBox();
bgbc.gridx = 1;
bottomPanel.add(skipDeduplicationBox, bgbc);
optionPanel.add(bottomPanel, gbc);
return optionPanel;
}
use of uk.ac.babraham.SeqMonk.Utilities.NumberKeyListener in project SeqMonk by s-andrews.
the class ReadPositionProbeGenerator method getOptionsPanel.
/* (non-Javadoc)
* @see uk.ac.babraham.SeqMonk.ProbeGenerators.ProbeGenerator#getOptionsPanel(uk.ac.babraham.SeqMonk.SeqMonkApplication)
*/
public JPanel getOptionsPanel() {
if (optionPanel != null) {
// We've done this already
return optionPanel;
}
optionPanel = new JPanel();
optionPanel.setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = 1;
gbc.weightx = 0.5;
gbc.weighty = 0.1;
gbc.fill = GridBagConstraints.BOTH;
optionPanel.add(new JLabel("Stores to use"), gbc);
gbc.gridy++;
gbc.weighty = 0.9;
DataStore[] stores = collection.getAllDataStores();
storesList = new JList(stores);
storesList.getSelectionModel().addListSelectionListener(this);
storesList.setCellRenderer(new TypeColourRenderer());
optionPanel.add(new JScrollPane(storesList), gbc);
gbc.gridy++;
JPanel bottomPanel = new JPanel();
bottomPanel.setLayout(new GridBagLayout());
GridBagConstraints bgbc = new GridBagConstraints();
bgbc.gridx = 0;
bgbc.gridy = 0;
bgbc.weightx = 0.5;
bgbc.weighty = 0.5;
bgbc.fill = GridBagConstraints.HORIZONTAL;
bottomPanel.add(new JLabel("Use reads on strand "), bgbc);
readStrandTypeBox = new JComboBox(ReadStrandType.getTypeOptions());
bgbc.gridx = 1;
bottomPanel.add(readStrandTypeBox, bgbc);
bgbc.gridx = 0;
bgbc.gridy++;
bottomPanel.add(new JLabel("Minimum read count per position"), bgbc);
bgbc.gridx = 1;
minCountField = new JTextField("" + minCount, 4);
minCountField.addKeyListener(this);
bottomPanel.add(minCountField, bgbc);
bgbc.gridx = 0;
bgbc.gridy++;
bottomPanel.add(new JLabel("Valid positions per window"), bgbc);
bgbc.gridx = 1;
readsPerWindowField = new JTextField("" + readsPerWindow, 4);
readsPerWindowField.addKeyListener(new NumberKeyListener(false, false));
readsPerWindowField.addKeyListener(this);
bottomPanel.add(readsPerWindowField, bgbc);
bgbc.gridx = 0;
bgbc.gridy++;
bottomPanel.add(new JLabel("Limit to region"), bgbc);
bgbc.gridx = 1;
JPanel limitPanel = new JPanel();
limitPanel.setLayout(new BorderLayout());
designWithinExistingBox = new JCheckBox();
limitPanel.add(designWithinExistingBox, BorderLayout.WEST);
if (collection.probeSet() == null) {
limitRegionBox = new JComboBox(new String[] { "Currently Visible Region" });
} else {
limitRegionBox = new JComboBox(new String[] { "Active Probe List", "Currently Visible Region" });
}
limitRegionBox.setEnabled(false);
designWithinExistingBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
limitRegionBox.setEnabled(designWithinExistingBox.isSelected());
isReady();
}
});
limitPanel.add(limitRegionBox, BorderLayout.CENTER);
bottomPanel.add(limitPanel, bgbc);
optionPanel.add(bottomPanel, gbc);
bgbc.gridx = 0;
bgbc.gridy++;
bottomPanel.add(new JLabel("Ignore Strand "), bgbc);
bgbc.gridx = 1;
ignoreStrandBox = new JCheckBox();
ignoreStrandBox.setSelected(true);
bottomPanel.add(ignoreStrandBox, bgbc);
optionPanel.add(bottomPanel, gbc);
return optionPanel;
}
Aggregations