Package org.pepstock.charba.client.zoom
Class Pan
-
public final class Pan extends AbstractConfigurationItem
Base object to map pan options forZoomPlugin.IDplugin configuration.
It represents the container for PAN options.- Author:
- Andrea "Stock" Stocchero
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEFAULT_ENABLEDDefault enabled, false.static doubleDEFAULT_THRESHOLDDefault threshold, 10.0.-
Fields inherited from class org.pepstock.charba.client.zoom.AbstractConfigurationItem
DEFAULT_MODE, DEFAULT_OVER_SCALE_MODE, DEFAULT_SCALE_MODE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description default CompletedCallbackgetCompletedCallback()Returns the callback called once zooming or panning is completed.default ModegetMode()Returns the element (panning or zooming) directions.default ModeCallbackgetModeCallback()Returns the element (panning or zooming) directions callback, to set the mode at runtime.ModifierKeygetModifierKey()Returns the modifier key to activate panning.default ModegetOverScaleMode()Returns which of the enabled zooming directions should only be available when the mouse cursor is over one of scale.default ModeCallbackgetOverScaleModeCallback()Returns the element (panning or zooming) directions callback, to set the mode at runtime, which of the enabled zooming directions should only be available when the mouse cursor is over one of scaledefault ProgressCallbackgetProgressCallback()Returns the callback called while the user is zooming or panning.default RejectedCallbackgetRejectedCallback()Returns the callback called once zooming or panning is rejected.default ModegetScaleMode()Returns panning over a scale for that axis (regardless of mode).default ModeCallbackgetScaleModeCallback()Returns the element directions callback, to enable panning over a scale for that axis (regardless of mode).default StartCallbackgetStartCallback()Returns the callback called once zooming or panning is started.doublegetThreshold()Returns the minimal pan distance required before actually applying pan.booleanisEnabled()Returnstrueto enable pan element.voidsetEnabled(boolean enabled)Setstrueto enable pan element.voidsetModifierKey(ModifierKey modifierKey)Sets the modifier key to activate panning.voidsetThreshold(double threshold)Sets the minimal pan distance required before actually applying pan.-
Methods inherited from class org.pepstock.charba.client.zoom.AbstractConfigurationItem
getCompletedCallback, getMode, getModeCallback, getOverScaleMode, getOverScaleModeCallback, getProgressCallback, getRejectedCallback, getScaleMode, getScaleModeCallback, getStartCallback, setCompletedCallback, setMode, setMode, setMode, setOverScaleMode, setOverScaleMode, setOverScaleMode, setProgressCallback, setRejectedCallback, setScaleMode, setScaleMode, setScaleMode, setStartCallback
-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, getUpdateListener, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setUpdateListener, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkAndGetColor, checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Field Detail
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLED
Default enabled, false.- See Also:
- Constant Field Values
-
DEFAULT_THRESHOLD
public static final double DEFAULT_THRESHOLD
Default threshold, 10.0.- See Also:
- Constant Field Values
-
-
Method Detail
-
setEnabled
public final void setEnabled(boolean enabled)
Setstrueto enable pan element.- Parameters:
enabled-trueto enable pan element
-
isEnabled
public final boolean isEnabled()
Returnstrueto enable pan element.- Returns:
trueto enable pan element
-
setModifierKey
public void setModifierKey(ModifierKey modifierKey)
Sets the modifier key to activate panning.- Parameters:
modifierKey- the modifier key to activate panning
-
getModifierKey
public ModifierKey getModifierKey()
Returns the modifier key to activate panning.- Returns:
- the modifier key to activate panning
-
setThreshold
public void setThreshold(double threshold)
Sets the minimal pan distance required before actually applying pan.- Parameters:
threshold- the minimal pan distance required before actually applying pan
-
getThreshold
public double getThreshold()
Returns the minimal pan distance required before actually applying pan.- Returns:
- the minimal pan distance required before actually applying pan
-
getMode
public default Mode getMode()
Returns the element (panning or zooming) directions.- Returns:
- the element (panning or zooming) directions
-
getScaleMode
public default Mode getScaleMode()
Returns panning over a scale for that axis (regardless of mode).- Returns:
- panning over a scale for that axis (regardless of mode).
-
getOverScaleMode
public default Mode getOverScaleMode()
Returns which of the enabled zooming directions should only be available when the mouse cursor is over one of scale.- Returns:
- which of the enabled zooming directions should only be available when the mouse cursor is over one of scale
-
getModeCallback
public default ModeCallback getModeCallback()
Returns the element (panning or zooming) directions callback, to set the mode at runtime.- Returns:
- the element (panning or zooming) directions callback
-
getScaleModeCallback
public default ModeCallback getScaleModeCallback()
Returns the element directions callback, to enable panning over a scale for that axis (regardless of mode).- Returns:
- the element directions callback
-
getOverScaleModeCallback
public default ModeCallback getOverScaleModeCallback()
Returns the element (panning or zooming) directions callback, to set the mode at runtime, which of the enabled zooming directions should only be available when the mouse cursor is over one of scale- Returns:
- the element (panning or zooming) directions callback
-
getProgressCallback
public default ProgressCallback getProgressCallback()
Returns the callback called while the user is zooming or panning.- Returns:
- the callback called while the user is zooming or panning
-
getCompletedCallback
public default CompletedCallback getCompletedCallback()
Returns the callback called once zooming or panning is completed.- Returns:
- the callback called once zooming or panning is completed
-
getRejectedCallback
public default RejectedCallback getRejectedCallback()
Returns the callback called once zooming or panning is rejected.- Returns:
- the callback called once zooming or panning is rejected
-
getStartCallback
public default StartCallback getStartCallback()
Returns the callback called once zooming or panning is started.- Returns:
- the callback called once zooming or panning is started
-
-