Package totalcross.ui

Interface Scrollable

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean canScrollContent​(int direction, java.lang.Object target)
      Checks if there is room to flick this container in the given direction.
      void flickEnded​(boolean atPenDown)
      Called when the flick animation is ended.
      boolean flickStarted()
      Called when the flick animation is started.
      Flick getFlick()
      Returns the current flick object.
      int getScrollPosition​(int direction)
      Returns the current position given the direction.
      boolean scrollContent​(int xDelta, int yDelta, boolean fromFlick)
      Performs a relative move.
      boolean wasScrolled()
      Returns true if the control was scrolled since last pen down
    • Method Detail

      • flickStarted

        boolean flickStarted()
        Called when the flick animation is started.
      • flickEnded

        void flickEnded​(boolean atPenDown)
        Called when the flick animation is ended.
        Parameters:
        atPenDown - Flag indicating if the animation ended due to a pendown event.
      • canScrollContent

        boolean canScrollContent​(int direction,
                                 java.lang.Object target)
        Checks if there is room to flick this container in the given direction.
        Parameters:
        direction - The direction we want to flick given by one of the following constants:
        target - The target of the series of PEN events that triggered this flick attempt.
        Returns:
        true if the container can flick in the indicated direction.
      • scrollContent

        boolean scrollContent​(int xDelta,
                              int yDelta,
                              boolean fromFlick)
        Performs a relative move.
        Parameters:
        xDelta - The relative amount of pixels to move in the X axis.
        yDelta - The relative amount of pixels to move in the Y axis.
      • getFlick

        Flick getFlick()
        Returns the current flick object.
      • getScrollPosition

        int getScrollPosition​(int direction)
        Returns the current position given the direction. Used on page scrolls.
      • wasScrolled

        boolean wasScrolled()
        Returns true if the control was scrolled since last pen down