com.taco.swinger.text2gui.border
Class TitledBorderConverter

java.lang.Object
  extended by com.taco.text.AbstractInterpolatingStringToObjectConverter
      extended by com.taco.text.InterpolatingConverter
          extended by com.taco.text.CompositeConverter
              extended by com.taco.text.BracedPropertyCompositeConverter
                  extended by com.taco.text.ImmutableCompositeConverter
                      extended by com.taco.swinger.text2gui.border.TitledBorderConverter
All Implemented Interfaces:
ICommonGUIConverters, ICommonRegexConstants, IInterpolatingConverter, IInterpolatingStringToObjectConverter, IStringToObjectConverter, IInterpolatingResourceBundleToObjectConverter, java.lang.Cloneable

public class TitledBorderConverter
extends ImmutableCompositeConverter
implements ICommonGUIConverters

A class that converts strings and resource bundles to titled borders.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.taco.text.CompositeConverter
CompositeConverter.AbstractCompositeUpdater, CompositeConverter.AbstractMapConsistencyListener, CompositeConverter.CompositeUpdater, CompositeConverter.DefaultMapConsistencyListener, CompositeConverter.DelayedConvertedResult, CompositeConverter.ICompositeUpdater, CompositeConverter.IMapConsistencyListener, CompositeConverter.ISetPropertyAction, CompositeConverter.NotUpdaterListenerFilter, CompositeConverter.ReflectionSetPropertyAction
 
Field Summary
protected  IInterpolatingConverter _borderConverter
          The converter used for the border property of borders returned by this instance.
protected static java.util.Map _TITLED_BORDER_CONVERTER_MAP
           
protected static java.util.Map _TITLED_BORDER_JUSTIFICATION_MAP
          A map between strings and justification types (wrapped in instances of Integer) for TitledBorder.
protected static java.util.Map _TITLED_BORDER_POSITION_MAP
          A map between strings and position types (wrapped in instances of Integer) for TitledBorder.
 
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
 
Fields inherited from interface com.taco.swinger.text2gui.ICommonGUIConverters
COLOR_CONVERTER, CURSOR_CONVERTER, FONT_CONVERTER, KEYCODE_CONVERTER, KEYSTROKE_CONVERTER, LAYER_CONVERTER, RANGE_COLLECTION_CONVERTER
 
Fields inherited from interface com.taco.text.ICommonRegexConstants
BOOLEAN_REGEX_STRING, CHAR_REGEX_STRING, FLOAT_REGEX_STRING, HEX_NUMBER_REGEX_STRING, INTEGER_REGEX_STRING, JAVA_CLASS_NAME_REGEX_STRING, LONG_HEX_REGEX_STRING, LONG_INTEGER_REGEX_STRING, NON_NEGATIVE_FLOAT_REGEX_STRING, PROPERTY_PREFIX_PATTERN, PROPERTY_PREFIX_REGEX_STRING, QUOTED_STRING_REGEX_STRING, WHITESPACE_PATTERN
 
Constructor Summary
TitledBorderConverter(InterpolatingConverter borderConverter)
          Construct a new instance that uses the argument to convert the inner border of borders returned by this instance.
 
Method Summary
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).
 IInterpolatingConverter getConverterForProperty(java.lang.String propertyName, java.lang.Object composite)
          Return an instance of IInterpolatingConverter for the argument property name.
 java.util.Collection getCreationPropertyNames()
          Return all property names of the composite.
 
Methods inherited from class com.taco.text.ImmutableCompositeConverter
_addMapConsistencyListeners, _addUpdaterListeners, _getActionForProperty, _setProperties, getPropertyNames
 
Methods inherited from class com.taco.text.BracedPropertyCompositeConverter
_addProperties, _extractPropertiesSubSequence, _extractPropertyValue, _gatherPropertyMatchResults, _literalToObject, _shouldKeepEnclosingPunctuation
 
Methods inherited from class com.taco.text.CompositeConverter
_addMapConsistencyListener, _addProperties, _configureComposite, _createUpdaterListener, _makeInitConverter, _setProperties, _toObject, configureComposite, getConverterNameForProperty, isPropertyReadable, isPropertyUpdatable, isPropertyWritable
 
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

_borderConverter

protected IInterpolatingConverter _borderConverter
The converter used for the border property of borders returned by this instance.


_TITLED_BORDER_CONVERTER_MAP

protected static final java.util.Map _TITLED_BORDER_CONVERTER_MAP

_TITLED_BORDER_JUSTIFICATION_MAP

protected static final java.util.Map _TITLED_BORDER_JUSTIFICATION_MAP
A map between strings and justification types (wrapped in instances of Integer) for TitledBorder.


_TITLED_BORDER_POSITION_MAP

protected static final java.util.Map _TITLED_BORDER_POSITION_MAP
A map between strings and position types (wrapped in instances of Integer) for TitledBorder.

Constructor Detail

TitledBorderConverter

public TitledBorderConverter(InterpolatingConverter borderConverter)
Construct a new instance that uses the argument to convert the inner border of borders returned by this instance.

Method Detail

_createComposite

protected java.lang.Object _createComposite(java.util.Map propertyMap,
                                            java.util.ResourceBundle bundle,
                                            INoReturnMap argMap)
Description copied from class: 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.

Overrides:
_createComposite in class CompositeConverter

getCreationPropertyNames

public java.util.Collection getCreationPropertyNames()
Description copied from class: ImmutableCompositeConverter
Return all property names of the composite.

Specified by:
getCreationPropertyNames in class ImmutableCompositeConverter

getConverterForProperty

public IInterpolatingConverter getConverterForProperty(java.lang.String propertyName,
                                                       java.lang.Object composite)
Description copied from class: CompositeConverter
Return an instance of IInterpolatingConverter for the argument property name. If no converter pair is associated with the property name, return null.

Specified by:
getConverterForProperty in class CompositeConverter