org.swixml.converters

## Class InsetsConverter

- java.lang.Object
- - org.swixml.converters.InsetsConverter

- All Implemented Interfaces:
    Converter

      public class InsetsConverter
      extends Object
      implements Converter

  The `InsetsConverter` class defines a converter that creates Insets objects based on a provided String.

  ### Examples for Valid XML attribute notations:

       border="MatteBorder(4,4,4,4,red)"
       insets="2,2,2,2"

  Version:
    $Revision: 1.1 $
  Author:
    Wolf Paulus
  See Also:
    `Insets`, `ConverterLibrary`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Class` | `TEMPLATE` converter's return type

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InsetsConverter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `convert(Class type, Attribute attr, Localizer localizer)` Converts a Strings into an Insets object
    `Class` | `convertsTo()` A `Converters` conversTo method informs about the Class type the converter is returning when its `convert` method is called

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### TEMPLATE

          public static final Class TEMPLATE

      converter's return type

  - ### Constructor Detail

    - #### InsetsConverter

          public InsetsConverter()

  - ### Method Detail

    - #### convert

          public Object convert(Class type,
                       Attribute attr,
                       Localizer localizer)

      Converts a Strings into an Insets object
      Specified by:
        `convert` in interface `Converter`
      Parameters:
        `type` - `Class` not used
        `attr` - `Attribute` value needs to provide String containing comma sep. integers
      Returns:
        `Object` runtime type is subclass of `Insets`

    - #### convertsTo

          public Class convertsTo()

      A `Converters` conversTo method informs about the Class type the converter is returning when its `convert` method is called
      Specified by:
        `convertsTo` in interface `Converter`
      Returns:
        `Class` - the Class the converter is returning when its convert method is called

Copyright © 2002 - 2013 - Wolf Paulus - wolfpaulus.com. All rights reserved.