Package HAL.Gui
Class UIGrid
- java.lang.Object
-
- HAL.Gui.UIGrid
-
- Direct Known Subclasses:
GridWindow
public class UIGrid extends java.lang.Object implements Grid2D, GuiComp
a gui item that is used to efficiently visualize a grid in 2 dimensions uses an array of pixels whose color values are individually set
-
-
Constructor Summary
Constructors Constructor Description UIGrid(int gridW, int gridH, int scaleFactor)UIGrid(int gridW, int gridH, int scaleFactor, boolean active)UIGrid(int gridW, int gridH, int scaleFactor, int compX, int compY)UIGrid(int gridW, int gridH, int scaleFactor, int compX, int compY, boolean active)
-
Method Summary
Modifier and Type Method Description void_GetComps(java.util.ArrayList<java.awt.Component> putHere, java.util.ArrayList<java.lang.Integer> coordsHere, java.util.ArrayList<java.lang.Integer> compSizesHere)called by the UIWindow class to place the vis windowvoidAddAlphaGrid(UIGrid overlay)adds another UIGrid as an overlay to compose with the main UIGrid.voidAddMouseListeners(java.awt.event.MouseAdapter mouseListener)adds a mouse listener function to the UIGrid that will be called whenever the user interacts with the UIGridvoidClear(int color)sets all pixels to a single color.doubleClickXpt(java.awt.event.MouseEvent e)gets the X coordinate of the mouse event in terms of the UIGrid coordinate space, useful with AddMouseListenersintClickXsq(java.awt.event.MouseEvent e)gets the X square of the mouse event in terms of the UIGrid coordinate space, useful with AddMouseListenersdoubleClickYpt(java.awt.event.MouseEvent e)gets the Y coordinate of the mouse event in terms of the UIGrid coordinate space, useful with AddMouseListenersintClickYsq(java.awt.event.MouseEvent e)gets the Y square of the mouse event in terms of the UIGrid coordinate space, useful with AddMouseListenersintcompX()gets the xDim component of the vis windowintcompY()gets the yDim component of the vis window<Q extends AgentBaseSpatial,T extends AgentGrid2D<Q>>
voidDrawAgents(T drawMe, AgentToColorInt<Q> ColorFn)sets every pixel in the UIGrid by iterating over the AgentGrid2D and drawing the first agent found at each position.<Q extends AgentBaseSpatial,T extends AgentGrid2D<Q>>
voidDrawAgents(T drawMe, AgentToColorInt<Q> ColorFn, Coords2DInt backgroundColor)sets every pixel in the UIGrid by iterating over the AgentGrid2D and drawing the first agent found at each position.<Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>>
voidDrawClosestAgentsXY(T drawMe, AgentToColorInt<Q> ColorFn)sets every pixel in the UIGrid by drawing the closest agent (agent with lowest Z value) at each X,Y pair, positions with no agent will be skipped<Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>>
voidDrawClosestAgentsXY(T drawMe, AgentToColorInt<Q> ColorFn, Coords2DInt backgroundColor)sets every pixel in the UIGrid by drawing the closest agent (agent with lowest Z value) at each X,Y pair, the background color will be used when no agent is found<Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>>
voidDrawClosestAgentsXZ(T drawMe, AgentToColorInt<Q> ColorFn)sets every pixel in the UIGrid by drawing the closest agent (agent with lowest Y value) at each X,Z pair, positions with no agent will be skipped<Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>>
voidDrawClosestAgentsXZ(T drawMe, AgentToColorInt<Q> ColorFn, Coords2DInt backgroundColor)sets every pixel in the UIGrid by drawing the closest agent (agent with lowest Y value) at each X,Z pair, the background color will be used when no agent is found<Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>>
voidDrawClosestAgentsYZ(T drawMe, AgentToColorInt<Q> ColorFn)sets every pixel in the UIGrid by drawing the closest agent (agent with lowest X value) at each Y,Z pair, positions with no agent will be skipped<Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>>
voidDrawClosestAgentsYZ(T drawMe, AgentToColorInt<Q> ColorFn, Coords2DInt backgroundColor)sets every pixel in the UIGrid by drawing the closest agent (agent with lowest X value) at each Y,Z pair, the background color will be used when no agent is found<Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>>
voidDrawFurthestAgentsXY(T drawMe, AgentToColorInt<Q> ColorFn)sets every pixel in the UIGrid by drawing the furthest agent (agent with highest Z value) at each X,Y pair, positions with no agent will be skipped<Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>>
voidDrawFurthestAgentsXY(T drawMe, AgentToColorInt<Q> ColorFn, Coords2DInt backgroundColor)sets every pixel in the UIGrid by drawing the furthest agent (agent with highest Z value) at each X,Y pair, the background color will be used when no agent is found<Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>>
voidDrawFurthestAgentsXZ(T drawMe, AgentToColorInt<Q> ColorFn)sets every pixel in the UIGrid by drawing the furthest agent (agent with highest Y value) at each X,Z pair, positions with no agent will be skipped<Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>>
voidDrawFurthestAgentsXZ(T drawMe, AgentToColorInt<Q> ColorFn, Coords2DInt backgroundColor)sets every pixel in the UIGrid by drawing the furthest agent (agent with highest Y value) at each X,Z pair, the background color will be used when no agent is found<Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>>
voidDrawFurthestAgentsYZ(T drawMe, AgentToColorInt<Q> ColorFn)sets every pixel in the UIGrid by drawing the furthest agent (agent with highest X value) at each Y,Z pair, positions with no agent will be skipped<Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>>
voidDrawFurthestAgentsYZ(T drawMe, AgentToColorInt<Q> ColorFn, Coords2DInt backgroundColor)sets every pixel in the UIGrid by drawing the furthest agent (agent with highest X value) at each Y,Z pair, the background color will be used when no agent is foundvoidDrawPDEGrid(PDEGrid2D drawMe, DoubleToInt ColorFn)sets every pixel in the UIGrid by reading values from the PDEGrid2DvoidDrawPDEGridXY(PDEGrid3D drawMe, DoubleToInt ColorFn)sets every pixel in the UIGrid by reading values from the PDEGrid3D, values are summed over the Z dimensionvoidDrawPDEGridXZ(PDEGrid3D drawMe, DoubleToInt ColorFn)sets every pixel in the UIGrid by reading values from the PDEGrid3D, values are summed over the Y dimensionvoidDrawPDEGridYZ(PDEGrid3D drawMe, DoubleToInt ColorFn)sets every pixel in the UIGrid by reading values from the PDEGrid3D, values are summed over the X dimensionintGetPix(int i)returns the pixel color at that location as a colorIntintGetPix(int x, int y)returns the pixel color at that location as a colorIntbooleanIsActive()returns whether the UIGrid is active (whether it exists)booleanIsWrapX()booleanIsWrapY()voidLegend(java.lang.String[] labels, int[] colors, int labelsColor, int bkColor, int xLeft, int yTop)intLength()voidPlotLine(double[] xs, double[] ys, int color)plots a line, connecting all pixels between the points defined by the x,y pairs from the xs and ys array with the provided colorvoidPlotLine(double[] xs, double[] ys, int color, double scale)plots a line, connecting all pixels between the points defined by the x,y pairs from the xs and ys array with the provided color.voidPlotLine(double[] xs, double[] ys, int color, int startPoint, int endPoint)plots a line, connecting all pixels between the points defined by the x,y pairs with the provided color.voidPlotLine(double[] xs, double[] ys, int color, int startPoint, int endPoint, double scale)plots a line, connecting all pixels between the points defined by the x,y pairs with the provided color.voidPlotLine(double[] xs, double[] ys, int color, int startPoint, int endPoint, double scaleX, double scaleY)plots a line, connecting all pixels between the points defined by the x,y pairs with the provided color.voidPlotLine(double[] xys, int color)plots a line, connecting all pixels between the points defined by the list of x,y,x,y...voidPlotLine(double[] xys, int color, double scale)plots a line, connecting all pixels between the points defined by the list of x,y,x,y...voidPlotLine(double[] xys, int color, int startPoint, int endPoint)plots a line, connecting all pixels between the points defined by the list of x,y,x,y...voidPlotLine(double[] xys, int color, int startPoint, int endPoint, double scale)plots a line, connecting all pixels between the points defined by the list of x,y,x,y...voidPlotLine(double[] xys, int color, int startPoint, int endPoint, double scaleX, double scaleY)plots a line, connecting all pixels between the points defined by the list of x,y,x,y...voidPlotSegment(double x1, double y1, double x2, double y2, int color)plots a line segment, connecting all pixels between the points defined by (x1,y1) and (x2,y2) with the provided color.voidPlotSegment(double x1, double y1, double x2, double y2, int color, double scale)plots a line segment, connecting all pixels between the points defined by (x1,y1) and (x2,y2) with the provided color.voidPlotSegment(double x1, double y1, double x2, double y2, int color, double scaleX, double scaleY)plots a line segment, connecting all pixels between the points defined by (x1,y1) and (x2,y2) with the provided color.voidSetActive(boolean isActive)can be used to inactivate the component, preventing drawing and other overheadvoidSetAll(Coords2DColor DrawPix)sets every pixel in the UIGrid using the DrawPix functionvoidSetChar(char c, int xLeft, int yTop, int color, int bkColor)draws a single character to the UIGridvoidSetPix(int i, int color)sets an individual pixel on the GridWindow.voidSetPix(int x, int y, int color)sets an individual pixel on the GridWindow.voidSetPix(int x, int y, ColorIntGenerator ColorFunction)same functionality as SetPix with a color argument, but instead takes a ColorIntGenerator function (a function that takes no arguments and returns an int).voidSetPix(int i, ColorIntGenerator ColorFunction)same functionality as SetPix with a color argument, but instead takes a ColorIntGenerator function (a function that takes no arguments and returns an int).voidSetPixRect(int color, int xLeft, int xRight, int yBottom, int yTop)voidSetRect(int xStart, int yStart, int xLen, int yLen, Coords2DColor ColorFn)sets a rectangular section of the UIGrid using the ColorFn argumentvoidSetString(java.lang.String s, int xLeft, int yTop, int color, int bkColor)draws a string to the UIGrid on a single line.voidSetString(java.lang.String s, int xLeft, int yTop, int color, int bkColor, int charsPerLine)voidSetString(java.lang.String s, int xLeft, int yTop, int color, int bkColor, int charsPerLine, int maxLines)voidTickPause(int millis)call this once per step of your model, and the function will ensure that your model runs at the rate provided in milliseconds.voidToGIF(java.lang.String path)saves the current state image to a GIFvoidToJPG(java.lang.String path)saves the current state image to a JPGvoidToPNG(java.lang.String path)saves the current state image to a PNGintXdim()intYdim()-
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
-
UIGrid
public UIGrid(int gridW, int gridH, int scaleFactor, int compX, int compY, boolean active)- Parameters:
gridW- width of the UIGrid in pixelsgridH- height of the UIGrid in pixelsscaleFactor- the width and height in screen pixels of each UIGrid pixelcompX- width on the gui GridBagLayoutcompY- height on the gui GridBagLayoutactive-
-
UIGrid
public UIGrid(int gridW, int gridH, int scaleFactor, int compX, int compY)
-
UIGrid
public UIGrid(int gridW, int gridH, int scaleFactor, boolean active)- Parameters:
gridW- width of the UIGrid in pixelsgridH- height of the UIGrid in pixelsscaleFactor- the width and height in screen pixels of each UIGrid pixel
-
UIGrid
public UIGrid(int gridW, int gridH, int scaleFactor)
-
-
Method Detail
-
TickPause
public void TickPause(int millis)
call this once per step of your model, and the function will ensure that your model runs at the rate provided in milliseconds. the function will take the amount time between calls into account to ensure a consistent tick rate.
-
SetPix
public void SetPix(int x, int y, int color)sets an individual pixel on the GridWindow. in the visualization the pixel will take up scaleFactor*scaleFactor screen pixels.
-
SetPix
public void SetPix(int i, int color)sets an individual pixel on the GridWindow. in the visualization the pixel will take up scaleFactor*scaleFactor screen pixels.
-
SetPix
public void SetPix(int x, int y, ColorIntGenerator ColorFunction)same functionality as SetPix with a color argument, but instead takes a ColorIntGenerator function (a function that takes no arguments and returns an int). the reason to use this method is that when the gui is inactivated the ColorIntGenerator function will not be called, which saves the computation time of generating the color.
-
SetPix
public void SetPix(int i, ColorIntGenerator ColorFunction)same functionality as SetPix with a color argument, but instead takes a ColorIntGenerator function (a function that takes no arguments and returns an int). the reason to use this method is that when the gui is inactivated the ColorIntGenerator function will not be called, which saves the computation time of generating the color.
-
GetPix
public int GetPix(int x, int y)returns the pixel color at that location as a colorInt
-
GetPix
public int GetPix(int i)
returns the pixel color at that location as a colorInt
-
Clear
public void Clear(int color)
sets all pixels to a single color.
-
SetRect
public void SetRect(int xStart, int yStart, int xLen, int yLen, Coords2DColor ColorFn)sets a rectangular section of the UIGrid using the ColorFn argument
-
AddAlphaGrid
public void AddAlphaGrid(UIGrid overlay)
adds another UIGrid as an overlay to compose with the main UIGrid. alpha blending will be used to combine them.
-
PlotSegment
public void PlotSegment(double x1, double y1, double x2, double y2, int color)plots a line segment, connecting all pixels between the points defined by (x1,y1) and (x2,y2) with the provided color.
-
PlotSegment
public void PlotSegment(double x1, double y1, double x2, double y2, int color, double scale)plots a line segment, connecting all pixels between the points defined by (x1,y1) and (x2,y2) with the provided color. the coordinates will be multiplied by the scale parameter
-
PlotSegment
public void PlotSegment(double x1, double y1, double x2, double y2, int color, double scaleX, double scaleY)plots a line segment, connecting all pixels between the points defined by (x1,y1) and (x2,y2) with the provided color. the coordinates will be multiplied by the scale parameters
-
PlotLine
public void PlotLine(double[] xys, int color)plots a line, connecting all pixels between the points defined by the list of x,y,x,y... pairs with the provided color
-
PlotLine
public void PlotLine(double[] xys, int color, double scale)plots a line, connecting all pixels between the points defined by the list of x,y,x,y... pairs with the provided color. the coordinates will be multiplied by the scale parameter
-
PlotLine
public void PlotLine(double[] xys, int color, int startPoint, int endPoint)plots a line, connecting all pixels between the points defined by the list of x,y,x,y... beginning with pair startPoint and ending with pair endPoint pairs with the provided color.
-
PlotLine
public void PlotLine(double[] xys, int color, int startPoint, int endPoint, double scale)plots a line, connecting all pixels between the points defined by the list of x,y,x,y... beginning with pair startPoint and ending with pair endPoint pairs with the provided color. the coordinates will be multiplied by the scale parameter
-
PlotLine
public void PlotLine(double[] xys, int color, int startPoint, int endPoint, double scaleX, double scaleY)plots a line, connecting all pixels between the points defined by the list of x,y,x,y... beginning with pair startPoint and ending with pair endPoint pairs with the provided color. the coordinates will be multiplied by the scale parameters
-
PlotLine
public void PlotLine(double[] xs, double[] ys, int color)plots a line, connecting all pixels between the points defined by the x,y pairs from the xs and ys array with the provided color
-
PlotLine
public void PlotLine(double[] xs, double[] ys, int color, double scale)plots a line, connecting all pixels between the points defined by the x,y pairs from the xs and ys array with the provided color.
-
PlotLine
public void PlotLine(double[] xs, double[] ys, int color, int startPoint, int endPoint, double scale)plots a line, connecting all pixels between the points defined by the x,y pairs with the provided color. the coordinates will be multiplied by the scale parameter beginning with pair startPoint and ending with pair endPoint
-
PlotLine
public void PlotLine(double[] xs, double[] ys, int color, int startPoint, int endPoint)plots a line, connecting all pixels between the points defined by the x,y pairs with the provided color. beginning with pair startPoint and ending with pair endPoint
-
PlotLine
public void PlotLine(double[] xs, double[] ys, int color, int startPoint, int endPoint, double scaleX, double scaleY)plots a line, connecting all pixels between the points defined by the x,y pairs with the provided color. the coordinates will be multiplied by the scale parametesr beginning with pair startPoint and ending with pair endPoint
-
compX
public int compX()
gets the xDim component of the vis window
-
compY
public int compY()
gets the yDim component of the vis window
-
IsActive
public boolean IsActive()
returns whether the UIGrid is active (whether it exists)
-
SetActive
public void SetActive(boolean isActive)
can be used to inactivate the component, preventing drawing and other overhead
-
ClickXpt
public double ClickXpt(java.awt.event.MouseEvent e)
gets the X coordinate of the mouse event in terms of the UIGrid coordinate space, useful with AddMouseListeners
-
ClickXsq
public int ClickXsq(java.awt.event.MouseEvent e)
gets the X square of the mouse event in terms of the UIGrid coordinate space, useful with AddMouseListeners
-
ClickYpt
public double ClickYpt(java.awt.event.MouseEvent e)
gets the Y coordinate of the mouse event in terms of the UIGrid coordinate space, useful with AddMouseListeners
-
ClickYsq
public int ClickYsq(java.awt.event.MouseEvent e)
gets the Y square of the mouse event in terms of the UIGrid coordinate space, useful with AddMouseListeners
-
AddMouseListeners
public void AddMouseListeners(java.awt.event.MouseAdapter mouseListener)
adds a mouse listener function to the UIGrid that will be called whenever the user interacts with the UIGrid
-
SetAll
public void SetAll(Coords2DColor DrawPix)
sets every pixel in the UIGrid using the DrawPix function
-
DrawPDEGrid
public void DrawPDEGrid(PDEGrid2D drawMe, DoubleToInt ColorFn)
sets every pixel in the UIGrid by reading values from the PDEGrid2D
-
DrawPDEGridXY
public void DrawPDEGridXY(PDEGrid3D drawMe, DoubleToInt ColorFn)
sets every pixel in the UIGrid by reading values from the PDEGrid3D, values are summed over the Z dimension
-
DrawPDEGridYZ
public void DrawPDEGridYZ(PDEGrid3D drawMe, DoubleToInt ColorFn)
sets every pixel in the UIGrid by reading values from the PDEGrid3D, values are summed over the X dimension
-
DrawPDEGridXZ
public void DrawPDEGridXZ(PDEGrid3D drawMe, DoubleToInt ColorFn)
sets every pixel in the UIGrid by reading values from the PDEGrid3D, values are summed over the Y dimension
-
DrawAgents
public <Q extends AgentBaseSpatial,T extends AgentGrid2D<Q>> void DrawAgents(T drawMe, AgentToColorInt<Q> ColorFn, Coords2DInt backgroundColor)
sets every pixel in the UIGrid by iterating over the AgentGrid2D and drawing the first agent found at each position. the background color will be used when no agent exists
-
DrawAgents
public <Q extends AgentBaseSpatial,T extends AgentGrid2D<Q>> void DrawAgents(T drawMe, AgentToColorInt<Q> ColorFn)
sets every pixel in the UIGrid by iterating over the AgentGrid2D and drawing the first agent found at each position. positions with no agent will be skipped
-
DrawClosestAgentsXY
public <Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>> void DrawClosestAgentsXY(T drawMe, AgentToColorInt<Q> ColorFn, Coords2DInt backgroundColor)
sets every pixel in the UIGrid by drawing the closest agent (agent with lowest Z value) at each X,Y pair, the background color will be used when no agent is found
-
DrawClosestAgentsXZ
public <Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>> void DrawClosestAgentsXZ(T drawMe, AgentToColorInt<Q> ColorFn, Coords2DInt backgroundColor)
sets every pixel in the UIGrid by drawing the closest agent (agent with lowest Y value) at each X,Z pair, the background color will be used when no agent is found
-
DrawClosestAgentsYZ
public <Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>> void DrawClosestAgentsYZ(T drawMe, AgentToColorInt<Q> ColorFn, Coords2DInt backgroundColor)
sets every pixel in the UIGrid by drawing the closest agent (agent with lowest X value) at each Y,Z pair, the background color will be used when no agent is found
-
DrawFurthestAgentsXY
public <Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>> void DrawFurthestAgentsXY(T drawMe, AgentToColorInt<Q> ColorFn, Coords2DInt backgroundColor)
sets every pixel in the UIGrid by drawing the furthest agent (agent with highest Z value) at each X,Y pair, the background color will be used when no agent is found
-
DrawFurthestAgentsXZ
public <Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>> void DrawFurthestAgentsXZ(T drawMe, AgentToColorInt<Q> ColorFn, Coords2DInt backgroundColor)
sets every pixel in the UIGrid by drawing the furthest agent (agent with highest Y value) at each X,Z pair, the background color will be used when no agent is found
-
DrawFurthestAgentsYZ
public <Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>> void DrawFurthestAgentsYZ(T drawMe, AgentToColorInt<Q> ColorFn, Coords2DInt backgroundColor)
sets every pixel in the UIGrid by drawing the furthest agent (agent with highest X value) at each Y,Z pair, the background color will be used when no agent is found
-
DrawClosestAgentsXY
public <Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>> void DrawClosestAgentsXY(T drawMe, AgentToColorInt<Q> ColorFn)
sets every pixel in the UIGrid by drawing the closest agent (agent with lowest Z value) at each X,Y pair, positions with no agent will be skipped
-
DrawClosestAgentsXZ
public <Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>> void DrawClosestAgentsXZ(T drawMe, AgentToColorInt<Q> ColorFn)
sets every pixel in the UIGrid by drawing the closest agent (agent with lowest Y value) at each X,Z pair, positions with no agent will be skipped
-
DrawClosestAgentsYZ
public <Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>> void DrawClosestAgentsYZ(T drawMe, AgentToColorInt<Q> ColorFn)
sets every pixel in the UIGrid by drawing the closest agent (agent with lowest X value) at each Y,Z pair, positions with no agent will be skipped
-
DrawFurthestAgentsXY
public <Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>> void DrawFurthestAgentsXY(T drawMe, AgentToColorInt<Q> ColorFn)
sets every pixel in the UIGrid by drawing the furthest agent (agent with highest Z value) at each X,Y pair, positions with no agent will be skipped
-
DrawFurthestAgentsXZ
public <Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>> void DrawFurthestAgentsXZ(T drawMe, AgentToColorInt<Q> ColorFn)
sets every pixel in the UIGrid by drawing the furthest agent (agent with highest Y value) at each X,Z pair, positions with no agent will be skipped
-
DrawFurthestAgentsYZ
public <Q extends AgentBaseSpatial,T extends AgentGrid3D<Q>> void DrawFurthestAgentsYZ(T drawMe, AgentToColorInt<Q> ColorFn)
sets every pixel in the UIGrid by drawing the furthest agent (agent with highest X value) at each Y,Z pair, positions with no agent will be skipped
-
ToPNG
public void ToPNG(java.lang.String path)
saves the current state image to a PNG
-
ToJPG
public void ToJPG(java.lang.String path)
saves the current state image to a JPG
-
ToGIF
public void ToGIF(java.lang.String path)
saves the current state image to a GIF
-
SetString
public void SetString(java.lang.String s, int xLeft, int yTop, int color, int bkColor)draws a string to the UIGrid on a single line. will crash if the UIGrid is too short
-
SetString
public void SetString(java.lang.String s, int xLeft, int yTop, int color, int bkColor, int charsPerLine, int maxLines)
-
SetString
public void SetString(java.lang.String s, int xLeft, int yTop, int color, int bkColor, int charsPerLine)
-
SetPixRect
public void SetPixRect(int color, int xLeft, int xRight, int yBottom, int yTop)
-
Legend
public void Legend(java.lang.String[] labels, int[] colors, int labelsColor, int bkColor, int xLeft, int yTop)
-
SetChar
public void SetChar(char c, int xLeft, int yTop, int color, int bkColor)draws a single character to the UIGrid
-
_GetComps
public void _GetComps(java.util.ArrayList<java.awt.Component> putHere, java.util.ArrayList<java.lang.Integer> coordsHere, java.util.ArrayList<java.lang.Integer> compSizesHere)called by the UIWindow class to place the vis window
-
-