com.mapinfo.midev.style.mapbasic

## Class MapBasicStyleConvertor

- java.lang.Object
- - com.mapinfo.midev.style.mapbasic.MapBasicStyleConvertor

    public final class MapBasicStyleConvertor
    extends Object

Utility class used to convert a MapBasic style command into an IStyle.

See Also:
  `IStyle`

### Method Summary

All Methods Static Methods Concrete Methods
`static IStyle` `getStyle(String mapBasicString)` This converts a MapBasic string into its Style object equivalent.

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

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

### Method Detail

#### getStyle

    public static IStyle getStyle(String mapBasicString)

This converts a MapBasic string into its Style object equivalent. If the string cannot be converted it logs an error and throws a runtime exception. The following conversions are possible

- Pen (width, pattern, color)(not followed by Brush) --> ILineStyle object
- Line (width, pattern, color) --> ILineStyle object
- Pen (width, pattern, color) Brush (pattern, fg [, bg]) --> IAreaStyle object
- Symbol (shape, color, size) --> IPointStyle object
- Symbol(shape, color, size, "fontname", fontstyle, rotation) --> IPointStyle object
- Symbol("filename", color, size, customstyle) --> IPointStyle object
- compound string (e.g., "Pen(2, 5, 0) Pen(12, 15, 255) Brush(16, 255, 12) Symbol(16, 12, 16)") --> ICompositeStyle object

Parameters:
  `mapBasicString` - String describing a Pen, Symbol, and/or Brush
Returns:
  IStyle simplest representation of the string as a Style object