Package com.pspdfkit.ui.inspector.views
Class ScalePickerInspectorView
-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback
,android.view.KeyEvent.Callback
,android.view.ViewManager
,android.view.ViewParent
,android.view.accessibility.AccessibilityEventSource
,com.pspdfkit.ui.inspector.PropertyInspectorView
public class ScalePickerInspectorView extends FrameLayout implements PropertyInspectorView
Inspector component for picking measurement annotation scale.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
ScalePickerInspectorView.ScalePickerListener
Listener for scale value being picked.
-
Field Summary
Fields Modifier and Type Field Description public Scale
currentScaleValue
-
Constructor Summary
Constructors Constructor Description ScalePickerInspectorView(Context context, String label, Scale defaultValue, ScalePickerInspectorView.ScalePickerListener listener)
Construct scale picker.
-
Method Summary
Modifier and Type Method Description Scale
getCurrentScaleValue()
void
setScale(@NonNull() Scale scale, boolean notifyListeners, boolean updateCalibration)
Sets value to the scale picker. View
getView()
Casts the inspector view to the View class and returns it. void
bindController(@NonNull() PropertyInspectorController controller)
Bind to property inspector controller. void
unbindController()
Unbind from property inspector controller. int
getPropertyInspectorMinHeight()
Height of the parent PropertyInspector that this view would like it to have. int
getPropertyInspectorMaxHeight()
Returns maximum height that this view with all its detail views will occupy. int
getSuggestedHeight()
Returns best height of this view when shown in inspector. void
setCalibrationPicker(@NonNull() ScaleCalibrationPickerInspectorView calibrationPicker)
-
-
Constructor Detail
-
ScalePickerInspectorView
ScalePickerInspectorView(Context context, String label, Scale defaultValue, ScalePickerInspectorView.ScalePickerListener listener)
Construct scale picker.- Parameters:
context
- The context to use.defaultValue
- Default scale value selected when showing picker.listener
- Listener for scale picker changes.
-
-
Method Detail
-
getCurrentScaleValue
Scale getCurrentScaleValue()
-
setScale
void setScale(@NonNull() Scale scale, boolean notifyListeners, boolean updateCalibration)
Sets value to the scale picker.
- Parameters:
scale
- The Scale to be set.notifyListeners
- If scale has changed, this sets whether or not to notify the external ScalePickerListener about the change.updateCalibration
- Whether or not to update the calibration on scale change.
-
bindController
void bindController(@NonNull() PropertyInspectorController controller)
Bind to property inspector controller.
-
unbindController
void unbindController()
Unbind from property inspector controller.
-
getPropertyInspectorMinHeight
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.
-
getPropertyInspectorMaxHeight
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.
-
getSuggestedHeight
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.
-
setCalibrationPicker
void setCalibrationPicker(@NonNull() ScaleCalibrationPickerInspectorView calibrationPicker)
-
-
-
-