simtools.ui
Class DoubleValueMapper

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

public class DoubleValueMapper
extends GenericMapper

See Also:
Serialized Form

Nested Class Summary
protected  class DoubleValueMapper.DoubleValueMapperTableModel
           
 
Nested classes/interfaces inherited from class simtools.ui.GenericMapper
GenericMapper.Expression, GenericMapper.ExpressionDialog, GenericMapper.ExpressionEditor, GenericMapper.ExpressionMappingTable, GenericMapper.Interval, GenericMapper.MapperTableModel
 
Field Summary
protected  int doubleIndex
           
static java.util.Vector doubleValueMappers
          The text mappers are application global
static java.util.ResourceBundle resources
           
 
Fields inherited from class simtools.ui.GenericMapper
defaultValue, intervals, listeners, map, name
 
Constructor Summary
DoubleValueMapper()
           
DoubleValueMapper(java.lang.String name)
           
 
Method Summary
static DoubleValueMapper createDoubleValueMapperDialog(javax.swing.JDialog owner)
           
 GenericMapper.MapperTableModel createModel()
           
protected  java.lang.Object createNewValue()
          For subclasses to specialize, create a new object of the specialized type
 java.lang.Double getDefaultDouble()
           
 java.lang.Double getDouble(DataSource ds)
           
 java.lang.Double getDouble(DataSource ds, long index)
          Realizes the mapping, and returns a Double object for this data source and index
 java.lang.Double getDouble(java.lang.Object value)
           
static DoubleValueMapper getDoubleMapper(java.lang.String id)
          Method getDoubleMapper<\b> returns mapper linked to specified name return null if no mapper were found
static void main(java.lang.String[] args)
           
 void setDefaultDouble(java.lang.Double defaultValue)
           
 void setDouble(boolean isMore, double value, boolean boundIncluded, java.lang.Double doublevalue)
          Associate a string with a double value infinite range.
 void setDouble(boolean isMore, double value, java.lang.Double doublevalue)
          Associate a string with a double value infinite range (bound included).
 void setDouble(boolean isMore, long value, boolean boundIncluded, java.lang.Double doublevalue)
          Associate a string with a long value infinite range.
 void setDouble(boolean isMore, long value, java.lang.Double doublevalue)
          Associate a string with a long value infinite range (bound included).
 void setDouble(boolean isMore, java.lang.String value, boolean boundIncluded, java.lang.Double doublevalue)
          Associate a string with a String value infinite range.
 void setDouble(boolean isMore, java.lang.String value, java.lang.Double doublevalue)
          Associate a string with a String value infinite range (bound included).
 void setDouble(double minvalue, boolean boundedMin, double maxvalue, boolean boundedMax, java.lang.Double doublevalue)
          Associate a string with a double value interval.
 void setDouble(double minvalue, double maxvalue, java.lang.Double doublevalue)
          Associate a string with a double value interval (bounds included)
 void setDouble(long minvalue, boolean boundedMin, long maxvalue, boolean boundedMax, java.lang.Double doublevalue)
          Associate a string with a long value interval.
 void setDouble(long minvalue, long maxvalue, java.lang.Double doublevalue)
          Associate a string with a long value interval (bounds included)
 void setDouble(java.lang.Object value, java.lang.Double doublevalue)
          Associate a Double with a value
 void setDouble(java.lang.String minvalue, boolean boundedMin, java.lang.String maxvalue, boolean boundedMax, java.lang.Double doublevalue)
          Associate a string with a String value interval.
 void setDouble(java.lang.String minvalue, java.lang.String maxvalue, java.lang.Double doublevalue)
          Associate a string with a String value interval (bounds included)
static DoubleValueMapper updateDoubleValueMapper(DoubleValueMapper m)
          If the mapper already exists in the list, update its values Otherwise add it to the list of existing mappers
 
Methods inherited from class simtools.ui.GenericMapper
addListener, clone, createMapperDialog, createPanel, createTable, 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

resources

public static java.util.ResourceBundle resources

doubleIndex

protected int doubleIndex

doubleValueMappers

public static java.util.Vector doubleValueMappers
The text mappers are application global

Constructor Detail

DoubleValueMapper

public DoubleValueMapper()

DoubleValueMapper

public DoubleValueMapper(java.lang.String name)
Parameters:
name -
Method Detail

updateDoubleValueMapper

public static DoubleValueMapper updateDoubleValueMapper(DoubleValueMapper 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:

getDoubleMapper

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

Parameters:
name -
Returns:

getDouble

public java.lang.Double getDouble(DataSource ds,
                                  long index)
Realizes the mapping, and returns a Double object for this data source and index

Parameters:
ds - The data source to map
index - The index in the data source (may be used, or not)
Returns:
a Double object

getDouble

public java.lang.Double getDouble(DataSource ds)

getDouble

public java.lang.Double getDouble(java.lang.Object value)

setDefaultDouble

public void setDefaultDouble(java.lang.Double defaultValue)

getDefaultDouble

public java.lang.Double getDefaultDouble()

setDouble

public void setDouble(java.lang.Object value,
                      java.lang.Double doublevalue)
Associate a Double with a value


setDouble

public void setDouble(double minvalue,
                      double maxvalue,
                      java.lang.Double doublevalue)
Associate a string with a double value interval (bounds included)


setDouble

public void setDouble(double minvalue,
                      boolean boundedMin,
                      double maxvalue,
                      boolean boundedMax,
                      java.lang.Double doublevalue)
Associate a string with a double value interval. Interval bounds are specified


setDouble

public void setDouble(boolean isMore,
                      double value,
                      java.lang.Double doublevalue)
Associate a string with a double value infinite range (bound included).

Parameters:
isMore - if true, the interval is x >= value, else it is x <= value

setDouble

public void setDouble(boolean isMore,
                      double value,
                      boolean boundIncluded,
                      java.lang.Double doublevalue)
Associate a string with a double value infinite range.

Parameters:
isMore - if true, the interval is x >= value, else it is x <= value

setDouble

public void setDouble(long minvalue,
                      long maxvalue,
                      java.lang.Double doublevalue)
Associate a string with a long value interval (bounds included)


setDouble

public void setDouble(long minvalue,
                      boolean boundedMin,
                      long maxvalue,
                      boolean boundedMax,
                      java.lang.Double doublevalue)
Associate a string with a long value interval. Interval bounds are specified


setDouble

public void setDouble(boolean isMore,
                      long value,
                      java.lang.Double doublevalue)
Associate a string with a long value infinite range (bound included).

Parameters:
isMore - if true, the interval is x >= value, else it is x <= value

setDouble

public void setDouble(boolean isMore,
                      long value,
                      boolean boundIncluded,
                      java.lang.Double doublevalue)
Associate a string with a long value infinite range.

Parameters:
isMore - if true, the interval is x >= value, else it is x <= value

setDouble

public void setDouble(java.lang.String minvalue,
                      java.lang.String maxvalue,
                      java.lang.Double doublevalue)
Associate a string with a String value interval (bounds included)


setDouble

public void setDouble(java.lang.String minvalue,
                      boolean boundedMin,
                      java.lang.String maxvalue,
                      boolean boundedMax,
                      java.lang.Double doublevalue)
Associate a string with a String value interval. Interval bounds are specified


setDouble

public void setDouble(boolean isMore,
                      java.lang.String value,
                      java.lang.Double doublevalue)
Associate a string with a String value infinite range (bound included).

Parameters:
isMore - if true, the interval is x >= value, else it is x <= value

setDouble

public void setDouble(boolean isMore,
                      java.lang.String value,
                      boolean boundIncluded,
                      java.lang.Double doublevalue)
Associate a string with a String value infinite range.

Parameters:
isMore - if true, the interval is x >= value, else it is x <= value

createModel

public GenericMapper.MapperTableModel createModel()
Overrides:
createModel 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

createDoubleValueMapperDialog

public static DoubleValueMapper createDoubleValueMapperDialog(javax.swing.JDialog owner)

main

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