Interface IUnitFragment

All Known Subinterfaces:
IUnitTextFragment

public interface IUnitFragment
A fragment representing parts of a unit. Fragments can be used to present documents generated by the unit, or display regions or various representations of a unit.
  • Method Details

    • getUnit

      IUnit getUnit()
      Get the unit visualized by this fragment.
      Returns:
      the unit, never null
    • isActiveItem

      boolean isActiveItem(IItem item)
      Determine if the provided item is currently active in the fragment.
      Parameters:
      item -
      Returns:
    • getActiveItem

      IItem getActiveItem()
      Retrieve the currently active item in the fragment (eg, the caret is on an interactive text item), if any.
      Returns:
      an item or null
    • getActiveItemAsText

      String getActiveItemAsText()
      Retrieve the text representing the currently active item.
      Returns:
      a string, or null if there is no active item or the item has no textual representation
    • getActiveAddress

      String getActiveAddress()
      Retrieve the active address in the fragment, if any.
      Returns:
    • getActiveAddress

      String getActiveAddress(AddressConversionPrecision precision)
      Retrieve the active address in the fragment, with desired precision. Be careful that if precision is not managed, this method will return null. Call getActiveAddress() for safe result.
      Parameters:
      precision - expected precision of the Active Address.
      Returns:
    • setActiveAddress

      boolean setActiveAddress(String address)
      Set the active address within this fragment to the provided address.
      Parameters:
      address - the address
      Returns:
      success indicator