public final class Drag extends AbstractNode
Modifier and Type | Field and 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.
|
Modifier and Type | Method and 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()
Returns
true to enable element for drag zooming. |
void |
setBackgroundColor(IsColor backgroundColor)
Sets the fill color during dragging.
|
void |
setBackgroundColor(String backgroundColor)
Sets the fill color during dragging.
|
void |
setBorderColor(IsColor borderColor)
Sets the color of the border during dragging.
|
void |
setBorderColor(String 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)
Sets
true 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.
|
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, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
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, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
public static final boolean DEFAULT_ENABLED
public static final String DEFAULT_BACKGROUND_COLOR
public static final String DEFAULT_BORDER_COLOR
public static final int DEFAULT_BORDER_WIDTH
public static final double DEFAULT_THRESHOLD
public void setEnabled(boolean enabled)
true
to enable element for drag zooming.enabled
- true
to enable element for drag zoomingpublic boolean isEnabled()
true
to enable element for drag zooming.true
to enable element for drag zoomingpublic void setBackgroundColor(IsColor backgroundColor)
backgroundColor
- the fill color during draggingpublic void setBackgroundColor(String backgroundColor)
backgroundColor
- the fill color during draggingpublic String getBackgroundColorAsString()
public IsColor getBackgroundColor()
public void setBorderColor(IsColor borderColor)
borderColor
- the color of the border during draggingpublic void setBorderColor(String borderColor)
borderColor
- the color of the border during draggingpublic String getBorderColorAsString()
public IsColor getBorderColor()
public void setBorderWidth(int borderWidth)
borderWidth
- the width of the border in pixels.public int getBorderWidth()
public void setThreshold(double threshold)
threshold
- the minimal zoom distance required before actually applying zoompublic double getThreshold()
public void setModifierKey(ModifierKey modifierKey)
modifierKey
- the modifier key to activate drag-to-zoompublic ModifierKey getModifierKey()