uavsim.graphics.instruments.navcommselector
Class NavCommSelector

java.lang.Object
  extended by uavsim.graphics.instruments.A_Instrument
      extended by uavsim.graphics.instruments.A_RectangularInstrument
          extended by uavsim.graphics.instruments.navcommselector.NavCommSelector
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener, javax.swing.event.MouseInputListener

public class NavCommSelector
extends A_RectangularInstrument

Defines a nav/comm selector to route receivers to instruments. This has been deferred because the CMPS 450 approach needs to be more direct for simplicity. This dynamic approach involves excessive polymorphism.

Author:
Dan Tappan [15.09.11]

Field Summary
private  java.util.Map<java.lang.String,NavCommSwitchMapping> _map
          zzz receiver ID mapped to actual sender from list of potential
private static RectangularFaceplaceDescriptor FACEPLATE
          the faceplace
private static TextProperties TARGET_TEXT
          the text properties of the distance
 
Fields inherited from class uavsim.graphics.instruments.A_RectangularInstrument
_faceplaceDescriptor, _faceSize
 
Fields inherited from class uavsim.graphics.instruments.A_Instrument
_canvasAnchor, _canvasSize, _graphics, _id
 
Constructor Summary
NavCommSelector(java.lang.String id, int canvasSize, CoordinateCartesianAbsolute canvasAnchor, java.util.List<NavCommSwitchMapping> mappings)
          Creates a nav/comm selector.
 
Method Summary
 
Methods inherited from class uavsim.graphics.instruments.A_RectangularInstrument
getFaceSize, render, renderBox
 
Methods inherited from class uavsim.graphics.instruments.A_Instrument
getAnchor, getCanvasSize, getGraphics, getID, getParentComponent, handleControlCallback, hasControls, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, refresh, registerControl, setCanvasAnchor, setCanvasSize, setParentComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_map

private final java.util.Map<java.lang.String,NavCommSwitchMapping> _map
zzz receiver ID mapped to actual sender from list of potential


FACEPLATE

private static final RectangularFaceplaceDescriptor FACEPLATE
the faceplace


TARGET_TEXT

private static final TextProperties TARGET_TEXT
the text properties of the distance

Constructor Detail

NavCommSelector

public NavCommSelector(java.lang.String id,
                       int canvasSize,
                       CoordinateCartesianAbsolute canvasAnchor,
                       java.util.List<NavCommSwitchMapping> mappings)
Creates a nav/comm selector.

Parameters:
id - - the unique instrument identifier
canvasSize - - the square size of the instrument footprint in pixels
canvasAnchor - - the anchor position for the center of the canvas in pixels
mappings - - the switch mappings from sources (receivers) to targets (instruments)