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 String
DEFAULT_BACKGROUND_COLOR
Default background color, "rgba(225,225,225,0.3)".static String
DEFAULT_BORDER_COLOR
Default border color, "rgb(225,225,225)".static int
DEFAULT_BORDER_WIDTH
Default border width, 0.static boolean
DEFAULT_ENABLED
Default enabled, false.static double
DEFAULT_THRESHOLD
Default threshold, 0.0.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IsColor
getBackgroundColor()
Returns the fill color during dragging.String
getBackgroundColorAsString()
Returns the fill color during dragging.IsColor
getBorderColor()
Returns the color of the border during dragging.String
getBorderColorAsString()
Returns the color of the border during dragging.int
getBorderWidth()
Returns the width of the border in pixels.ModifierKey
getModifierKey()
Returns the modifier key to activate drag-to-zoom.double
getThreshold()
Returns the minimal zoom distance required before actually applying zoom.boolean
isEnabled()
Returnstrue
to enable element for drag zooming.void
setBackgroundColor(String backgroundColor)
Sets the fill color during dragging.void
setBackgroundColor(IsColor backgroundColor)
Sets the fill color during dragging.void
setBorderColor(String borderColor)
Sets the color of the border during dragging.void
setBorderColor(IsColor borderColor)
Sets the color of the border during dragging.void
setBorderWidth(int borderWidth)
Sets the width of the border in pixels.void
setEnabled(boolean enabled)
Setstrue
to enable element for drag zooming.void
setModifierKey(ModifierKey modifierKey)
Sets the modifier key to activate drag-to-zoom.void
setThreshold(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)
Setstrue
to enable element for drag zooming.- Parameters:
enabled
-true
to enable element for drag zooming
-
isEnabled
public boolean isEnabled()
Returnstrue
to enable element for drag zooming.- Returns:
true
to 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
-
-