Package com.gmail.jafelds.ppedits.enums

Examples of com.gmail.jafelds.ppedits.enums.Styles


   * Ensure that we have a song name and a style.
   */
  private void sanityChecker()
  {
    String sName = getSongName();
    Styles s = getStyle();
    if ((sName != null) && (s != null))
    {
      setMeasures(sqlite.getMeasuresByName(sName));
      setupMeasures(getMeasures(), s.getColumns());
    }
  }
View Full Code Here


      {
        return false;
      }
     
      line = in.nextLine().trim();
      Styles s = Styles.getEnum(line.substring(0, line.indexOf(':')));
      if (s == null)
      {
        return false;
      }
      setStyle(s);
     
      line = in.nextLine().trim();
      String edit = line.substring(0, line.indexOf(':'));
      if (edit.length() == 0)
      {
        edit = "Replace This";
      }
      else if (edit.length() > 12)
      {
        return false; // too long.
      }
      setEditName(edit);
     
      in.nextLine(); // Edit: line: skip.
     
      line = in.nextLine().trim();
      line = line.substring(0, line.indexOf(':'));
      setDifficulty(Integer.parseInt(line));
      in.nextLine();
     
     
      ArrayList<String> rows = new ArrayList<String>();
     
      boolean done = false;
      int measure = 0;
      final int MAX = 192;
     
      while (!done)
      {
        line = in.nextLine().trim();
        if (line.length() == 0 || line.charAt(0) == ','
          || line.charAt(0) == ';' || line.substring(0, 2).equals("//"))
        {
          if (rows.isEmpty())
          {
            continue;
          }
          int i = 0;
          for (String l : rows)
          {
            getMeasure(measure).getBeat(i * MAX / rows.size()).setRow(l);
            i++;
          }
          rows.clear();
          if (line.charAt(0) == ';')
          {
            done = true;
          }
          measure++;
        }
        else
        {
          rows.add(line.substring(0, s.getColumns()));
        }
      }
    }
    catch (FileNotFoundException e)
    {
View Full Code Here

       * arrows and graphics into the GUI.
       */
      private void loadChart()
      {
        notes.clear(); // Be sure everything got wiped out.
        Styles s = ch.getStyle();
        int cols = s.getColumns();
        sEdit.setText(ch.getEditName());
        iDiff.setText(ch.getDifficulty() + "");
       
        for (int i = 0; i < ch.getMeasures(); i++)
        {
View Full Code Here

       * arrows and graphics into the GUI.
       */
      private void loadChart()
      {
        notes.clear(); // Be sure everything got wiped out.
        Styles s = ch.getStyle();
        int cols = s.getColumns();
        sEdit.setText(ch.getEditName());
        iDiff.setText(ch.getDifficulty() + "");
       
        for (int i = 0; i < ch.getMeasures(); i++)
        {
View Full Code Here

TOP

Related Classes of com.gmail.jafelds.ppedits.enums.Styles

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.