Class GridWorldView

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class GridWorldView extends JFrame
View component for a GirdWorldModel.
See Also:
  • Field Details

    • cellSizeW

      protected int cellSizeW
    • cellSizeH

      protected int cellSizeH
    • drawArea

      protected jason.environment.grid.GridWorldView.GridCanvas drawArea
    • model

      protected GridWorldModel model
    • defaultFont

      protected Font defaultFont
  • Constructor Details

  • Method Details

    • initComponents

      public void initComponents(int width)
      sets the size of the frame and adds the components
    • repaint

      public void repaint()
      Overrides:
      repaint in class Component
    • update

      public void update()
      updates all the frame
    • update

      public void update(int x, int y)
      updates only one position of the grid
    • drawObstacle

      public void drawObstacle(Graphics g, int x, int y)
    • drawAgent

      public void drawAgent(Graphics g, int x, int y, Color c, int id)
    • drawString

      public void drawString(Graphics g, int x, int y, Font f, String s)
    • drawEmpty

      public void drawEmpty(Graphics g, int x, int y)
    • draw

      public void draw(Graphics g, int x, int y, int object)
      method to draw unknown object, probably overridden by the user viewer class
    • getCanvas

      public Canvas getCanvas()
    • getModel

      public GridWorldModel getModel()