gov.nist.microanalysis.NISTMonte
Class XRayAccumulator

java.lang.Object
  extended by gov.nist.microanalysis.NISTMonte.XRayAccumulator
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class XRayAccumulator
extends java.lang.Object
implements java.awt.event.ActionListener

A simple acccumulator for recording the generated and transmitted intensities on a list of lines.

Copyright: Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain

Company: National Institute of Standards and Technology

Version:
1.0
Author:
Nicholas W M Ritchie

Constructor Summary
XRayAccumulator(java.util.Collection lines)
          XRayAccumulator - Create an accumulator to record the sum of the generated and transmitted x-ray intensity on the Set of XRayTransition or AtomicShell objects in lines.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ae)
          Invoked when an action occurs.
 void clear()
          clear - Reset the accumulator to zero.
 void dump(java.io.PrintWriter pw)
          dump - Output the resulting accumulation to a PrintWriter in tab seperated values suitable to import into a spreadsheet.
 double getEmitted(XRayTransition xrt)
          getEmitted - Get the transmitted intensity for the specified transition.
 double getGenerated(XRayTransition xrt)
          getGenerated - Get the generated intensity for the specified transition.
 double getSumEmitted()
          getSumEmitted - Returns the sum of the emitted intensity for all transitions.
 double getSumGenerated()
          getSumGenerated - Returns the sum of the generated intensity for all transitons.
 java.util.List getTransitions()
          getTransitions - Get an immutable list of the transitions that are being accumulated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XRayAccumulator

public XRayAccumulator(java.util.Collection lines)
XRayAccumulator - Create an accumulator to record the sum of the generated and transmitted x-ray intensity on the Set of XRayTransition or AtomicShell objects in lines. AtomicShells are translated into the strongest available XRayTransition.

Parameters:
lines - Collection - A collection of XRayTransition objects or AtomicShell objects
Method Detail

getTransitions

public java.util.List getTransitions()
getTransitions - Get an immutable list of the transitions that are being accumulated.

Returns:
List

clear

public void clear()
clear - Reset the accumulator to zero.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ae)
Invoked when an action occurs. Responds to XRayEventListener events.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
ae - ActionEvent - An instance of XRayEventListener

getEmitted

public double getEmitted(XRayTransition xrt)
getEmitted - Get the transmitted intensity for the specified transition.

Parameters:
xrt -
Returns:
double

getSumEmitted

public double getSumEmitted()
getSumEmitted - Returns the sum of the emitted intensity for all transitions.

Returns:
double

getSumGenerated

public double getSumGenerated()
getSumGenerated - Returns the sum of the generated intensity for all transitons.

Returns:
double

getGenerated

public double getGenerated(XRayTransition xrt)
getGenerated - Get the generated intensity for the specified transition.

Parameters:
xrt -
Returns:
double

dump

public void dump(java.io.PrintWriter pw)
dump - Output the resulting accumulation to a PrintWriter in tab seperated values suitable to import into a spreadsheet.

Parameters:
pw - PrintWriter