Class Drag


  • public final class Drag
    extends AbstractNode
    Configuration item to define the style to apply to drag area, during zooming.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • setEnabled

        public void setEnabled​(boolean enabled)
        Sets true to enable element for drag zooming.
        Parameters:
        enabled - true to enable element for drag zooming
      • isEnabled

        public boolean isEnabled()
        Returns true to enable element for drag zooming.
        Returns:
        true to enable element for drag zooming
      • setDrawTime

        public void setDrawTime​(DrawTime drawTime)
        Sets the draw time which defines when the drag rectangle is drawn.
        Parameters:
        drawTime - the draw time which defines when the drag rectangle is drawn
      • getDrawTime

        public DrawTime getDrawTime()
        Returns the draw time which defines when the drag rectangle is drawn.
        Returns:
        the draw time which defines when the drag rectangle is drawn
      • 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