Class GridCanvasContext

java.lang.Object
org.baseagent.ui.GridCanvasContext

public class GridCanvasContext extends Object
  • Constructor Details

    • GridCanvasContext

      public GridCanvasContext(Simulation simulation, Grid grid, GridCanvas gridCanvas, int cellWidth, int cellHeight, int cellXSpacing, int cellYSpacing)
  • Method Details

    • getSimulation

      public Simulation getSimulation()
    • getGrid

      public Grid getGrid()
    • getGridCanvas

      public GridCanvas getGridCanvas()
    • getCellWidth

      public int getCellWidth()
    • setCellWidth

      public void setCellWidth(int cellWidth)
    • getCellHeight

      public int getCellHeight()
    • setCellHeight

      public void setCellHeight(int cellHeight)
    • getCellXSpacing

      public int getCellXSpacing()
    • setCellXSpacing

      public void setCellXSpacing(int cellXSpacing)
    • getCellYSpacing

      public int getCellYSpacing()
    • setCellYSpacing

      public void setCellYSpacing(int cellYSpacing)
    • getXFactor

      public double getXFactor()
      Returns a factor of (the cell width plus the cell X spacing) times the zoom.
    • getYFactor

      public double getYFactor()
      Returns a factor of (the cell height plus the cell Y spacing) times the zoom.
    • setGraphicsContext

      public void setGraphicsContext(javafx.scene.canvas.GraphicsContext gc)
    • getGraphicsContext

      public javafx.scene.canvas.GraphicsContext getGraphicsContext()
    • setColorPalette

      public void setColorPalette(List<javafx.scene.paint.Color> colors)
    • getColorPalette

      public List<javafx.scene.paint.Color> getColorPalette()
    • setProperties

      public void setProperties(Map<String,Object> props)
    • getProperties

      public Map<String,Object> getProperties()
    • setZoom

      public void setZoom(double zoom)
    • getZoom

      public double getZoom()
    • changeZoom

      public void changeZoom(double delta)