Package org.nlogo.api

Examples of org.nlogo.api.PlotPenInterface


          if (value instanceof Junk) {
            return;
          }
          scala.Option<PlotPenInterface> penMaybe = plot.getPen((String) value);
          if (penMaybe.isDefined()) {
            PlotPenInterface pen = penMaybe.get();
            pen.isDown_$eq(readBoolean(line[1]));
            pen.mode_$eq((int) readNumber(line[2]));
            pen.interval_$eq(readNumber(line[3]));
            pen.color_$eq(org.nlogo.api.Color.getARGBbyPremodulatedColorNumber
                (readNumber(line[4])));
            pen.x_$eq(readNumber(line[5]));
          } else {
            errorHandler.showError("Error Importing Plots",
                "The pen \"" + value + "\" does not exist.", false);
            while (hasMoreLines(false)) {
              nextLine();
View Full Code Here


        while (hasMoreLines(true)) {
          String[] data = nextLine();
          for (int i = 0; i < pens.length; i++) {
            scala.Option<PlotPenInterface> penMaybe = plot.getPen(pens[i]);
            if (penMaybe.isDefined()) {
              PlotPenInterface pen = penMaybe.get();
              // there may be blank fields in the list of points
              // since some pens may have more points than others.
              if (data[i * 4].length() > 0) {
                try {
                  pen.plot(readNumber(data[i * 4]),
                      readNumber(data[i * 4 + 1]),
                      org.nlogo.api.Color.getARGBbyPremodulatedColorNumber
                          ((int) readNumber(data[i * 4 + 2])),
                      readBoolean(data[i * 4 + 3]));
                } catch (ClassCastException e) {
View Full Code Here

TOP

Related Classes of org.nlogo.api.PlotPenInterface

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.