public class

ScaleCalibrationPickerInspectorView

extends FrameLayout
implements PropertyInspectorView
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ com.pspdfkit.ui.inspector.views.ScaleCalibrationPickerInspectorView

Class Overview

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.

Summary

Nested Classes
interface ScaleCalibrationPickerInspectorView.CalibrationPickerListener Listener for calibration value being picked. 
[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
ScaleCalibrationPickerInspectorView(LineAnnotation lineAnnotation, Context context, String label, Scale.UnitTo defaultUnit, ScaleCalibrationPickerInspectorView.CalibrationPickerListener listener)
Construct calibration picker.
Public Methods
void bindController(PropertyInspectorController controller)
Bind to property inspector controller.
LineAnnotation getLineAnnotation()
int getPropertyInspectorMaxHeight()
Returns maximum height that this view with all its detail views will occupy.
int getPropertyInspectorMinHeight()
Height of the parent PropertyInspector that this view would like it to have.
int getSuggestedHeight()
Returns best height of this view when shown in inspector.
View getView()
Casts the inspector view to the View class and returns it.
void setCalibration(Float value, Scale.UnitTo unit, boolean notifyListeners)
Sets value to the calibration picker.
void unbindController()
Unbind from property inspector controller.
void updateCalibration(Scale maybeScale)
[Expand]
Inherited Methods
From class android.widget.FrameLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource
From interface com.pspdfkit.ui.inspector.PropertyInspectorView

Public Constructors

public ScaleCalibrationPickerInspectorView (LineAnnotation lineAnnotation, Context context, String label, Scale.UnitTo defaultUnit, ScaleCalibrationPickerInspectorView.CalibrationPickerListener listener)

Construct calibration picker.

Parameters
context The context to use.
defaultUnit Default Scale.UnitTo value selected. This should always be the same as the Scale destination ("to") unit.
listener Listener for calibration picker changes.

Public Methods

public void bindController (PropertyInspectorController controller)

Bind to property inspector controller.

public LineAnnotation getLineAnnotation ()

public int getPropertyInspectorMaxHeight ()

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

Returns
  • Hint for the maximum inspector height or 0 if no max height is specified.

public int getPropertyInspectorMinHeight ()

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

Returns
  • Hint for the minimum inspector height or 0 if no min height is specified.

public int getSuggestedHeight ()

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

Returns
  • Hint for the view height after being shown in inspector.

public View getView ()

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

public void setCalibration (Float value, Scale.UnitTo unit, boolean notifyListeners)

Sets value to the calibration picker.

public void unbindController ()

Unbind from property inspector controller.

public void updateCalibration (Scale maybeScale)