Package jexer

Class TSpinner

  • All Implemented Interfaces:
    java.lang.Comparable<TWidget>

    public class TSpinner
    extends TWidget
    TSpinner implements a simple up/down spinner.
    • Constructor Detail

      • TSpinner

        public TSpinner​(TWidget parent,
                        int x,
                        int y,
                        TAction upAction,
                        TAction downAction)
        Public constructor.
        Parameters:
        parent - parent widget
        x - column relative to parent
        y - row relative to parent
        upAction - action to call when the up arrow is clicked or pressed
        downAction - action to call when the down arrow is clicked or pressed
    • Method Detail

      • onMouseDown

        public void onMouseDown​(TMouseEvent mouse)
        Handle mouse checkbox presses.
        Overrides:
        onMouseDown in class TWidget
        Parameters:
        mouse - mouse button down event
      • onKeypress

        public void onKeypress​(TKeypressEvent keypress)
        Handle keystrokes.
        Overrides:
        onKeypress in class TWidget
        Parameters:
        keypress - keystroke event
      • draw

        public void draw()
        Draw the spinner arrows.
        Overrides:
        draw in class TWidget