Package jpianotrain.gui

Examples of jpianotrain.gui.NoteButton


  public List<NoteButton> getComponents() {
    List<NoteButton> results=new ArrayList<NoteButton>();
    if (layer==null) {
      for(Note[] rows:notes) {
        for (Note col:rows) {
          results.add(new NoteButton(col));
        }
      }
    } else {
      int rowIdx=0;
      int colCount=notes[0].length;
      for(Note[] rows:notes) {
        int colIdx=0;
        for (Note col:rows) {
          NoteButton black=new NoteButton(col);
          if (rowIdx%2==0) {
            results.add(black);
            NoteButton red=new NoteButton(layer.notes[rowIdx][colIdx]);
            red.setForeground(Color.RED);
            results.add(red);
          } else {
            NoteButton red=new NoteButton(layer.notes[rowIdx][(colIdx+colCount-1)%colCount]);
            red.setForeground(Color.RED);
            results.add(red);
            results.add(black);
          }
          colIdx++;
        }
View Full Code Here

TOP

Related Classes of jpianotrain.gui.NoteButton

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.