Class DatePickerCellEditor

    • Field Detail

      • clickCountToStart

        protected int clickCountToStart
      • ignoreAction

        protected boolean ignoreAction
    • Constructor Detail

      • DatePickerCellEditor

        public DatePickerCellEditor()
        Instantiates a editor with the default dateFormat. PENDING: always override default from DatePicker?
      • DatePickerCellEditor

        public DatePickerCellEditor​(DateFormat dateFormat)
        Instantiates an editor with the given dateFormat. If null, the datePickers default is used.
        Parameters:
        dateFormat -
    • Method Detail

      • getCellEditorValue

        public Date getCellEditorValue()
        Returns the pickers date. Note: the date is only meaningful after a stopEditing and before the next call to getTableCellEditorComponent.
        Specified by:
        getCellEditorValue in interface CellEditor
      • setClickCountToStart

        public void setClickCountToStart​(int count)
        Specifies the number of clicks needed to start editing.
        Parameters:
        count - an int specifying the number of clicks needed to start editing
        See Also:
        getClickCountToStart()
      • getClickCountToStart

        public int getClickCountToStart()
        Returns the number of clicks needed to start editing.
        Returns:
        the number of clicks needed to start editing
      • getValueAsDate

        protected Date getValueAsDate​(Object value)
        Returns the given value as Date. PENDING: abstract into something pluggable (like StringValue in ComponentProvider?)
        Parameters:
        value - the value to map as Date
        Returns:
        the value as Date or null, if not successful.
      • handleParseException

        protected void handleParseException​(ParseException e)
        Parameters:
        e -
      • isEmpty

        protected boolean isEmpty​(Object value)
      • commitChange

        protected boolean commitChange()
        Commits any pending edits and returns a boolean indicating whether the commit was successful.
        Returns:
        true if the edit was valid, false otherwise.
      • getFormats

        public DateFormat[] getFormats()
        Returns:
        the DatePicker's formats.
      • getPickerActionListener

        protected ActionListener getPickerActionListener()
        Returns the ActionListener to add to the datePicker.
        Returns:
        the action listener to listen for datePicker's action events.
      • createPickerActionListener

        protected ActionListener createPickerActionListener()
        Creates and returns the ActionListener for the Picker.
        Returns:
        the ActionListener to listen for Picker's action events.