Class GridPanel
raft.kilavuz.grid.GridPanel All Implemented Interfaces:
-
public class GridPanel
swing panel to display various information in a grid.
also visualizes path find results. can be used as a standalone application
or in another container
Constructor Summary |
GridPanel(int cellSize)creates a new GridPanel with no Grid information |
|
Method Summary |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getMenuBar()returns the menubar to control this GridPanel |
|
|
|
|
|
|
|
|
|
|
|
main(String[] args)main method to run GridPanel as a standalone application |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Constructor Detail
GridPanel
public GridPanel(int cellSize)
-
creates a new GridPanel with no Grid information
Parameters:
-
cellSize - number of pixels on screen to display a grid cell
GridPanel
public GridPanel(Grid grid, int cellSize) -
creates a new GridPanel
Parameters:
-
grid - the grid to display
-
cellSize - number of pixels on screen to display a grid cell
Method Detail
setGrid
public void setGrid(Grid grid) -
sets the grid to display
addListener
-
adds given listener to set of listeners.
does nothing if listener is already in set or listener is null
removeListener
-
remoevs given listener from set of listeners.
does nothing if listener is not in set
isTransitionsDisplayed
public boolean isTransitionsDisplayed()
-
check if transition between cells are displayed
setTransitionsDisplayed
public void setTransitionsDisplayed(boolean display)
-
sets if transition between cells are displayed
isSectorsDisplayed
public boolean isSectorsDisplayed()
-
check if sectors are displayed
setSectorsDisplayed
public void setSectorsDisplayed(boolean display)
-
sets if sectors are displayed
isSectorNumbersDisplayed
public boolean isSectorNumbersDisplayed()
-
check if sectors numbers are displayed
setSectorNumbersDisplayed
public void setSectorNumbersDisplayed(boolean display)
-
sets if sectors numbers are displayed
isPortalsDisplayed
public boolean isPortalsDisplayed()
-
check if portals are displayed
setPortalsDisplayed
public void setPortalsDisplayed(boolean display)
-
sets if portals are displayed
isGridDisplayed
public boolean isGridDisplayed()
-
check if grid are displayed
setGridDisplayed
public void setGridDisplayed(boolean display)
-
sets if grid are displayed
setCellSize
public void setCellSize(int cellSize)
-
sets cell size. ie how many pixels a cell occupies on screen
findPathSectorToSector
public void findPathSectorToSector()
-
asks user for sector id's in a dialog and finds path between
findPathCellToCell
public void findPathCellToCell()
-
asks user for cell id's in a dialog and finds path between
findPathVectorToVector
public void findPathVectorToVector()
-
asks user for two vectors in world space in a dialog and finds path between
findPath
-
finds path between given cells and displays it
findPath
-
finds path between given sectors and displays it
findPath
-
finds path between given points and displays it
paintComponent
-
paints GridPanel on given graphics
Overrides:
-
getMenuBar
-
returns the menubar to control this GridPanel
main
-
main method to run GridPanel as a standalone application
-
Throws:
-
DocFlex/Doclet is both a multi-format Javadoc doclet and a free edition of DocFlex/Javadoc. If you need to customize your Javadoc without writing a full-blown doclet from scratch, DocFlex/Javadoc may be the only tool able to help you! Find out more at www.docflex.com