jview
Class JDataSink

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by util.rmi.RmiPropertyContainer
                  extended by util.rmi.AbstractRmiCaster
                      extended by util.rmi.AbstractRmiDataSink
                          extended by jview.JDataSink
All Implemented Interfaces:
Cloneable, Remote, Displayable, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying, RmiCaster, RmiDataSink, RmiPropertyBearing, DataSink
Direct Known Subclasses:
JPhasePlot

public abstract class JDataSink
extends AbstractRmiDataSink
implements Displayable, DataSink

A class that has a data canvas for display assigned to it, pointed to #KEY_DATACANVAS. In the minimum case, only addData(java.util.List) has to be implemented.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private  JDataCanvas central
          The jdatacanvas we represent.
static String DEFCURSOR
          Default cursor classes.
static String DEFSET
          Default drawing set.
static String DEFSHAPE
          DEfault shape.
static String KEY_CANVASDEFAULT
          If sufficient to overrule just standard properties.
static String KEY_CANVASDELIM
          The separator in the canvas default.
static String KEY_CANVASFILE
          The properties of my central canvas, if accessible from a file.
static String KEY_CANVASKEY
          The separator in the canvas default.
static String KEY_POPUPACTIONS
          If this property is set, we try to get these actions from the canvas.
static String KEY_POPUPCURSOR
          If this property is set, we try to get these actions from the cursor.
static String KEY_SETCURSOR
          If this property is set, we try to set this cursor.
 
Fields inherited from class util.rmi.AbstractRmiDataSink
KEY_BIND
 
Fields inherited from class util.rmi.AbstractRmiCaster
ALTERNATEHOST, ALTERNATEPORT, KEY_BINDNAME, KEY_EXPORTPORT, KEY_REGISTRYHOST, KEY_REGISTRYPORT
 
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 util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
protected JDataSink(Map<String,String> prop)
          We chain constructors.
 
Method Summary
 boolean acceptsData(String any)
          Returns true.
 boolean addData(List<VectorG> data)
          For small data sets this method suffices to deviate to the DataSink.addData(Map) method.
 boolean clearData()
          We clear the data in the default implementation by clearing the data-canvas data.
protected  JDataCanvas getCanvas()
          Returns the central canvas for daughter classes.
protected  String getCursorClasses()
          Default cursor class is only the zoom cursor.
protected  String getDrawingSets()
          If daughter classes need more then the generic drawing set, override here according to x=blue:y=green.
protected  String getDrawingShapes()
           
protected  List<Object> getHighlighted(String setname)
          Acts on our canvas.
static List<Object> getHighlighted(String setname, JDataCanvas central)
          Returns a list of keys to highlighted objects (i.e.
 Icon getIcon()
          Returns an icon, if one specified in my properties.
 Component getRepresentation()
          Default implementation returns the data canvas only.
protected  int highlight(List<Object> keys, String setname)
          Acts on our canvas.
static int highlight(List<Object> keys, String setname, JDataCanvas central)
          Highlights all data cards with the given keys in the specified sets and rebuild the underlying shape list in the data canvas.
 void init()
          On init, we also construct the data canvas.
 boolean metaData(Map<String,? extends Serializable> meta)
          Per default, we forward all the meta-data to the data canvas.
 boolean rmiAddData(List<VectorG> d)
          We set the mapping of data points.
 boolean rmiAddData(Map<Object,VectorG> d)
          We set the mapping of data points.
 boolean rmiClearData()
          We clear the data in the default implementation by clearing the data-canvas data.
 boolean rmiMetaData(Map<String,? extends Serializable> meta)
          Per default, we forward all the meta-data to the data canvas.
 boolean setData(List<VectorG> d)
          We set the mapping of data points.
 boolean setData(Map<Object,VectorG> d)
          We set the mapping of data points.
 
Methods inherited from class util.rmi.AbstractRmiDataSink
rmiAcceptsData, rmiSetData, rmiSetData
 
Methods inherited from class util.rmi.AbstractRmiCaster
bindAlternate, bindToRegistry, bindToRegistry, bindToRegistry, casterExit, casterExit, exit, getBindName, getBindName, isValid, unbindFromRegistry, unbindFromRegistry
 
Methods inherited from class util.rmi.RmiPropertyContainer
containsRemoteProperty, getRemoteProperties, getRemoteProperty, setRemoteProperty
 
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 vec_math.DataSink
addData
 
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

DEFCURSOR

public static final String DEFCURSOR
Default cursor classes.

See Also:
Constant Field Values

DEFSET

public static final String DEFSET
Default drawing set.

See Also:
Constant Field Values

DEFSHAPE

public static final String DEFSHAPE
DEfault shape.

See Also:
Constant Field Values

KEY_CANVASFILE

public static final String KEY_CANVASFILE
The properties of my central canvas, if accessible from a file.

See Also:
Constant Field Values

KEY_CANVASDEFAULT

public static final String KEY_CANVASDEFAULT
If sufficient to overrule just standard properties.

See Also:
Constant Field Values

KEY_CANVASDELIM

public static final String KEY_CANVASDELIM
The separator in the canvas default.

See Also:
Constant Field Values

KEY_CANVASKEY

public static final String KEY_CANVASKEY
The separator in the canvas default.

See Also:
Constant Field Values

KEY_POPUPACTIONS

public static final String KEY_POPUPACTIONS
If this property is set, we try to get these actions from the canvas.

See Also:
Constant Field Values

KEY_SETCURSOR

public static final String KEY_SETCURSOR
If this property is set, we try to set this cursor.

See Also:
Constant Field Values

KEY_POPUPCURSOR

public static final String KEY_POPUPCURSOR
If this property is set, we try to get these actions from the cursor.

See Also:
Constant Field Values

central

private JDataCanvas central
The jdatacanvas we represent.

Constructor Detail

JDataSink

protected JDataSink(Map<String,String> prop)
             throws RemoteException
We chain constructors.

Throws:
RemoteException
Method Detail

init

public void init()
On init, we also construct the data canvas. If this fails because of a non-existant property, we throw an IllegalArgumentExcption.

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

getCursorClasses

protected String getCursorClasses()
Default cursor class is only the zoom cursor. Daughter classes may override here and provide a propertizable list of cursor-class-name=unique-name[:...], where the names can be spared (e.g. "jview.ZoomCursor:jview.DeleteCursor").


getDrawingSets

protected String getDrawingSets()
If daughter classes need more then the generic drawing set, override here according to x=blue:y=green.


getDrawingShapes

protected String getDrawingShapes()

acceptsData

public boolean acceptsData(String any)
Returns true.

Specified by:
acceptsData in interface DataSink
Returns:
True, if this sink might use thi type of data.

rmiMetaData

public boolean rmiMetaData(Map<String,? extends Serializable> meta)
                    throws RemoteException
Per default, we forward all the meta-data to the data canvas. We return false only if the data canvas does not exists or has no properties.

Specified by:
rmiMetaData in interface RmiDataSink
Overrides:
rmiMetaData in class AbstractRmiDataSink
Returns:
False, if we cannot interprete data with the information available.
Throws:
RemoteException

metaData

public boolean metaData(Map<String,? extends Serializable> meta)
Per default, we forward all the meta-data to the data canvas. We return false only if the data canvas does not exists or has no properties.

Specified by:
metaData in interface DataSink
Returns:
False, if we cannot interprete data with the information available.

getRepresentation

public Component getRepresentation()
Default implementation returns the data canvas only.

Specified by:
getRepresentation in interface Displayable

getIcon

public Icon getIcon()
Returns an icon, if one specified in my properties.

Specified by:
getIcon in interface Displayable

rmiClearData

public boolean rmiClearData()
                     throws RemoteException
We clear the data in the default implementation by clearing the data-canvas data.

Specified by:
rmiClearData in interface RmiDataSink
Returns:
True, if at least a single data point has been deleted.
Throws:
RemoteException

clearData

public boolean clearData()
We clear the data in the default implementation by clearing the data-canvas data.

Specified by:
clearData in interface DataSink
Returns:
True, if at least a single data point has been deleted.

setData

public boolean setData(List<VectorG> d)
We set the mapping of data points. Additionally, the fit is prepared for a phase regression model.

Specified by:
setData in interface DataSink
Returns:
True, if we can interprete this data.

setData

public boolean setData(Map<Object,VectorG> d)
We set the mapping of data points. Additionally, the fit is prepared for a phase regression model.

Specified by:
setData in interface DataSink

addData

public boolean addData(List<VectorG> data)
For small data sets this method suffices to deviate to the DataSink.addData(Map) method. On huge data set, you may override this to increase performance.

Specified by:
addData in interface DataSink
Returns:
True, if we can interprete this data.

rmiAddData

public boolean rmiAddData(Map<Object,VectorG> d)
                   throws RemoteException
We set the mapping of data points. Additionally, the fit is prepared for a phase regression model.

Specified by:
rmiAddData in interface RmiDataSink
Throws:
RemoteException

rmiAddData

public boolean rmiAddData(List<VectorG> d)
                   throws RemoteException
We set the mapping of data points. Additionally, the fit is prepared for a phase regression model.

Specified by:
rmiAddData in interface RmiDataSink
Overrides:
rmiAddData in class AbstractRmiDataSink
Returns:
True, if we can interprete this data.
Throws:
RemoteException

getCanvas

protected JDataCanvas getCanvas()
Returns the central canvas for daughter classes.


highlight

protected int highlight(List<Object> keys,
                        String setname)
Acts on our canvas.


highlight

public static int highlight(List<Object> keys,
                            String setname,
                            JDataCanvas central)
Highlights all data cards with the given keys in the specified sets and rebuild the underlying shape list in the data canvas.


getHighlighted

protected List<Object> getHighlighted(String setname)
Acts on our canvas.


getHighlighted

public static List<Object> getHighlighted(String setname,
                                          JDataCanvas central)
Returns a list of keys to highlighted objects (i.e. active data cards) in the given set.