|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimtools.ui.GenericMapper
simtools.ui.TextMapper
public class TextMapper
This class maps data sources and index to text strings. The mapping is user defined, and based on the value of the data source 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.
Nested Class Summary | |
---|---|
protected class |
TextMapper.TextMapperChoiceFormat
|
protected class |
TextMapper.TextMapperTableModel
|
Nested classes/interfaces inherited from class simtools.ui.GenericMapper |
---|
GenericMapper.Expression, GenericMapper.ExpressionDialog, GenericMapper.ExpressionEditor, GenericMapper.ExpressionMappingTable, GenericMapper.Interval, GenericMapper.MapperTableModel |
Field Summary | |
---|---|
protected TextMapper.TextMapperChoiceFormat |
choiceFormat
|
static java.util.ResourceBundle |
resources
|
protected int |
textIndex
|
static java.util.Vector |
textMappers
The text mappers are application global |
Fields inherited from class simtools.ui.GenericMapper |
---|
defaultValue, intervals, listeners, map, name |
Constructor Summary | |
---|---|
TextMapper()
|
|
TextMapper(java.lang.String name)
|
Method Summary | |
---|---|
GenericMapper.MapperTableModel |
createModel()
|
protected java.lang.Object |
createNewValue()
For subclasses to specialize, create a new object of the specialized type |
static TextMapper |
createTextMapperDialog(javax.swing.JDialog owner)
|
java.text.ChoiceFormat |
getChoiceFormat()
|
java.lang.String |
getDefaultPaint()
|
java.lang.String |
getString(DataSource ds)
|
java.lang.String |
getString(DataSource ds,
long index)
Realizes the mapping, and returns a String object for this data source and index |
java.lang.String |
getString(java.lang.Object value)
|
static TextMapper |
getTextMapper(java.lang.String id)
Method getTextMapperFromName<\b> returns mapper linked to specified name return null if no mapper were found |
static void |
main(java.lang.String[] args)
|
void |
setDefaultString(java.lang.String defaultValue)
|
void |
setString(boolean isMore,
double value,
boolean boundIncluded,
java.lang.String string)
Associate a string with a double value infinite range. |
void |
setString(boolean isMore,
double value,
java.lang.String string)
Associate a string with a double value infinite range (bound included). |
void |
setString(boolean isMore,
long value,
boolean boundIncluded,
java.lang.String string)
Associate a string with a long value infinite range. |
void |
setString(boolean isMore,
long value,
java.lang.String string)
Associate a string with a long value infinite range (bound included). |
void |
setString(boolean isMore,
java.lang.String value,
boolean boundIncluded,
java.lang.String string)
Associate a string with a String value infinite range. |
void |
setString(boolean isMore,
java.lang.String value,
java.lang.String string)
Associate a string with a String value infinite range (bound included). |
void |
setString(double minvalue,
boolean boundedMin,
double maxvalue,
boolean boundedMax,
java.lang.String string)
Associate a string with a double value interval. |
void |
setString(double minvalue,
double maxvalue,
java.lang.String string)
Associate a string with a double value interval (bounds included) |
void |
setString(long minvalue,
boolean boundedMin,
long maxvalue,
boolean boundedMax,
java.lang.String string)
Associate a string with a long value interval. |
void |
setString(long minvalue,
long maxvalue,
java.lang.String string)
Associate a string with a long value interval (bounds included) |
void |
setString(java.lang.Object value,
java.lang.String string)
Associate a string with a value |
void |
setString(java.lang.String minvalue,
boolean boundedMin,
java.lang.String maxvalue,
boolean boundedMax,
java.lang.String string)
Associate a string with a String value interval. |
void |
setString(java.lang.String minvalue,
java.lang.String maxvalue,
java.lang.String string)
Associate a string with a String value interval (bounds included) |
static TextMapper |
updateTextMapper(TextMapper 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 |
---|
public static java.util.ResourceBundle resources
protected int textIndex
protected transient TextMapper.TextMapperChoiceFormat choiceFormat
public static java.util.Vector textMappers
Constructor Detail |
---|
public TextMapper()
public TextMapper(java.lang.String name)
name
- Method Detail |
---|
public static TextMapper updateTextMapper(TextMapper m)
m,
- the mapper to update
public static TextMapper getTextMapper(java.lang.String id)
name
-
public java.lang.String getString(DataSource ds, long index)
ds
- The data source to mapindex
- The index in the data source (may be used, or not)
public java.lang.String getString(DataSource ds)
public java.lang.String getString(java.lang.Object value)
public void setDefaultString(java.lang.String defaultValue)
public java.lang.String getDefaultPaint()
public void setString(java.lang.Object value, java.lang.String string)
public void setString(double minvalue, double maxvalue, java.lang.String string)
public void setString(double minvalue, boolean boundedMin, double maxvalue, boolean boundedMax, java.lang.String string)
public void setString(boolean isMore, double value, java.lang.String string)
isMore
- if true, the interval is x >= value, else it is x <= valuepublic void setString(boolean isMore, double value, boolean boundIncluded, java.lang.String string)
isMore
- if true, the interval is x >= value, else it is x <= valuepublic void setString(long minvalue, long maxvalue, java.lang.String string)
public void setString(long minvalue, boolean boundedMin, long maxvalue, boolean boundedMax, java.lang.String string)
public void setString(boolean isMore, long value, java.lang.String string)
isMore
- if true, the interval is x >= value, else it is x <= valuepublic void setString(boolean isMore, long value, boolean boundIncluded, java.lang.String string)
isMore
- if true, the interval is x >= value, else it is x <= valuepublic void setString(java.lang.String minvalue, java.lang.String maxvalue, java.lang.String string)
public void setString(java.lang.String minvalue, boolean boundedMin, java.lang.String maxvalue, boolean boundedMax, java.lang.String string)
public void setString(boolean isMore, java.lang.String value, java.lang.String string)
isMore
- if true, the interval is x >= value, else it is x <= valuepublic void setString(boolean isMore, java.lang.String value, boolean boundIncluded, java.lang.String string)
isMore
- if true, the interval is x >= value, else it is x <= valuepublic GenericMapper.MapperTableModel createModel()
createModel
in class GenericMapper
protected java.lang.Object createNewValue()
GenericMapper
createNewValue
in class GenericMapper
public static TextMapper createTextMapperDialog(javax.swing.JDialog owner)
public static void main(java.lang.String[] args)
public java.text.ChoiceFormat getChoiceFormat()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |