Examples of Grid2D


Examples of org.jamesii.gui.visualization.grid.Grid2D

      IWindow window =
          new AbstractWindow("CA Visualization", null, Contribution.EDITOR) {

            @Override
            protected JComponent createContent() {
              grid = new Grid2D(FFStateModelObs.this);
              addGridCellListener(grid);
              return grid;
            }

            @Override
View Full Code Here

Examples of org.jamesii.gui.visualization.grid.Grid2D

    // currently
    // we have to do everything in two different data structures
    gridModel = new EditableCAGrid2DModel(caGrid);

    // grid
    grid = new Grid2D(gridModel);
    // gridModel.addGridCellListener(grid);
    p.add(grid, BorderLayout.CENTER);

    // state list, just for instantiation
    stateList = new JStateList(null, this.getModel());
View Full Code Here

Examples of org.jamesii.gui.visualization.grid.Grid2D

      IWindow window =
          new AbstractWindow("CA Visualization", null, Contribution.EDITOR) {

            @Override
            protected JComponent createContent() {
              grid = new Grid2D(CAStateModelObs.this);
              if (renderer != null) {
                grid.setCellRenderer(renderer);
              }
              addGridCellListener(grid);
              return grid;
View Full Code Here

Examples of org.jamesii.gui.visualization.grid.Grid2D

      IWindow window =
          new AbstractWindow("CA Visualization", null, Contribution.EDITOR) {

            @Override
            protected JComponent createContent() {
              grid = new Grid2D(CA1DStateModelObs.this);
              if (renderer != null) {
                grid.setCellRenderer(renderer);
              }
              addGridCellListener(grid);
              return grid;
View Full Code Here

Examples of org.jamesii.gui.visualization.grid.Grid2D

    content.setLayout(new BorderLayout());

    wrtPanel = new JPanel(new FlowLayout());

    gridModel = new CAWolframGridModel(getModel());
    grid = new Grid2D(gridModel);
    grid.setPreferredSize(new Dimension(399, 49));
    grid.setZoom(50);
    grid.setLinesVisible(true);
    grid.setForeground(Color.gray);
    grid.setCellRenderer(new AbstractGridCellRenderer() {
View Full Code Here

Examples of org.jamesii.gui.visualization.grid.Grid2D

    Grid1DObserver obs = new Grid1DObserver(rule22Grid);

    JFrame frame = new JFrame("Wolfram's rules");

    Grid2D grid = new Grid2D(obs);

    grid.setCellRenderer(new AbstractGridCellRenderer() {
      @Override
      public void draw(Grid2D sender, Graphics g, int x, int y, int width,
          int height, Shape shape, int cellX, int cellY, Object value,
          boolean isSelected, boolean hasFocus) {
        Color c;
View Full Code Here

Examples of org.jamesii.model.carules.grid.object.Grid2D

      stream = new FileInputStream(fileName);
      if (stream.skip(skipChars) != skipChars) {
        return null;
      }

      ICARulesGrid grid = new Grid2D(new int[] { width, height }, 0);

      for (int y = 0; y < height; y++) {
        for (int x = 0; x < width; x++) {
          int s = stream.read();
          grid.setState(s, new int[] { x, y });
        }
        stream.read();
      }

      return grid;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.