Class DataLoadingConstraintEditor<T>

    • Field Detail

      • columnDataSource

        protected final ColumnData<T> columnDataSource
      • statusLabel

        protected javax.swing.JLabel statusLabel
    • Constructor Detail

      • DataLoadingConstraintEditor

        public DataLoadingConstraintEditor​(ColumnConstraint<T> delegateConstraint,
                                           ColumnData<T> columnDataSource)
        Constructor.
        Parameters:
        delegateConstraint - the constraint to feed column data to. Provides editors for manipulating constraint values.
        columnDataSource - provides access to table data and. Must be non-null.
    • Method Detail

      • buildInlineEditorComponent

        protected java.awt.Component buildInlineEditorComponent()
        Delegate the construction of the inline editor component.

        This editor provides a panel containing a TaskMonitorComponent and the ability to reload the columns' data; if the delegate editor provides an inline editor, this wraps it, and switches between task view and the editor depending on the executing state of the data-load task.

        Specified by:
        buildInlineEditorComponent in class AbstractColumnConstraintEditor<T>
        Returns:
        the editors inline component
        See Also:
        buildDelegateInlineEditor()
      • buildDelegateInlineEditor

        protected java.awt.Component buildDelegateInlineEditor()
        Get the delegates' inline editor component
        Returns:
        the inline editor for the delegate constraint
      • buildDetailEditorComponent

        protected java.awt.Component buildDetailEditorComponent()
        Delegate the construction of the detail editor component.

        Subclasses should override this method if they choose to provide a detailed constraint editor. This is an optional feature, and this implementation returns null to satisfy the ColumnConstraintEditor contract.

        Overrides:
        buildDetailEditorComponent in class AbstractColumnConstraintEditor<T>
        Returns:
        the editors detail component; null in this implementation
        See Also:
        buildDelegateDetailEditor()
      • buildDelegateDetailEditor

        protected java.awt.Component buildDelegateDetailEditor()
        Get the delegates' detail component
        Returns:
        the detail editor for the delegate constraint
      • handleColumnDataValue

        public abstract void handleColumnDataValue​(T value)
        A value has been read from the table (column); handle it in an editor-specific way.
        Parameters:
        value - the value read from the table (column)
      • columnDataLoadComplete

        public void columnDataLoadComplete()
        Notification that the column data-load has been completed.
      • columnDataLoadCancelled

        public void columnDataLoadCancelled()
        Notification that the column data-load was cancelled.
      • clearColumnData

        public void clearColumnData()
        Request that any state maintained by the delegate editor pertaining to column data be cleared.
      • resetEditor

        protected abstract void resetEditor()
        Reset the delegate editor to a known state
        See Also:
        reset()
      • getErrorMessage

        public java.lang.String getErrorMessage()
        Description copied from interface: ColumnConstraintEditor
        If the editor contains and invalid value, this message should indicate why the value is invalid. Only called if hasValidValue() returns false.
        Specified by:
        getErrorMessage in interface ColumnConstraintEditor<T>
        Returns:
        an error message, or an empty string if no error
      • doUpdateEditorComponent

        protected abstract void doUpdateEditorComponent()
        Indicates the constraint has changed, and the user interface needs to be updated to reflect the new state.
      • taskCompleted

        public void taskCompleted​(Task task)
        Description copied from interface: TaskListener
        Notification that the task completed.
        Specified by:
        taskCompleted in interface TaskListener
        Parameters:
        task - the task that was running and is now completed
      • taskCancelled

        public void taskCancelled​(Task task)
        Description copied from interface: TaskListener
        Notification that the task was canceled.
        Specified by:
        taskCancelled in interface TaskListener
        Parameters:
        task - the task that was running and was canceled