Ejemplo n.º 1
0
 protected TGChordImpl getChord(int x, int y, boolean setAsSelected) {
   for (TGChord graphicChord : this.graphicChords) {
     TGChordImpl chord = (TGChordImpl) graphicChord;
     int x1 = chord.getPosX();
     int x2 = x1 + chord.getWidth();
     int y1 = chord.getPosY();
     int y2 = y1 + chord.getHeight();
     if (x > x1 && x < x2 && y > y1 && y < y2) {
       if (setAsSelected) {
         if (this.selectedChord != null) {
           this.selectedChord.dispose();
         }
         this.selectedChord = chord;
         chord.dispose();
       }
       return chord;
     }
   }
   return null;
 }
Ejemplo n.º 2
0
 public void disposeChords() {
   for (TGChord graphicChord : this.graphicChords) {
     ((TGChordImpl) graphicChord).dispose();
   }
   this.graphicChords.clear();
 }