Package jpianotrain.staff

Examples of jpianotrain.staff.Chord


   * may be <code>null</code> if
   * nothing is selected.
   *
   */
  public Chord getChord() {
    Chord c=null;
    return c;
  }
View Full Code Here


   * may be <code>null</code> if
   * nothing is selected.
   *
   */
  public Chord getChord() {
    Chord c=null;
    int len=notes.length;
    List<Note> noteList=new ArrayList<Note>();
    for (int i=0;i<len;i++) {
      if (notes[i].isEnabled()) {
        noteList.add(new Note((NoteName)notes[i].getSelectedItem()));
      }
    }

    if (noteList.size()>0) {
      c=new Chord(noteList);
    }

    return c;
  }
View Full Code Here

    Map<Integer, Chord> cMap=chordBuffer.get(rowWithoutEmpty);
    if (cMap==null) {
      cMap=new HashMap<Integer, Chord>();
      chordBuffer.put(rowWithoutEmpty, cMap);
    }
    Chord c=cMap.get(col-1);
    if (c==null) {
      c=Chord.create(s.getNote(noteIdx), columnNames.get(col-1));
      if (s.contains(c, true)) {
        cMap.put(col-1, c);
      } else {
View Full Code Here

  }
// ActionListener
  public void actionPerformed(ActionEvent e) {
    Object src=e.getSource();
    boolean enState=enCheck.isSelected();
    Chord c;
    if (quadChordCheck.isSelected()) {
      c=new Chord((NoteName)c1b.getSelectedItem(),
            (NoteName)c2b.getSelectedItem(),
            (NoteName)c3b.getSelectedItem(),
            (NoteName)c4b.getSelectedItem());
    } else {
      c=new Chord((NoteName)c1b.getSelectedItem(),
            (NoteName)c2b.getSelectedItem(),
            (NoteName)c3b.getSelectedItem());
    }

    if (lastSelection==null) {
View Full Code Here

                        isSelected,
                        hasFocus,
                        row,
                        column);
    } else if (val instanceof Chord) {
      Chord c=(Chord)val;
      return super.getTableCellRendererComponent(table,
                        c.toShortString(),
                        isSelected,
                        hasFocus,
                        row,
                        column);
    } else {
View Full Code Here

TOP

Related Classes of jpianotrain.staff.Chord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.