Package HAL.Gui
Class GridWindow
- java.lang.Object
-
- HAL.Gui.UIGrid
-
- HAL.Gui.GridWindow
-
-
Constructor Summary
Constructors Constructor Description GridWindow(int xDim, int yDim)
the below constructors are variants of the above constructor with default values for some of the argumentsGridWindow(int xDim, int yDim, boolean active)
GridWindow(int xDim, int yDim, int scaleFactor)
GridWindow(int xDim, int yDim, int scaleFactor, boolean active)
GridWindow(int xDim, int yDim, int scaleFactor, boolean killOnClose, GuiCloseAction CloseAction)
GridWindow(int xDim, int yDim, int scaleFactor, boolean killOnClose, GuiCloseAction CloseAction, boolean active)
GridWindow(java.lang.String title, int xDim, int yDim)
GridWindow(java.lang.String title, int xDim, int yDim, boolean active)
GridWindow(java.lang.String title, int xDim, int yDim, int scaleFactor)
GridWindow(java.lang.String title, int xDim, int yDim, int scaleFactor, boolean active)
GridWindow(java.lang.String title, int xDim, int yDim, int scaleFactor, boolean killOnClose, GuiCloseAction CloseAction)
GridWindow(java.lang.String title, int xDim, int yDim, int scaleFactor, boolean killOnClose, GuiCloseAction CloseAction, boolean active)
Creates a new GridWindow
-
Method Summary
Modifier and Type Method Description void
AddKeyResponses(KeyResponse OnKeyDown, KeyResponse OnKeyUp)
takes 2 key response functions that will be called whenever a key is pressed or releasedvoid
Close()
disposes of the GridWindow.boolean
IsClosed()
boolean
IsKeyDown(char c)
returns whether the given key is currently pressedboolean
IsKeyDown(int keyCode)
returns whether the given key is currently pressed-
Methods inherited from class HAL.Gui.UIGrid
_GetComps, AddAlphaGrid, AddMouseListeners, Clear, ClickXpt, ClickXsq, ClickYpt, ClickYsq, compX, compY, DrawAgents, DrawAgents, DrawClosestAgentsXY, DrawClosestAgentsXY, DrawClosestAgentsXZ, DrawClosestAgentsXZ, DrawClosestAgentsYZ, DrawClosestAgentsYZ, DrawFurthestAgentsXY, DrawFurthestAgentsXY, DrawFurthestAgentsXZ, DrawFurthestAgentsXZ, DrawFurthestAgentsYZ, DrawFurthestAgentsYZ, DrawPDEGrid, DrawPDEGridXY, DrawPDEGridXZ, DrawPDEGridYZ, GetPix, GetPix, IsActive, IsWrapX, IsWrapY, Legend, Length, PlotLine, PlotLine, PlotLine, PlotLine, PlotLine, PlotLine, PlotLine, PlotLine, PlotLine, PlotLine, PlotSegment, PlotSegment, PlotSegment, SetActive, SetAll, SetChar, SetPix, SetPix, SetPix, SetPix, SetPixRect, SetRect, SetString, SetString, SetString, TickPause, ToGIF, ToJPG, ToPNG, Xdim, Ydim
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface HAL.Interfaces.Grid2D
AlongLineIs, ApplyHood, ApplyHood, ApplyHoodMapped, ApplyRectangle, BoundaryIs, ContainsValidI, ContainsValidI, DispX, DispY, Dist, DistSquared, GetHoodI, I, I, In, In, InWrap, ItoX, ItoY, MapHood, MapHood, MapHood, MapHood, MapI, MapXpt, MapXsq, MapYpt, MapYsq, RandomHoodI, WrapI
-
-
-
-
Constructor Detail
-
GridWindow
public GridWindow(java.lang.String title, int xDim, int yDim, int scaleFactor, boolean killOnClose, GuiCloseAction CloseAction, boolean active)
Creates a new GridWindow- Parameters:
title
- the title that will appear at the top of the window (default "")xDim
- the length in UIGrid squaresyDim
- the height in UIGrid squaresscaleFactor
- the conversion factor between a pixel width/height and the length/height of a UIGrid square (default 1)killOnClose
- whether the program should exit when the window is closed (default true)CloseAction
- function that runs when the window is closed (default null)active
- if set to false, the GridWindow will not actually render and its methods will be skipped (default true)
-
GridWindow
public GridWindow(int xDim, int yDim)
the below constructors are variants of the above constructor with default values for some of the arguments
-
GridWindow
public GridWindow(int xDim, int yDim, boolean active)
-
GridWindow
public GridWindow(int xDim, int yDim, int scaleFactor)
-
GridWindow
public GridWindow(int xDim, int yDim, int scaleFactor, boolean active)
-
GridWindow
public GridWindow(int xDim, int yDim, int scaleFactor, boolean killOnClose, GuiCloseAction CloseAction)
-
GridWindow
public GridWindow(int xDim, int yDim, int scaleFactor, boolean killOnClose, GuiCloseAction CloseAction, boolean active)
-
GridWindow
public GridWindow(java.lang.String title, int xDim, int yDim)
-
GridWindow
public GridWindow(java.lang.String title, int xDim, int yDim, boolean active)
-
GridWindow
public GridWindow(java.lang.String title, int xDim, int yDim, int scaleFactor)
-
GridWindow
public GridWindow(java.lang.String title, int xDim, int yDim, int scaleFactor, boolean active)
-
GridWindow
public GridWindow(java.lang.String title, int xDim, int yDim, int scaleFactor, boolean killOnClose, GuiCloseAction CloseAction)
-
-
Method Detail
-
IsKeyDown
public boolean IsKeyDown(char c)
returns whether the given key is currently pressed
-
IsKeyDown
public boolean IsKeyDown(int keyCode)
returns whether the given key is currently pressed
-
AddKeyResponses
public void AddKeyResponses(KeyResponse OnKeyDown, KeyResponse OnKeyUp)
takes 2 key response functions that will be called whenever a key is pressed or released
-
Close
public void Close()
disposes of the GridWindow.
-
IsClosed
public boolean IsClosed()
-
-