|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.taco.text.AbstractInterpolatingStringToObjectConverter
com.taco.text.InterpolatingConverter
com.taco.text.CompositeConverter
com.taco.text.BracedPropertyCompositeConverter
com.taco.swinger.text2gui.TableColumnConverter
public class TableColumnConverter
A converter that create instances of TableColumn
.
Nested Class Summary |
---|
Field Summary | |
---|---|
protected static java.util.Map |
_TABLE_COLUMN_ACTION_MAP
|
protected static java.util.Map |
_TABLE_COLUMN_CONVERTER_MAP
|
static TableColumnConverter |
instance
The singleton instance of this class. |
Fields inherited from class com.taco.text.BracedPropertyCompositeConverter |
---|
_KEEP_ENCLOSING_PUNCTUATION_PATTERN |
Fields inherited from class com.taco.text.CompositeConverter |
---|
_DEFAULT_COMPOSITE_CONVERTER_MAP, _DEFAULT_COMPOSITE_CREATION_PROPERTY_NAMES, _SHOULD_READ_GLOBAL_NAME |
Fields inherited from class com.taco.text.InterpolatingConverter |
---|
_BAD_OBJECT_MAPPER, _IGNORE_PROPERTY_VALUE, _IMPORTS, _STATIC_IMPORTS, _TO_OBJECT_MAPPER_CONVERTER, DEFAULT_INSTANCE |
Fields inherited from class com.taco.text.AbstractInterpolatingStringToObjectConverter |
---|
_defArgMap, _defBundle |
Constructor Summary | |
---|---|
TableColumnConverter()
|
Method Summary | |
---|---|
protected void |
_addMapConsistencyListener(java.lang.Object composite,
java.lang.String propertyName,
IObjectMapper toMapValueConverter,
INoReturnMap argMap,
java.lang.Object mapKey,
java.lang.reflect.Method addListenerMethod)
Add a listener to composite that will update the value
associated with mapKey in observableMap when
the propertyName property of the composite changes. |
protected java.lang.Object |
_createComposite(java.util.Map propertyMap,
java.util.ResourceBundle bundle,
INoReturnMap argMap)
Given the property key / value map, return a composite object ready to have its properties set (if legal). |
protected CompositeConverter.ISetPropertyAction |
_getActionForProperty(java.lang.String propertyName)
Return an instance ISetPropertyAction for the argument
property name. |
IInterpolatingConverter |
getConverterForProperty(java.lang.String propertyName,
java.lang.Object composite)
Return an instance of IInterpolatingConverter for the
argument property name. |
java.util.Collection |
getPropertyNames()
Return a collection of names of properties of the composite being created. |
static void |
main(java.lang.String[] args)
A simple test program. |
Methods inherited from class com.taco.text.BracedPropertyCompositeConverter |
---|
_addProperties, _extractPropertiesSubSequence, _extractPropertyValue, _gatherPropertyMatchResults, _literalToObject, _shouldKeepEnclosingPunctuation |
Methods inherited from class com.taco.text.InterpolatingConverter |
---|
_argMapReferenceToObject, _getStandardImports, _getStandardStaticImports, _literalResultToObject, _scriptSnippetToObject, _toObjectMapper, clone, name, toObject, toObject, toObject |
Methods inherited from class com.taco.text.AbstractInterpolatingStringToObjectConverter |
---|
toObject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.util.Map _TABLE_COLUMN_CONVERTER_MAP
protected static final java.util.Map _TABLE_COLUMN_ACTION_MAP
public static final TableColumnConverter instance
Constructor Detail |
---|
public TableColumnConverter()
Method Detail |
---|
public static void main(java.lang.String[] args)
protected java.lang.Object _createComposite(java.util.Map propertyMap, java.util.ResourceBundle bundle, INoReturnMap argMap)
CompositeConverter
Given the property key / value map, return a composite object ready
to have its properties set (if legal). This method may completely
configure the composite, or it may defer setting some properties to
_setProperties()
. However, properties set here instead of
in _setProperties()
cannot be updated.
This base implementation throws an
UnsupportedOperationException
. This is not abstract so
only _literalToObject()
needs to be implemented to make a
subclass a concrete class that can create an object via the "instance"
property and configure the object afterwards.
_createComposite
in class CompositeConverter
public java.util.Collection getPropertyNames()
CompositeConverter
getPropertyNames
in class CompositeConverter
public IInterpolatingConverter getConverterForProperty(java.lang.String propertyName, java.lang.Object composite)
CompositeConverter
IInterpolatingConverter
for the
argument property name. If no converter pair is associated with the
property name, return null
.
getConverterForProperty
in class CompositeConverter
protected CompositeConverter.ISetPropertyAction _getActionForProperty(java.lang.String propertyName)
CompositeConverter
ISetPropertyAction
for the argument
property name. If no action is associated with the property name,
return null
.
_getActionForProperty
in class CompositeConverter
protected void _addMapConsistencyListener(java.lang.Object composite, java.lang.String propertyName, IObjectMapper toMapValueConverter, INoReturnMap argMap, java.lang.Object mapKey, java.lang.reflect.Method addListenerMethod)
CompositeConverter
Add a listener to composite
that will update the value
associated with mapKey
in observableMap
when
the propertyName
property of the composite changes. When
the property changes, toMapConverter
, if non-null, should
be used to convert the property value to the value actually put in the
map.
This method should not throw any exceptions.
By default, this implementation sees if the
addPropertyChangeListener()
method was found (if it is
addListenerMethod
is non-null. If it is, it adds an
instance of DefaultMapConsistencyListener
to the list of
listeners for the propertyName
property of the
composite.
_addMapConsistencyListener
in class CompositeConverter
composite
- The composite object to add a listener to.propertyName
- The name of property of the composite, which when
changed, should cause the listener to update the argument map.toMapValueConverter
- If non-null, the strategy to used to convert
the property value of the composite to the value put in the argument
map.argMap
- The argument map.mapKey
- The argument map key to keep consistent.addListenerMethod
- If non-null, a method of the composite that
can be used to add a property change listener to it. It has the
signature void addPropertyChangeListener(String propertyName,
PropertyChangeListener)
. This parameter only needs to be
referenced by this default implementation of the method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |