Class GScrollView

  • All Implemented Interfaces:
    java.lang.Iterable<sag.elements.GElement>, sag.elements.Drawable

    public class GScrollView
    extends sag.elements.GGroup
    A scrollable GGroup.

    This is a very rudimentary implementation - it does not check for downwards over-scrolling. Also, the inner content can't be clipped by the scroll view because it is unbounded. It's only meant for simple use cases such as the CableStore.

    Author:
    Luna Otte
    See Also:
    ScrollListener
    • Field Summary

      • Fields inherited from class sag.elements.GElement

        handleMouseEvents, mouseListener, mouseListenerSync, positionX, positionY, rawSVGElement, rotation, scaleX, scaleY, skewX, skewY
    • Constructor Summary

      Constructors 
      Constructor Description
      GScrollView​(sag.elements.GGroup inner, sag.elements.GElement backdrop)
      Creates a new GScrollView
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void reset()
      Resets the scroll offset of the inner content
      void scrollEvent​(sag.events.MouseWheelEvent e)
      Moves the inner content; This will be triggered when a MouseWheelEvent occurs
      • Methods inherited from class sag.elements.GGroup

        addChild, addChild, getChildByRenderingIndex, getNumChildren, getRawSVGGroup, indexOfChild, iterator, processMouseButtonEvent, processMouseMotionEvent, processMouseWheelEvent, removeChild, renderChildAfter, renderChildBefore, renderChildEarlier, renderChildFirst, renderChildLast, renderChildLater, setChildRenderingIndex, setRootSAGPanel, swapChildren
      • Methods inherited from class sag.elements.GElement

        amIPicked, executeUpdate, flipHorizontal, flipVertical, getGElement, getParent, getPositionX, getPositionY, getRGBStringFromColor, getRootSAGPanel, getRotation, getScaleX, getScaleY, getSkewX, getSkewY, move, removeCSSAttribute, removeXMLAttribute, rotate, scale, scale, setAttribute, setCSSAttribute, setCSSAttribute, setDisplay, setFill, setFill, setFillOpacity, setMouseEventListener, setOpacity, setParent, setPosition, setRotation, setScale, setScale, setSkew, setStroke, setStroke, setStroke, setStrokeLinecap, setStrokeLinejoin, setStrokeOpacity, setStrokePattern, setStrokePatternOffset, setStrokeWidth, setXMLAttribute, setXMLAttribute, skew, unsetFill, unsetFillOpacity, unsetOpacity, unsetStroke, unsetStrokeLinecap, unsetStrokeLinejoin, unsetStrokeOpacity, unsetStrokePattern, unsetStrokePatternOffset, unsetStrokeWidth, update, updateTransform
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • GScrollView

        public GScrollView​(sag.elements.GGroup inner,
                           sag.elements.GElement backdrop)
        Creates a new GScrollView
        Parameters:
        inner - The inner content of the view
        backdrop - The backdrop against which the content is placed
    • Method Detail

      • scrollEvent

        public void scrollEvent​(sag.events.MouseWheelEvent e)
        Moves the inner content; This will be triggered when a MouseWheelEvent occurs
        Parameters:
        e - The event
      • reset

        public void reset()
        Resets the scroll offset of the inner content