com.partnersoft.maps.view
Class MapViewPanel

java.lang.Object
  extended by com.partnersoft.maps.view.MapViewPanel
All Implemented Interfaces:
RoverConstants

public class MapViewPanel
extends java.lang.Object
implements RoverConstants

A GUI panel that display a MapView.

Copyright 2002-2009 Partner Software, Inc.

Version:
$Id: MapViewPanel.java 2474 2010-03-13 14:28:43Z paul $
Author:
Paul Reavis

Field Summary
 
Fields inherited from interface com.partnersoft.io.formats.rover.RoverConstants
ALIGN_BOTTOM_CENTER, ALIGN_BOTTOM_FIT, ALIGN_BOTTOM_LEFT, ALIGN_BOTTOM_RIGHT, ALIGN_CENTER, ALIGN_CENTER_LEFT, ALIGN_CENTER_RIGHT, ALIGN_CODE_CENTER, ALIGN_CODE_FIT, ALIGN_CODE_HIGH, ALIGN_CODE_LOW, ALIGN_FIT, ALIGN_FIT_LEFT, ALIGN_FIT_RIGHT, ALIGN_TOP_CENTER, ALIGN_TOP_FIT, ALIGN_TOP_LEFT, ALIGN_TOP_RIGHT, COMMENT, DATA_FIELDS_MAX, EOF, FLOAT_COORDS, GEOMETRY_TYPE_NAMES, HAS_DATA, HAS_OFFSET, HAS_ROTATION, IMAGE, LIST, MASK_TYPECODE, NAMING, POINT, POINT_COLOR, POLYGON, POLYLINE, POP, PUSH, ROTATION_MULT, TEXEL_COORD_MAX, TEXEL_COORD_SIZE, TEXT, TEXT_LONG, TILE_COORD_MAX, TILE_SIZE_PIXELS, VALUE
 
Constructor Summary
MapViewPanel(MapApp app)
           
 
Method Summary
 void addKeyListener(java.awt.event.KeyListener listener)
           
 void addMapMotionListener(MapMotionListener listener)
           
 void addMapMouseListener(MapMouseListener listener)
           
 void clearTextures()
           
protected  void finalize()
          Closes the statistics file.
 int getBaselineMillis()
          This property is used during benchmarking.
 RenderController getController()
           
 java.util.ArrayList<MapDataLink> getDataAt(double x, double y, int pixelX, int pixelY)
          Returns an array of MapDataLinks to the data at the given pixel coordinates.
 MapViewFrame getFrame()
           
 java.awt.Component getGui()
           
 MapSpaceLegend getLegend()
           
 java.lang.String getLegendName()
           
 WheelMenu getWheelMenu()
           
 void pauseAnimating()
           
 void removeKeyListener(java.awt.event.KeyListener listener)
           
 void removeMapMotionListener(MapMotionListener listener)
           
 void removeMapMouseListener(MapMouseListener listener)
           
protected  void render(java.awt.Component component, DrawingSurface surface)
          This should only be called by a MapViewCanvas implementation.
 void setActive(boolean isActive)
           
 void setBaselineMillis(int argBaselineMillis)
          This property is used during benchmarking.
 void setCurrentIndications(java.util.ArrayList items)
          Sets the current indication and therefore highlight.
 void setCurrentSelection(MapDataItem item)
          Sets the current selection and therefore highlight.
 void setEphemeron(Ephemeron ephemeron)
           
 void setLegendName(java.lang.String newLegendName)
           
 void setMousePosition(XyPoint newPosition)
           
 void spaceChanged()
          Call this whenever the map space changes.
 void startAnimating()
           
 void stopAnimating()
           
 java.awt.geom.Rectangle2D textBoundsFor(TextStyle style, java.lang.String text)
           
 void touchGL()
           
 void viewChanged()
          Call this whenever the view changes.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapViewPanel

public MapViewPanel(MapApp app)
Method Detail

spaceChanged

public void spaceChanged()
Call this whenever the map space changes. It resets the rover set listeners and other issues.


viewChanged

public void viewChanged()
Call this whenever the view changes. For OpenGL, this renders immediately.


setEphemeron

public void setEphemeron(Ephemeron ephemeron)

setMousePosition

public void setMousePosition(XyPoint newPosition)

getDataAt

public java.util.ArrayList<MapDataLink> getDataAt(double x,
                                                  double y,
                                                  int pixelX,
                                                  int pixelY)
Returns an array of MapDataLinks to the data at the given pixel coordinates.


setCurrentSelection

public void setCurrentSelection(MapDataItem item)
Sets the current selection and therefore highlight.


setCurrentIndications

public void setCurrentIndications(java.util.ArrayList items)
Sets the current indication and therefore highlight.


setLegendName

public void setLegendName(java.lang.String newLegendName)

getWheelMenu

public WheelMenu getWheelMenu()

getLegend

public MapSpaceLegend getLegend()

addMapMouseListener

public void addMapMouseListener(MapMouseListener listener)

removeMapMouseListener

public void removeMapMouseListener(MapMouseListener listener)

addMapMotionListener

public void addMapMotionListener(MapMotionListener listener)

removeMapMotionListener

public void removeMapMotionListener(MapMotionListener listener)

addKeyListener

public void addKeyListener(java.awt.event.KeyListener listener)

removeKeyListener

public void removeKeyListener(java.awt.event.KeyListener listener)

getBaselineMillis

public int getBaselineMillis()
This property is used during benchmarking. It represents the baseline time in milliseconds that the next rendering is expected to take.


setBaselineMillis

public void setBaselineMillis(int argBaselineMillis)
This property is used during benchmarking. It represents the baseline time in milliseconds that the next rendering is expected to take.


getGui

public java.awt.Component getGui()

getController

public RenderController getController()

getFrame

public MapViewFrame getFrame()

getLegendName

public java.lang.String getLegendName()

textBoundsFor

public java.awt.geom.Rectangle2D textBoundsFor(TextStyle style,
                                               java.lang.String text)

setActive

public void setActive(boolean isActive)

startAnimating

public void startAnimating()

pauseAnimating

public void pauseAnimating()

stopAnimating

public void stopAnimating()

finalize

protected void finalize()
Closes the statistics file.

Overrides:
finalize in class java.lang.Object

touchGL

public void touchGL()

render

protected void render(java.awt.Component component,
                      DrawingSurface surface)
This should only be called by a MapViewCanvas implementation.


clearTextures

public void clearTextures()