public void setSelectedChromosomesNoRefresh( Chromosome xChrom, Chromosome yChrom, Context xContext, Context yContext) { chrBox1.setSelectedIndex(yChrom.getIndex()); chrBox2.setSelectedIndex(xChrom.getIndex()); rulerPanelX.setContext(xContext, HiCRulerPanel.Orientation.HORIZONTAL); rulerPanelY.setContext(yContext, HiCRulerPanel.Orientation.VERTICAL); resolutionSlider.setEnabled(!xChrom.getName().equals(Globals.CHR_ALL)); }
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); } }
public void setNormalizationDisplayState(HiC hic) { // Test for new dataset ("All"), or change in chromosome if (isWholeGenome()) { // for now only allow observed hic.setDisplayOption(MatrixType.OBSERVED); displayOptionComboBox.setSelectedIndex(0); normalizationComboBox.setSelectedIndex(0); } else if (isIntraChromosomal()) { if (hic.getDisplayOption() == MatrixType.PEARSON) { hic.setDisplayOption(MatrixType.OBSERVED); displayOptionComboBox.setSelectedIndex(0); } } normalizationComboBox.setEnabled(!isWholeGenome()); displayOptionComboBox.setEnabled(true); }
public void setEnabledForNormalization(String[] normalizationOptions, boolean status) { if (normalizationOptions.length == 1) { normalizationComboBox.setEnabled(false); } else { normalizationComboBox.setModel(new DefaultComboBoxModel<String>(normalizationOptions)); normalizationComboBox.setSelectedIndex(0); normalizationComboBox.setEnabled(status && !isWholeGenome()); } }
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 setNormalizationBox(int indx) { normalizationComboBox.setSelectedIndex(indx); }
public void setDisplayBox(int indx) { displayOptionComboBox.setSelectedIndex(indx); }
private void chrBox2ActionPerformed(ActionEvent e) { if (chrBox2.getSelectedIndex() == 0) { chrBox1.setSelectedIndex(0); } }
/* * Only accessed from within another unsafe method in Heatmap Panel class, * which in turn is encapsulated (i.e. made safe) */ public void unsafeSetSelectedChromosomes( SuperAdapter superAdapter, Chromosome xChrom, Chromosome yChrom) { chrBox1.setSelectedIndex(yChrom.getIndex()); chrBox2.setSelectedIndex(xChrom.getIndex()); unsafeRefreshChromosomes(superAdapter); }