com.aspose.omr

## Class ChoiceBoxElement

- java.lang.Object
- - com.aspose.omr.BasicElement
  - - com.aspose.omr.OmrElement
    - - com.aspose.omr.ChoiceBoxElement

-     public class ChoiceBoxElement
      extends OmrElement

  Represents an OMR choice element

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ChoiceBoxElement(String name, Point2D.Float position, Dimension2D.Float size)` Initializes a new instance of the `ChoiceBoxElement` class.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `extractData(OmrImage image, OmrConfig config)` Extracts data from a portion of scanned OMR sheet assigned to this element.
    `boolean` | `getMultipleSelectionAllowed()` Gets a value indicating whether the choice box can have multiple items selected at once.
    `void` | `loadProperties(StringDictionary properties)` Initializes the properties of an element from their string representation.
    `StringDictionary` | `saveProperties()` Converts values of the properties of an element from their string representation.
    `void` | `setMultipleSelectionAllowed(boolean value)` Sets a value indicating whether the choice box can have multiple items selected at once.

    - ### Methods inherited from class com.aspose.omr.OmrElement

      `getCells, getConfiguration, isHorizontal, isHorizontal, setConfiguration`

    - ### Methods inherited from class com.aspose.omr.BasicElement

      `getName, getPosition, getSize, setName, setPosition, setSize`

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

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

- - ### Constructor Detail

    - #### ChoiceBoxElement

          public ChoiceBoxElement(String name,
                          Point2D.Float position,
                          Dimension2D.Float size)

      Initializes a new instance of the `ChoiceBoxElement` class.

      Parameters:
        `name` - The name of the element.
        `position` - Element position, in millimeters, relative to top left corner of an image
        `size` - Size of the element, in millimeters.

  - ### Method Detail

    - #### extractData

          public String extractData(OmrImage image,
                           OmrConfig config)

      Extracts data from a portion of scanned OMR sheet assigned to this element.

      Specified by:
        `extractData` in class `BasicElement`
      Parameters:
        `image` - The image to extract data from.
        `config` - Configuration for OMR extraction algorithm.
      Returns:
        An string that contains data extracted from the element.

    - #### getMultipleSelectionAllowed

          public boolean getMultipleSelectionAllowed()

      Gets a value indicating whether the choice box can have multiple items selected at once.

      Returns:
        `true` if the choice box can have multiple items selected at once; otherwise `false`

    - #### loadProperties

          public void loadProperties(StringDictionary properties)

      Initializes the properties of an element from their string representation.

      Overrides:
        `loadProperties` in class `OmrElement`
      Parameters:
        `properties` - A collection of properties' values.

    - #### saveProperties

          public StringDictionary saveProperties()

      Converts values of the properties of an element from their string representation.

      Overrides:
        `saveProperties` in class `OmrElement`
      Returns:
        A collection of properties' values.

    - #### setMultipleSelectionAllowed

          public void setMultipleSelectionAllowed(boolean value)

      Sets a value indicating whether the choice box can have multiple items selected at once.

      Parameters:
        `value` - `true` if the choice box should have multiple items selected at once; otherwise `false`

Copyright © 2014. All rights reserved.