Methapolis
0.27
|
Classes | |
class | ToolCursor |
Public Member Functions | |
MicropolisDrawingArea (Micropolis engine) | |
void | selectTileSize (int newTileSize) |
int | getTileSize () |
CityLocation | getCityLocation (int x, int y) |
Dimension | getPreferredSize () |
void | setEngine (Micropolis newEngine) |
void | paintComponent (Graphics gr) |
void | setToolCursor (CityRect newRect, MicropolisTool tool) |
void | setToolCursor (ToolCursor newCursor) |
void | setToolPreview (ToolPreview newPreview) |
Dimension | getPreferredScrollableViewportSize () |
int | getScrollableBlockIncrement (Rectangle visibleRect, int orientation, int direction) |
boolean | getScrollableTracksViewportWidth () |
boolean | getScrollableTracksViewportHeight () |
int | getScrollableUnitIncrement (Rectangle visibleRect, int orientation, int direction) |
Rectangle | getTileBounds (int xpos, int ypos) |
void | mapOverlayDataChanged (MapState overlayDataType) |
void | spriteMoved (Sprite sprite) |
void | tileChanged (int xpos, int ypos) |
void | wholeMapChanged () |
Protected Member Functions | |
void | startDrag (int x, int y) |
void | endDrag (int x, int y) |
void | continueDrag (int x, int y) |
Private Member Functions | |
Rectangle | getSpriteBounds (Sprite sprite, int x, int y) |
Definition at line 24 of file MicropolisDrawingArea.java.
micropolisj.gui.MicropolisDrawingArea.MicropolisDrawingArea | ( | Micropolis | engine | ) |
Definition at line 46 of file MicropolisDrawingArea.java.
References micropolisj.engine.Micropolis.addMapListener(), micropolisj.gui.MicropolisDrawingArea.continueDrag(), micropolisj.gui.MicropolisDrawingArea.endDrag(), micropolisj.gui.MicropolisDrawingArea.selectTileSize(), and micropolisj.gui.MicropolisDrawingArea.startDrag().
|
protected |
Definition at line 409 of file MicropolisDrawingArea.java.
Referenced by micropolisj.gui.MicropolisDrawingArea.MicropolisDrawingArea().
|
protected |
Definition at line 405 of file MicropolisDrawingArea.java.
Referenced by micropolisj.gui.MicropolisDrawingArea.MicropolisDrawingArea().
CityLocation micropolisj.gui.MicropolisDrawingArea.getCityLocation | ( | int | x, |
int | y | ||
) |
Definition at line 116 of file MicropolisDrawingArea.java.
Referenced by micropolisj.gui.MainWindow.onToolDown(), micropolisj.gui.MainWindow.onToolDrag(), and micropolisj.gui.MainWindow.onToolHover().
Dimension micropolisj.gui.MicropolisDrawingArea.getPreferredScrollableViewportSize | ( | ) |
Definition at line 324 of file MicropolisDrawingArea.java.
Dimension micropolisj.gui.MicropolisDrawingArea.getPreferredSize | ( | ) |
Definition at line 122 of file MicropolisDrawingArea.java.
References micropolisj.engine.Micropolis.getHeight(), and micropolisj.engine.Micropolis.getWidth().
int micropolisj.gui.MicropolisDrawingArea.getScrollableBlockIncrement | ( | Rectangle | visibleRect, |
int | orientation, | ||
int | direction | ||
) |
Definition at line 330 of file MicropolisDrawingArea.java.
boolean micropolisj.gui.MicropolisDrawingArea.getScrollableTracksViewportHeight | ( | ) |
Definition at line 345 of file MicropolisDrawingArea.java.
boolean micropolisj.gui.MicropolisDrawingArea.getScrollableTracksViewportWidth | ( | ) |
Definition at line 339 of file MicropolisDrawingArea.java.
int micropolisj.gui.MicropolisDrawingArea.getScrollableUnitIncrement | ( | Rectangle | visibleRect, |
int | orientation, | ||
int | direction | ||
) |
Definition at line 351 of file MicropolisDrawingArea.java.
|
private |
Definition at line 359 of file MicropolisDrawingArea.java.
Referenced by micropolisj.gui.MicropolisDrawingArea.spriteMoved().
Rectangle micropolisj.gui.MicropolisDrawingArea.getTileBounds | ( | int | xpos, |
int | ypos | ||
) |
Definition at line 369 of file MicropolisDrawingArea.java.
Referenced by micropolisj.gui.MainWindow.citySound(), and micropolisj.gui.MicropolisDrawingArea.tileChanged().
int micropolisj.gui.MicropolisDrawingArea.getTileSize | ( | ) |
Definition at line 111 of file MicropolisDrawingArea.java.
Referenced by micropolisj.gui.MainWindow.doZoom().
void micropolisj.gui.MicropolisDrawingArea.mapOverlayDataChanged | ( | MapState | overlayDataType | ) |
Definition at line 376 of file MicropolisDrawingArea.java.
void micropolisj.gui.MicropolisDrawingArea.paintComponent | ( | Graphics | gr | ) |
Definition at line 167 of file MicropolisDrawingArea.java.
References micropolisj.engine.Micropolis.allSprites(), micropolisj.engine.Micropolis.getHeight(), micropolisj.engine.Micropolis.getTile(), micropolisj.gui.TileImages.getTileImage(), micropolisj.engine.Micropolis.getWidth(), and micropolisj.engine.Micropolis.isTilePowered().
void micropolisj.gui.MicropolisDrawingArea.selectTileSize | ( | int | newTileSize | ) |
Definition at line 103 of file MicropolisDrawingArea.java.
References micropolisj.gui.TileImages.getInstance().
Referenced by micropolisj.gui.MainWindow.doZoom(), and micropolisj.gui.MicropolisDrawingArea.MicropolisDrawingArea().
void micropolisj.gui.MicropolisDrawingArea.setEngine | ( | Micropolis | newEngine | ) |
Definition at line 129 of file MicropolisDrawingArea.java.
References micropolisj.engine.Micropolis.addMapListener(), and micropolisj.engine.Micropolis.removeMapListener().
Referenced by micropolisj.gui.MainWindow.setEngine().
void micropolisj.gui.MicropolisDrawingArea.setToolCursor | ( | CityRect | newRect, |
MicropolisTool | tool | ||
) |
Definition at line 251 of file MicropolisDrawingArea.java.
Referenced by micropolisj.gui.MainWindow.onEscapePressed(), micropolisj.gui.MainWindow.onToolExited(), and micropolisj.gui.MainWindow.onToolHover().
void micropolisj.gui.MicropolisDrawingArea.setToolCursor | ( | ToolCursor | newCursor | ) |
Definition at line 268 of file MicropolisDrawingArea.java.
void micropolisj.gui.MicropolisDrawingArea.setToolPreview | ( | ToolPreview | newPreview | ) |
Definition at line 296 of file MicropolisDrawingArea.java.
References micropolisj.engine.CityRect.height, micropolisj.engine.CityRect.width, micropolisj.engine.CityRect.x, and micropolisj.engine.CityRect.y.
Referenced by micropolisj.gui.MainWindow.onEscapePressed(), and micropolisj.gui.MainWindow.onToolUp().
void micropolisj.gui.MicropolisDrawingArea.spriteMoved | ( | Sprite | sprite | ) |
Definition at line 381 of file MicropolisDrawingArea.java.
References micropolisj.gui.MicropolisDrawingArea.getSpriteBounds().
|
protected |
Definition at line 399 of file MicropolisDrawingArea.java.
Referenced by micropolisj.gui.MicropolisDrawingArea.MicropolisDrawingArea().
void micropolisj.gui.MicropolisDrawingArea.tileChanged | ( | int | xpos, |
int | ypos | ||
) |
Definition at line 388 of file MicropolisDrawingArea.java.
References micropolisj.gui.MicropolisDrawingArea.getTileBounds().
void micropolisj.gui.MicropolisDrawingArea.wholeMapChanged | ( | ) |
Definition at line 394 of file MicropolisDrawingArea.java.