@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;
  }
Beispiel #2
0
 public final String shortDisplayName() {
   String alias = Configuration.get("track:alias:" + dataKey);
   if (alias != null && alias.length() > 0) return alias;
   else {
     String dn = "" + dataKey;
     int sepIdx = Math.max(dn.lastIndexOf('/'), dn.lastIndexOf('\\')) + 1;
     if (sepIdx < 0) sepIdx = 0;
     dn = dn.substring(sepIdx);
     dn = dn.replaceAll("(\\.[a-zA-Z0-9]{3})+$", "");
     return dn;
   }
 }
Beispiel #3
0
  protected TrackConfig(Model model, DataKey dataKey) {
    this.dataKey = dataKey;
    this.model = model;
    guicontainer.add(
        new JLabel(MessageManager.getString("trackconfig.track_key") + " \n" + dataKey),
        guicontainer.gc);
    guicontainer.gc.gridy++;

    guicontainer.add(
        new StringConfig(
            "track:alias:" + dataKey, MessageManager.getString("trackconfig.track_alias"), model),
        guicontainer.gc);
    guicontainer.gc.gridy++;
    Configuration.getVisible(dataKey);
    guicontainer.add(
        new BooleanConfig(
            "track:visible:" + dataKey,
            MessageManager.getString("trackconfig.track_visible"),
            model),
        guicontainer.gc);
    guicontainer.gc.gridy++;
    guicontainer.add(
        new BooleanConfig(
            "track:highlight:" + dataKey,
            MessageManager.getString("trackconfig.track_highlight"),
            model),
        guicontainer.gc);

    if (isCollapsible()) {
      guicontainer.gc.gridy++;
      guicontainer.add(
          new BooleanConfig(
              "track:collapsed:" + dataKey,
              MessageManager.getString("trackconfig.track_collapsed"),
              model),
          guicontainer.gc);
    }
  }
Beispiel #4
0
 public final String displayName() {
   String alias = Configuration.get("track:alias:" + dataKey);
   if (alias != null && alias.length() > 0) return alias;
   else return "" + dataKey;
 }
Beispiel #5
0
 public boolean isCollapsed() {
   return Configuration.getBoolean("track:collapsed:" + dataKey);
 }
Beispiel #6
0
 public void setCollapsed(boolean collapsed) {
   Configuration.set("track:collapsed:" + dataKey, collapsed);
   setChanged();
   notifyObservers("TrackConfig::setCollapsed");
 }
Beispiel #7
0
 public void setVisible(boolean visible) {
   Configuration.setVisible(dataKey, visible);
   setChanged();
   notifyObservers("TrackConfig::setVisible");
 }
Beispiel #8
0
 public boolean isVisible() {
   return Configuration.getVisible(dataKey);
 }