Пример #1
0
  @Override
  public boolean mouseMoved(int x, int y, MouseEvent source) {
    if (model.vlm.getAnnotationLocationVisible().length()
        < Configuration.getInt("geneStructureNucleotideWindow")) {
      ShortReadInsertion sri = null;
      for (java.util.Map.Entry<Rectangle, ShortReadInsertion> e :
          render.meta().paintedBlocks.entrySet()) {
        if (e.getKey().contains(x, y)) {
          sri = e.getValue();
          break;
        }
      }

      if (sri != null) {
        if (!tooltip.isVisible()) tooltip.setVisible(true);
        tooltip.set(source, sri);
      } else {
        if (tooltip.isVisible()) tooltip.setVisible(false);
      }
      //
      // System.out.println("Moved: " + x + " " + y);
      for (java.util.Map.Entry<Rectangle, SAMRecord> e : render.meta().hitMap.entrySet()) {
        if (e.getKey().contains(x, y)) {
          // System.out.println("Prijs: " + e.getValue());
          readinfo.set(source, e.getValue());
        }
      }
      //
      return false;

    } else {
      if (tooltip.isVisible()) tooltip.setVisible(false);
    }
    return false;
  }
Пример #2
0
  @Override
  public boolean mouseClicked(int x, int y, MouseEvent source) {
    super.mouseClicked(x, y, source);
    if (source.isConsumed()) return true;

    // System.out.println("Click: " + x + " " + y);
    if (source.getClickCount() > 1) {
      for (java.util.Map.Entry<Rectangle, SAMRecord> e : render.meta().hitMap.entrySet()) {
        if (e.getKey().contains(x, y)) {
          System.out.println("2*Click: " + e.getValue());
          if (e.getValue().getReadPairedFlag() && !e.getValue().getMateUnmappedFlag())
            model.vlm.center(e.getValue().getMateAlignmentStart());
        }
      }
    } else {
      readinfo.textual();
    }

    return false;
  }
Пример #3
0
 @Override
 public boolean mouseDragged(int x, int y, MouseEvent source) {
   tooltip.setVisible(false);
   readinfo.setVisible(false);
   return false;
 }