jview
Class JStatisticAnalyser

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by jview.AbstractDisplayable
                  extended by jview.JAbstractAnalyser
                      extended by jview.JStatisticAnalyser
All Implemented Interfaces:
ActionListener, ComponentListener, PropertyChangeListener, Cloneable, EventListener, DataAnalysing, DataObserver, Displayable, BeanSupport, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class JStatisticAnalyser
extends JAbstractAnalyser
implements ActionListener

A statistic analyser listens to a data set and displays the average of the y-data plus the deviation of it on-line in its displayable, which is an enabled Button. If the button is pressed, more statistic values are displayed in a separate dialog. We listen to viewport changes, too.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static String DEFANALYSER
          The analyser.
private static DecimalFormat DEFFORMAT
          Default formatter for text on button.
private static int DEFINDICES
          Default index is 1.
private static boolean DEFVIEWPORTLISTEN
          This is true, we listen to viewport changes.
private  JButton display
          My display.
private  List<Integer> index
          My indices, parsed from KEY_INDICES.
static String KEY_AVERAGEFORMAT
          The format string for the average of the first index.
static String KEY_INDEXNAMES
          If given, this list is used for a more convenient variable name.
static String KEY_INDICES
          The list of indices in the data set where statistic act on.
static String KEY_RMSFORMAT
          The format string for the sigma of the first index.
 
Fields inherited from class jview.JAbstractAnalyser
KEY_ALLOW, KEY_ANALYSER, KEY_ANALYSESETS, KEY_BASELOG, KEY_BASEPLAIN, KEY_BASEPOWER, KEY_BASERANDOM, KEY_BASESINUS, KEY_BASESQRT, KEY_BASETAN, KEY_DENY, KEY_EXECFACTOR, KEY_EXECOFFSET, KEY_TRANSFERCLASSES, KEY_TRANSFERINIT, KEY_VIEWPORTLISTEN
 
Fields inherited from class jview.AbstractDisplayable
KEY_COMPONENTNAME, KEY_ICON, KEY_INSETS
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface jview.DataAnalysing
ANALYSERINPUT, ANALYSERMETA, ANALYSERPROCESS, ANALYSERVISUAL, ATTACHED
 
Fields inherited from interface util.BeanSupport
CASTING
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
JStatisticAnalyser(Map<String,String> prop)
          Constructs a new statistic analyser, setting the analyser property to DEFANALYSER.
 
Method Summary
 void actionPerformed(ActionEvent ae)
          Pops up a window with additional information on all sets.
 Action getAnalyserAction()
          We have no action, as we only want to be displayable as a button.
 Component getRepresentation()
          Our representation is a button, which displays the average and the sigma of the first index given in indices on its label.
 void init()
          We create our button.
protected  void setAnalyserInput(VectorG[] in)
          We change the numbers displayed on the button.
private  void updateText(double av, double sig)
          Updates the text displayed on the button.
 
Methods inherited from class jview.JAbstractAnalyser
addPropertyChangeListener, addPropertyChangeListener, componentHidden, componentMoved, componentResized, componentShown, dataChanged, estimateExecutionTime, estimateExecutionTime, firePropertyChange, getAnalysedSets, getAnalyser, getAnalyserInput, getDataTagging, propertyChange, removePropertyChangeListener, removePropertyChangeListener, setDataTagging
 
Methods inherited from class jview.AbstractDisplayable
getComponentName, getIcon, getIcon
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jview.Displayable
getIcon
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 

Field Detail

KEY_INDICES

public static final String KEY_INDICES
The list of indices in the data set where statistic act on.

See Also:
Constant Field Values

KEY_INDEXNAMES

public static final String KEY_INDEXNAMES
If given, this list is used for a more convenient variable name.

See Also:
Constant Field Values

KEY_AVERAGEFORMAT

public static final String KEY_AVERAGEFORMAT
The format string for the average of the first index.

See Also:
Constant Field Values

KEY_RMSFORMAT

public static final String KEY_RMSFORMAT
The format string for the sigma of the first index.

See Also:
Constant Field Values

DEFANALYSER

private static final String DEFANALYSER
The analyser.

See Also:
Constant Field Values

DEFVIEWPORTLISTEN

private static final boolean DEFVIEWPORTLISTEN
This is true, we listen to viewport changes.

See Also:
Constant Field Values

DEFINDICES

private static final int DEFINDICES
Default index is 1.

See Also:
Constant Field Values

DEFFORMAT

private static final DecimalFormat DEFFORMAT
Default formatter for text on button.


display

private JButton display
My display.


index

private List<Integer> index
My indices, parsed from KEY_INDICES.

Constructor Detail

JStatisticAnalyser

public JStatisticAnalyser(Map<String,String> prop)
Constructs a new statistic analyser, setting the analyser property to DEFANALYSER.

Method Detail

init

public void init()
We create our button.

Specified by:
init in interface Initializable
Overrides:
init in class JAbstractAnalyser

getAnalyserAction

public Action getAnalyserAction()
We have no action, as we only want to be displayable as a button.

Specified by:
getAnalyserAction in interface DataAnalysing

getRepresentation

public Component getRepresentation()
Our representation is a button, which displays the average and the sigma of the first index given in indices on its label.

Specified by:
getRepresentation in interface Displayable

setAnalyserInput

protected void setAnalyserInput(VectorG[] in)
We change the numbers displayed on the button.

Overrides:
setAnalyserInput in class JAbstractAnalyser

actionPerformed

public void actionPerformed(ActionEvent ae)
Pops up a window with additional information on all sets.

Specified by:
actionPerformed in interface ActionListener

updateText

private void updateText(double av,
                        double sig)
Updates the text displayed on the button.