sonification.dataimport.visbards_resourcetoolkit.model
Class UnitManager

java.lang.Object
  extended by sonification.dataimport.visbards_resourcetoolkit.model.UnitManager
All Implemented Interfaces:
CoordinateModeManagerListener

public class UnitManager
extends java.lang.Object
implements CoordinateModeManagerListener


Field Summary
static org.gjt.fredgc.unit.Unit AU
           
static org.gjt.fredgc.unit.Unit KILOMETER
           
static org.gjt.fredgc.unit.Unit KM_PER_SECOND
           
static org.gjt.fredgc.unit.Unit MILISECOND
           
static org.gjt.fredgc.unit.Unit NANOTESLA
           
 
Constructor Summary
UnitManager(CoordinateModeManager mgr)
           
 
Method Summary
 void addListener(UnitManagerListener listener)
          Registers a listener.
 org.gjt.fredgc.unit.Unit getPresentationalUnit(org.gjt.fredgc.unit.Unit from)
          This function has been short-circuited to prevent problems with units getting automatically converted.
 org.gjt.fredgc.unit.Unit getStandardUnit_Real(org.gjt.fredgc.unit.Unit from)
          This function is used to return the preferred/standardized unit for Location, MagField, or Velocity.
 org.gjt.fredgc.unit.Unit getStandardUnit(org.gjt.fredgc.unit.Unit from)
          This function has been short-circuited to prevent problems with units getting automatically converted.
 void modeChanged(int mode)
          Indicates that the current mode has changed
 void removeListener(UnitManagerListener listener)
          Unregisters a listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KILOMETER

public static final org.gjt.fredgc.unit.Unit KILOMETER

MILISECOND

public static final org.gjt.fredgc.unit.Unit MILISECOND

AU

public static final org.gjt.fredgc.unit.Unit AU

NANOTESLA

public static final org.gjt.fredgc.unit.Unit NANOTESLA

KM_PER_SECOND

public static final org.gjt.fredgc.unit.Unit KM_PER_SECOND
Constructor Detail

UnitManager

public UnitManager(CoordinateModeManager mgr)
Method Detail

modeChanged

public void modeChanged(int mode)
Indicates that the current mode has changed

Specified by:
modeChanged in interface CoordinateModeManagerListener

getStandardUnit

public org.gjt.fredgc.unit.Unit getStandardUnit(org.gjt.fredgc.unit.Unit from)
This function has been short-circuited to prevent problems with units getting automatically converted. Units are instead pulled directly from the RDF, but Location, MagField, and Velocity are all standardized to return values in km, nT, and km/s, respectively.


getStandardUnit_Real

public org.gjt.fredgc.unit.Unit getStandardUnit_Real(org.gjt.fredgc.unit.Unit from)
This function is used to return the preferred/standardized unit for Location, MagField, or Velocity.


getPresentationalUnit

public org.gjt.fredgc.unit.Unit getPresentationalUnit(org.gjt.fredgc.unit.Unit from)
This function has been short-circuited to prevent problems with units getting automatically converted. Units are instead pulled directly from the RDF, but Location, MagField, and Velocity are all standardized to return values in km, nT, and km/s, respectively.


addListener

public void addListener(UnitManagerListener listener)
Registers a listener.


removeListener

public void removeListener(UnitManagerListener listener)
Unregisters a listener.