Methapolis  0.27
 All Classes Namespaces Files Functions Variables Enumerator
micropolisj.gui.MicropolisDrawingArea Class Reference
Inheritance diagram for micropolisj.gui.MicropolisDrawingArea:
Collaboration diagram for micropolisj.gui.MicropolisDrawingArea:

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)

Detailed Description

Definition at line 24 of file MicropolisDrawingArea.java.

Constructor & Destructor Documentation

Member Function Documentation

void micropolisj.gui.MicropolisDrawingArea.continueDrag ( int  x,
int  y 
)
protected
void micropolisj.gui.MicropolisDrawingArea.endDrag ( int  x,
int  y 
)
protected
CityLocation micropolisj.gui.MicropolisDrawingArea.getCityLocation ( int  x,
int  y 
)
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().

Here is the call graph for this function:

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.

Rectangle micropolisj.gui.MicropolisDrawingArea.getSpriteBounds ( Sprite  sprite,
int  x,
int  y 
)
private
Rectangle micropolisj.gui.MicropolisDrawingArea.getTileBounds ( int  xpos,
int  ypos 
)
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.selectTileSize ( int  newTileSize)
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().

Here is the call graph for this function:

void micropolisj.gui.MicropolisDrawingArea.setToolCursor ( CityRect  newRect,
MicropolisTool  tool 
)
void micropolisj.gui.MicropolisDrawingArea.setToolCursor ( ToolCursor  newCursor)

Definition at line 268 of file MicropolisDrawingArea.java.

void micropolisj.gui.MicropolisDrawingArea.setToolPreview ( ToolPreview  newPreview)
void micropolisj.gui.MicropolisDrawingArea.spriteMoved ( Sprite  sprite)

Definition at line 381 of file MicropolisDrawingArea.java.

References micropolisj.gui.MicropolisDrawingArea.getSpriteBounds().

Here is the call graph for this function:

void micropolisj.gui.MicropolisDrawingArea.startDrag ( int  x,
int  y 
)
protected
void micropolisj.gui.MicropolisDrawingArea.tileChanged ( int  xpos,
int  ypos 
)

Definition at line 388 of file MicropolisDrawingArea.java.

References micropolisj.gui.MicropolisDrawingArea.getTileBounds().

Here is the call graph for this function:

void micropolisj.gui.MicropolisDrawingArea.wholeMapChanged ( )

Definition at line 394 of file MicropolisDrawingArea.java.


The documentation for this class was generated from the following file: