jview
Class JAsynchronAnalyser

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.JAsynchronAnalyser
All Implemented Interfaces:
ComponentListener, PropertyChangeListener, Cloneable, EventListener, DataAnalysing, DataObserver, Displayable, BeanSupport, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying
Direct Known Subclasses:
JEditableAnalyser

public abstract class JAsynchronAnalyser
extends JAbstractAnalyser
implements PropertyChangeListener

An asynchron analyser allows analysing of the data only via a user-induced action event it therefore returns null as the component it wants to present, but a non-null analyser action, which, when activated spawns an own update process.

Asynchron analysers will only react to data change events and will include also non-visible data. The data it acts on build up during the data-change event chain. If the data canvas get visible, the data is queried from it.


Nested Class Summary
private  class JAsynchronAnalyser.AnalyserThread
          Creates a new thread that takes the components analyser, prepares the data cards to be used in the analyser and processes it on start.
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private  Action act
          We cache the action becaus we can be called repeatedly.
private static String DEFPROGRESSNOTE
          Default note on progress.
static String KEY_ANALYSERNAME
          The action name.
static String KEY_PROGRESSMESSAGE
          The action name.
static String KEY_PROGRESSNOTE
          The action name.
 
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
protected JAsynchronAnalyser(Map<String,String> prop)
          Creates a new period analyser.
 
Method Summary
 Action getAnalyserAction()
          The action starts an analyser thread thast asynchronosly notifies us.
protected  Component getAnalyserComponent(ActionEvent ae)
          Decides, on which component we should display the progress monitor.
 Component getRepresentation()
          Returns null, we have no special representation, only actions.
 void init()
          Defaults the anaylser name.
protected abstract  boolean metaAction(ActionEvent ae)
          This method is called when the action was activated with the meta modifier on.
protected abstract  void ready(VectorG[] pre, VectorG[] processed)
          This method is called, when the data has been processed in the analyser thread.
 
Methods inherited from class jview.JAbstractAnalyser
addPropertyChangeListener, addPropertyChangeListener, componentHidden, componentMoved, componentResized, componentShown, dataChanged, estimateExecutionTime, estimateExecutionTime, firePropertyChange, getAnalysedSets, getAnalyser, getAnalyserInput, getDataTagging, propertyChange, removePropertyChangeListener, removePropertyChangeListener, setAnalyserInput, 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 java.beans.PropertyChangeListener
propertyChange
 
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_ANALYSERNAME

public static final String KEY_ANALYSERNAME
The action name.

See Also:
Constant Field Values

KEY_PROGRESSMESSAGE

public static final String KEY_PROGRESSMESSAGE
The action name.

See Also:
Constant Field Values

KEY_PROGRESSNOTE

public static final String KEY_PROGRESSNOTE
The action name.

See Also:
Constant Field Values

DEFPROGRESSNOTE

private static final String DEFPROGRESSNOTE
Default note on progress.

See Also:
Constant Field Values

act

private Action act
We cache the action becaus we can be called repeatedly.

Constructor Detail

JAsynchronAnalyser

protected JAsynchronAnalyser(Map<String,String> prop)
Creates a new period analyser.

Method Detail

init

public void init()
Defaults the anaylser name.

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

getAnalyserAction

public Action getAnalyserAction()
The action starts an analyser thread thast asynchronosly notifies us.

Specified by:
getAnalyserAction in interface DataAnalysing

getAnalyserComponent

protected Component getAnalyserComponent(ActionEvent ae)
Decides, on which component we should display the progress monitor. Per default, the source of the action event is converted as a component and returned. Subclasses, that support multiple analysiztion into the same component may return this component here.


ready

protected abstract void ready(VectorG[] pre,
                              VectorG[] processed)
This method is called, when the data has been processed in the analyser thread. If we do not use these data, but proceed to visualize or metadata, this can be done in this method, as we are not in the event queue. Prior to this method, registered listeners are notified that the DataAnalysing.ANALYSERPROCESS property has changed, if the output was not null.


metaAction

protected abstract boolean metaAction(ActionEvent ae)
This method is called when the action was activated with the meta modifier on. If this method is the only action, we return true here (similar to consume the event). If the analyser should proceed with its task after the meta-action processing, we return false.

Returns:
True, if action was consumed.

getRepresentation

public Component getRepresentation()
Returns null, we have no special representation, only actions.

Specified by:
getRepresentation in interface Displayable