simtools.ui
Class ImageMapper

java.lang.Object
  extended by simtools.ui.GenericMapper
      extended by simtools.ui.ImageMapper
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class ImageMapper
extends GenericMapper

This class maps data sources and index to images. The mapping is user defined, and based for example on the value of the data source For example, green value < 10, red above. Useful for making plots with "alarm" colors The data source shall not be saved into the object. Rather, this class goal is to implement a mapping independent of the data source given. The same is true for the images

See Also:
Serialized Form

Nested Class Summary
protected static class ImageMapper.ImageEditor
           
static class ImageMapper.ImageFile
          This class is what is effectively mapped to a value or range
static class ImageMapper.ImageFileFilter
          Method isSvgFile test if the file is an svg file Parameters: the file f
protected  class ImageMapper.ImageMapperTableModel
           
protected  class ImageMapper.ImageMappingTable
           
protected static class ImageMapper.ImageRenderer
           
 
Nested classes/interfaces inherited from class simtools.ui.GenericMapper
GenericMapper.Expression, GenericMapper.ExpressionDialog, GenericMapper.ExpressionEditor, GenericMapper.ExpressionMappingTable, GenericMapper.Interval, GenericMapper.MapperTableModel
 
Field Summary
static java.io.File defaultDirectory
          An optional default directory for Image Mappers
static javax.swing.JFileChooser fileChooser
           
static java.util.Vector imageMappers
          The image mappers are application global
static java.util.ResourceBundle resources
           
 
Fields inherited from class simtools.ui.GenericMapper
defaultValue, intervals, listeners, map, name
 
Constructor Summary
ImageMapper()
           
ImageMapper(java.lang.String name)
           
 
Method Summary
static ImageMapper createImageMapperDialog(javax.swing.JDialog owner)
           
 GenericMapper.MapperTableModel createModel()
           
protected  java.lang.Object createNewValue()
          For subclasses to specialize, create a new object of the specialized type
protected  GenericMapper.ExpressionMappingTable createTable(javax.swing.JDialog parent)
          For subclasses to specialize
static ImageMapper getImageMapper(java.lang.String id)
          Method getSvgMapperFromName<\b> returns mapper linked to specified name return null if no mapper were found
static void main(java.lang.String[] args)
           
static ImageMapper updateImageMapper(ImageMapper m)
          If the mapper already exists in the list, update its values Otherwise add it to the list of existing mappers
 void wipeOff()
          Wipe off mapper images buffer.
 
Methods inherited from class simtools.ui.GenericMapper
addListener, clone, createMapperDialog, createPanel, editDialog, equals, getAllMapperValues, getDefaultValue, getIntervals, getMap, getMapping, getMapping, getMapping, notifyListeners, removeListener, setDefaultValue, setMapperValues, setMapping, setMapping, setMapping, setMapping, setMapping, setMapping, setMapping, setMapping, setMapping, setMapping, setMapping, setMapping, setMapping, setName, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fileChooser

public static javax.swing.JFileChooser fileChooser

resources

public static java.util.ResourceBundle resources

imageMappers

public static java.util.Vector imageMappers
The image mappers are application global


defaultDirectory

public static java.io.File defaultDirectory
An optional default directory for Image Mappers

Constructor Detail

ImageMapper

public ImageMapper()

ImageMapper

public ImageMapper(java.lang.String name)
Method Detail

wipeOff

public void wipeOff()
Wipe off mapper images buffer.


updateImageMapper

public static ImageMapper updateImageMapper(ImageMapper m)
If the mapper already exists in the list, update its values Otherwise add it to the list of existing mappers

Parameters:
m, - the mapper to update
Returns:

getImageMapper

public static ImageMapper getImageMapper(java.lang.String id)
Method getSvgMapperFromName<\b> returns mapper linked to specified name return null if no mapper were found

Parameters:
name -
Returns:

createModel

public GenericMapper.MapperTableModel createModel()
Overrides:
createModel in class GenericMapper

createTable

protected GenericMapper.ExpressionMappingTable createTable(javax.swing.JDialog parent)
Description copied from class: GenericMapper
For subclasses to specialize

Overrides:
createTable in class GenericMapper

createNewValue

protected java.lang.Object createNewValue()
Description copied from class: GenericMapper
For subclasses to specialize, create a new object of the specialized type

Overrides:
createNewValue in class GenericMapper

createImageMapperDialog

public static ImageMapper createImageMapperDialog(javax.swing.JDialog owner)

main

public static void main(java.lang.String[] args)