ScaleCalibrationPickerInspectorView

Inspector component for setting measurement scale via calibration picker. Calibration picker is added to the distance measurement tools as a way of setting scale by calibrating a distance annotation to the desired length and unit.

Parameters

lineAnnotation

the lineannotation whose length we calibrate

context

The context to use.

label

text describing the calibration value

defaultUnit

Default Scale.UnitTo value selected. This should always be the same as the Scale destination ("to") unit.

focusValueText

if true the value text widget will be focused and the keyboard be shown automatically after showing the inspector

listener

Listener for calibration picker changes.

Constructors

Link copied to clipboard
constructor(lineAnnotation: LineAnnotation, context: Context, label: String, defaultUnit: Scale.UnitTo, focusValueText: Boolean, listener: ScaleCalibrationPickerInspectorView.CalibrationPickerListener?)

Types

Link copied to clipboard

Listener for calibration value being picked.

Properties

Link copied to clipboard
open override val propertyInspectorMaxHeight: Int
Link copied to clipboard
open override val propertyInspectorMinHeight: Int
Link copied to clipboard
open override val suggestedHeight: Int
Link copied to clipboard
open override val view: View

Functions

Link copied to clipboard
open override fun bindController(controller: PropertyInspectorController)

Bind to property inspector controller.

Link copied to clipboard

The LineAnnotation that the scale calibration is being measured against.

Link copied to clipboard
open override fun getPropertyInspectorMaxHeight(): Int

Returns maximum height that this view with all its detail views will occupy.

Link copied to clipboard
open override fun getPropertyInspectorMinHeight(): Int

Height of the parent PropertyInspector that this view would like it to have.

Link copied to clipboard
open override fun getSuggestedHeight(): Int

Returns best height of this view when shown in inspector. This is used to suggest initial height to inspector parent.

Link copied to clipboard
open override fun getView(): View

Casts the inspector view to the View class and returns it.

Link copied to clipboard
fun setCalibration(value: Float?, unit: Scale.UnitTo, notifyListeners: Boolean)

Sets value to the calibration picker.

Link copied to clipboard
open override fun unbindController()

Unbind from property inspector controller.

Link copied to clipboard
fun updateCalibration(maybeScale: Scale?)

Updates the calibration picker UI from the given scale or from the annotation's current measurement scale if the provided scale is null.