public void unsafeRefreshChromosomes(SuperAdapter superAdapter) { if (chrBox1.getSelectedIndex() == 0 || chrBox2.getSelectedIndex() == 0) { chrBox1.setSelectedIndex(0); chrBox2.setSelectedIndex(0); } Chromosome chr1 = (Chromosome) chrBox1.getSelectedItem(); Chromosome chr2 = (Chromosome) chrBox2.getSelectedItem(); Chromosome chrX = chr1.getIndex() < chr2.getIndex() ? chr1 : chr2; Chromosome chrY = chr1.getIndex() < chr2.getIndex() ? chr2 : chr1; setNormalizationDisplayState(superAdapter.getHiC()); superAdapter.unsafeUpdateHiCChromosomes(chrX, chrY); updateThumbnail(superAdapter.getHiC()); }
public void setSelectedDisplayOption(MatrixType[] options, boolean control) { if (control) { MatrixType originalMatrixType = (MatrixType) displayOptionComboBox.getSelectedItem(); displayOptionComboBox.setModel(new DefaultComboBoxModel<MatrixType>(options)); int indx = 0; for (int i = 0; i < displayOptionComboBox.getItemCount(); i++) { if (originalMatrixType.equals(displayOptionComboBox.getItemAt(i))) { indx = i; break; } } displayOptionComboBox.setSelectedIndex(indx); } else { displayOptionComboBox.setModel(new DefaultComboBoxModel<MatrixType>(options)); displayOptionComboBox.setSelectedIndex(0); } }
private boolean isWholeGenome() { Chromosome chr1 = (Chromosome) chrBox1.getSelectedItem(); Chromosome chr2 = (Chromosome) chrBox2.getSelectedItem(); return chr1.getName().equals("All") || chr2.getName().equals("All"); }
private boolean isIntraChromosomal() { Chromosome chr1 = (Chromosome) chrBox1.getSelectedItem(); Chromosome chr2 = (Chromosome) chrBox2.getSelectedItem(); return chr1.getIndex() != chr2.getIndex(); }