Package jexer

Class TCalendar

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

    public class TCalendar
    extends TWidget
    TCalendar is a date picker widget.
    • Constructor Detail

      • TCalendar

        public TCalendar​(TWidget parent,
                         int x,
                         int y,
                         TAction updateAction)
        Public constructor.
        Parameters:
        parent - parent widget
        x - column relative to parent
        y - row relative to parent
        updateAction - action to call when the user changes the value of the calendar
    • Method Detail

      • onMouseDown

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

        public void onMouseDoubleClick​(TMouseEvent mouse)
        Handle mouse double click.
        Overrides:
        onMouseDoubleClick in class TWidget
        Parameters:
        mouse - mouse double click event
      • onKeypress

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

        public void draw()
        Draw the combobox down arrow.
        Overrides:
        draw in class TWidget
      • getValue

        public java.util.Calendar getValue()
        Get calendar value.
        Returns:
        the current calendar value (clone instance)
      • setValue

        public final void setValue​(java.util.Calendar calendar)
        Set calendar value.
        Parameters:
        calendar - the new value to use
      • setValue

        public final void setValue​(long millis)
        Set calendar value.
        Parameters:
        millis - the millis to set to