Class AbstractClipboardData<T>

    • Constructor Detail

      • AbstractClipboardData

        public AbstractClipboardData()
    • Method Detail

      • getFlowClass

        public abstract Class getFlowClass()
        Returns the class used in the flow.
        Returns:
        the class
      • copy

        public abstract void copy​(T data)
        Copies the data to the clipboard.
        Parameters:
        data - the data to copy
      • unwrap

        protected abstract T unwrap​(Token data)
        Unwraps the actual data from the token.
        Parameters:
        data - the token to unwrap
        Returns:
        the actual data, null if can't handle
      • copyFromToken

        public boolean copyFromToken​(Token data)
        Copies the data stored in the token to the clipboard.
        Parameters:
        data - the data to copy
      • canPaste

        public abstract boolean canPaste()
        Checks whether the required data type is available from the clipboard.
        Returns:
        true if data is available
      • paste

        public abstract T paste()
        Pastes the data from the clipboard.
        Returns:
        the pasted data, null if failed to paste
      • wrap

        protected abstract Token wrap​(T data)
        Wraps the data from the clipboard in a flow token.
        Returns:
        the pasted data, null if failed to paste
      • pasteAsToken

        public Token pasteAsToken()
        Pastes the data from the clipboard as flow token.
        Returns:
        the pasted data, null if failed to paste