Package org.pepstock.charba.client.zoom
Class Drag
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.zoom.Drag
-
public final class Drag extends AbstractNode
Configuration item to define the style to apply to drag area, during zooming.- Author:
- Andrea "Stock" Stocchero
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_BACKGROUND_COLORDefault background color, "rgba(225,225,225,0.3)".static StringDEFAULT_BORDER_COLORDefault border color, "rgb(225,225,225)".static intDEFAULT_BORDER_WIDTHDefault border width, 0.static booleanDEFAULT_ENABLEDDefault enabled, false.static doubleDEFAULT_THRESHOLDDefault threshold, 0.0.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IsColorgetBackgroundColor()Returns the fill color during dragging.StringgetBackgroundColorAsString()Returns the fill color during dragging.IsColorgetBorderColor()Returns the color of the border during dragging.StringgetBorderColorAsString()Returns the color of the border during dragging.intgetBorderWidth()Returns the width of the border in pixels.ModifierKeygetModifierKey()Returns the modifier key to activate drag-to-zoom.doublegetThreshold()Returns the minimal zoom distance required before actually applying zoom.booleanisEnabled()Returnstrueto enable element for drag zooming.voidsetBackgroundColor(String backgroundColor)Sets the fill color during dragging.voidsetBackgroundColor(IsColor backgroundColor)Sets the fill color during dragging.voidsetBorderColor(String borderColor)Sets the color of the border during dragging.voidsetBorderColor(IsColor borderColor)Sets the color of the border during dragging.voidsetBorderWidth(int borderWidth)Sets the width of the border in pixels.voidsetEnabled(boolean enabled)Setstrueto enable element for drag zooming.voidsetModifierKey(ModifierKey modifierKey)Sets the modifier key to activate drag-to-zoom.voidsetThreshold(double threshold)Sets the minimal zoom distance required before actually applying zoom.-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, 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
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, 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_BACKGROUND_COLOR
public static final String DEFAULT_BACKGROUND_COLOR
Default background color, "rgba(225,225,225,0.3)".- See Also:
- Constant Field Values
-
DEFAULT_BORDER_COLOR
public static final String DEFAULT_BORDER_COLOR
Default border color, "rgb(225,225,225)".- See Also:
- Constant Field Values
-
DEFAULT_BORDER_WIDTH
public static final int DEFAULT_BORDER_WIDTH
Default border width, 0.- See Also:
- Constant Field Values
-
DEFAULT_THRESHOLD
public static final double DEFAULT_THRESHOLD
Default threshold, 0.0.- See Also:
- Constant Field Values
-
-
Method Detail
-
setEnabled
public void setEnabled(boolean enabled)
Setstrueto enable element for drag zooming.- Parameters:
enabled-trueto enable element for drag zooming
-
isEnabled
public boolean isEnabled()
Returnstrueto enable element for drag zooming.- Returns:
trueto enable element for drag zooming
-
setBackgroundColor
public void setBackgroundColor(IsColor backgroundColor)
Sets the fill color during dragging.- Parameters:
backgroundColor- the fill color during dragging
-
setBackgroundColor
public void setBackgroundColor(String backgroundColor)
Sets the fill color during dragging.- Parameters:
backgroundColor- the fill color during dragging
-
getBackgroundColorAsString
public String getBackgroundColorAsString()
Returns the fill color during dragging.- Returns:
- the fill color during dragging
-
getBackgroundColor
public IsColor getBackgroundColor()
Returns the fill color during dragging.- Returns:
- the fill color during dragging
-
setBorderColor
public void setBorderColor(IsColor borderColor)
Sets the color of the border during dragging.- Parameters:
borderColor- the color of the border during dragging
-
setBorderColor
public void setBorderColor(String borderColor)
Sets the color of the border during dragging.- Parameters:
borderColor- the color of the border during dragging
-
getBorderColorAsString
public String getBorderColorAsString()
Returns the color of the border during dragging.- Returns:
- the color of the border during dragging
-
getBorderColor
public IsColor getBorderColor()
Returns the color of the border during dragging.- Returns:
- the color of the border during dragging
-
setBorderWidth
public void setBorderWidth(int borderWidth)
Sets the width of the border in pixels.- Parameters:
borderWidth- the width of the border in pixels.
-
getBorderWidth
public int getBorderWidth()
Returns the width of the border in pixels.- Returns:
- the width of the border in pixels.
-
setThreshold
public void setThreshold(double threshold)
Sets the minimal zoom distance required before actually applying zoom.- Parameters:
threshold- the minimal zoom distance required before actually applying zoom
-
getThreshold
public double getThreshold()
Returns the minimal zoom distance required before actually applying zoom.- Returns:
- the minimal zoom distance required before actually applying zoom
-
setModifierKey
public void setModifierKey(ModifierKey modifierKey)
Sets the modifier key to activate drag-to-zoom.- Parameters:
modifierKey- the modifier key to activate drag-to-zoom
-
getModifierKey
public ModifierKey getModifierKey()
Returns the modifier key to activate drag-to-zoom.- Returns:
- the modifier key to activate drag-to-zoom
-
-