jview
Class JEditableAnalyser

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

public abstract class JEditableAnalyser
extends JAsynchronAnalyser

Supports meta action on an analyser via user-editing of critical properties. If metaAction(java.awt.event.ActionEvent) is called, we immediately fork to editProperties(java.awt.event.ActionEvent), then return true to show that the action was consumed. It is perfectly legal to override the metaAction(java.awt.event.ActionEvent) by calling editProperties(java.awt.event.ActionEvent) and returning false, then.

The editProperties(java.awt.event.ActionEvent) queries via the abstract method getEditableProperties() for the properties that should be updated. It then displays a model confirm dialog, that prompts a JPropertyEdit table. After the user confirmed the changes, they are read and key-by-key set in the analyser's method.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static String DEFEDITTITLE
          The title shown when properties are edited.
static String KEY_EDITTITLE
          The title shown when properties are edited.
 
Fields inherited from class jview.JAsynchronAnalyser
KEY_ANALYSERNAME, KEY_PROGRESSMESSAGE, KEY_PROGRESSNOTE
 
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 JEditableAnalyser(Map<String,String> prop)
          Creates a new ediatable analyser.
 
Method Summary
protected  boolean editProperties(ActionEvent ae)
          We edit the properties such that we display a table with the editable properties.
protected abstract  Map<String,String> getEditableProperties()
          Queries for editable properties.
protected  boolean metaAction(ActionEvent ae)
          We fork into editProperties(java.awt.event.ActionEvent) and return true.
 
Methods inherited from class jview.JAsynchronAnalyser
getAnalyserAction, getAnalyserComponent, getRepresentation, init, ready
 
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_EDITTITLE

public static final String KEY_EDITTITLE
The title shown when properties are edited.

See Also:
Constant Field Values

DEFEDITTITLE

private static final String DEFEDITTITLE
The title shown when properties are edited.

See Also:
Constant Field Values
Constructor Detail

JEditableAnalyser

protected JEditableAnalyser(Map<String,String> prop)
Creates a new ediatable analyser.

Method Detail

metaAction

protected boolean metaAction(ActionEvent ae)
We fork into editProperties(java.awt.event.ActionEvent) and return true.

Specified by:
metaAction in class JAsynchronAnalyser
Returns:
True, if action was consumed.

getEditableProperties

protected abstract Map<String,String> getEditableProperties()
Queries for editable properties. If the mapping returned here is a treemap or a linked map, the order is retained on the display.


editProperties

protected boolean editProperties(ActionEvent ae)
We edit the properties such that we display a table with the editable properties. If the user confirms the changes, we update our analyser's properties and return true, otherwise we return false.