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

Classes

class  ConnectedView

Public Member Functions

 OverlayMapView (Micropolis _engine)
Micropolis getEngine ()
void setEngine (Micropolis newEngine)
MapState getMapState ()
Dimension getPreferredSize ()
void setMapState (MapState newState)
void paintComponent (Graphics gr)
Dimension getPreferredScrollableViewportSize ()
int getScrollableBlockIncrement (Rectangle visibleRect, int orientation, int direction)
boolean getScrollableTracksViewportWidth ()
boolean getScrollableTracksViewportHeight ()
int getScrollableUnitIncrement (Rectangle visibleRect, int orientation, int direction)
void mapOverlayDataChanged (MapState overlayDataType)
void spriteMoved (Sprite sprite)
void tileChanged (int xpos, int ypos)
void wholeMapChanged ()
void dragViewToCityCenter ()
void connectView (MicropolisDrawingArea view, JScrollPane scrollPane)

Private Member Functions

Color getCI (int x)
Color getCI_rog (int x)
void drawPollutionMap (Graphics gr)
void drawCrimeMap (Graphics gr)
void drawPopDensity (Graphics gr)
void drawRateOfGrowth (Graphics gr)
void drawFireRadius (Graphics gr)
void drawPoliceRadius (Graphics gr)
void maybeDrawRect (Graphics gr, Color col, int x, int y, int width, int height)
int checkPower (BufferedImage img, int x, int y, int rawTile)
int checkLandValueOverlay (BufferedImage img, int xpos, int ypos, int tile)
int checkTrafficOverlay (BufferedImage img, int xpos, int ypos, int tile)
void dragViewTo (Point p)
void onMousePressed (MouseEvent ev)
void onMouseDragged (MouseEvent ev)

Detailed Description

Definition at line 22 of file OverlayMapView.java.

Constructor & Destructor Documentation

micropolisj.gui.OverlayMapView.OverlayMapView ( Micropolis  _engine)

Member Function Documentation

int micropolisj.gui.OverlayMapView.checkLandValueOverlay ( BufferedImage  img,
int  xpos,
int  ypos,
int  tile 
)
private

Definition at line 259 of file OverlayMapView.java.

References micropolisj.gui.OverlayMapView.getCI(), and micropolisj.engine.Micropolis.getLandValue().

Referenced by micropolisj.gui.OverlayMapView.paintComponent().

Here is the call graph for this function:

int micropolisj.gui.OverlayMapView.checkPower ( BufferedImage  img,
int  x,
int  y,
int  rawTile 
)
private

Definition at line 230 of file OverlayMapView.java.

Referenced by micropolisj.gui.OverlayMapView.paintComponent().

int micropolisj.gui.OverlayMapView.checkTrafficOverlay ( BufferedImage  img,
int  xpos,
int  ypos,
int  tile 
)
private

Definition at line 279 of file OverlayMapView.java.

References micropolisj.gui.OverlayMapView.getCI(), and micropolisj.engine.Micropolis.getTrafficDensity().

Referenced by micropolisj.gui.OverlayMapView.paintComponent().

Here is the call graph for this function:

void micropolisj.gui.OverlayMapView.connectView ( MicropolisDrawingArea  view,
JScrollPane  scrollPane 
)

Definition at line 540 of file OverlayMapView.java.

Referenced by micropolisj.gui.MainWindow.MainWindow().

void micropolisj.gui.OverlayMapView.dragViewTo ( Point  p)
private
void micropolisj.gui.OverlayMapView.drawCrimeMap ( Graphics  gr)
private
void micropolisj.gui.OverlayMapView.drawFireRadius ( Graphics  gr)
private
void micropolisj.gui.OverlayMapView.drawPoliceRadius ( Graphics  gr)
private
void micropolisj.gui.OverlayMapView.drawPollutionMap ( Graphics  gr)
private
void micropolisj.gui.OverlayMapView.drawPopDensity ( Graphics  gr)
private
void micropolisj.gui.OverlayMapView.drawRateOfGrowth ( Graphics  gr)
private
Color micropolisj.gui.OverlayMapView.getCI_rog ( int  x)
private
Micropolis micropolisj.gui.OverlayMapView.getEngine ( )

Definition at line 51 of file OverlayMapView.java.

MapState micropolisj.gui.OverlayMapView.getMapState ( )

Definition at line 74 of file OverlayMapView.java.

Referenced by micropolisj.gui.MainWindow.setMapState().

Dimension micropolisj.gui.OverlayMapView.getPreferredScrollableViewportSize ( )

Definition at line 455 of file OverlayMapView.java.

Dimension micropolisj.gui.OverlayMapView.getPreferredSize ( )

Definition at line 80 of file OverlayMapView.java.

References micropolisj.engine.Micropolis.getHeight(), and micropolisj.engine.Micropolis.getWidth().

Here is the call graph for this function:

int micropolisj.gui.OverlayMapView.getScrollableBlockIncrement ( Rectangle  visibleRect,
int  orientation,
int  direction 
)

Definition at line 461 of file OverlayMapView.java.

boolean micropolisj.gui.OverlayMapView.getScrollableTracksViewportHeight ( )

Definition at line 476 of file OverlayMapView.java.

boolean micropolisj.gui.OverlayMapView.getScrollableTracksViewportWidth ( )

Definition at line 470 of file OverlayMapView.java.

int micropolisj.gui.OverlayMapView.getScrollableUnitIncrement ( Rectangle  visibleRect,
int  orientation,
int  direction 
)

Definition at line 482 of file OverlayMapView.java.

void micropolisj.gui.OverlayMapView.mapOverlayDataChanged ( MapState  overlayDataType)

Definition at line 491 of file OverlayMapView.java.

void micropolisj.gui.OverlayMapView.onMouseDragged ( MouseEvent  ev)
private

Definition at line 553 of file OverlayMapView.java.

References micropolisj.gui.OverlayMapView.dragViewTo().

Referenced by micropolisj.gui.OverlayMapView.OverlayMapView().

Here is the call graph for this function:

void micropolisj.gui.OverlayMapView.onMousePressed ( MouseEvent  ev)
private

Definition at line 547 of file OverlayMapView.java.

References micropolisj.gui.OverlayMapView.dragViewTo().

Referenced by micropolisj.gui.OverlayMapView.OverlayMapView().

Here is the call graph for this function:

void micropolisj.gui.OverlayMapView.setMapState ( MapState  newState)

Definition at line 88 of file OverlayMapView.java.

Referenced by micropolisj.gui.MainWindow.setMapState().

void micropolisj.gui.OverlayMapView.spriteMoved ( Sprite  sprite)

Definition at line 497 of file OverlayMapView.java.

void micropolisj.gui.OverlayMapView.tileChanged ( int  xpos,
int  ypos 
)

Definition at line 502 of file OverlayMapView.java.

void micropolisj.gui.OverlayMapView.wholeMapChanged ( )

Definition at line 509 of file OverlayMapView.java.

References micropolisj.engine.Micropolis.calculateCenterMass(), and micropolisj.gui.OverlayMapView.dragViewToCityCenter().

Here is the call graph for this function:


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