How can I store clipboard information as data that is represented in a non-standard, custom-defined way?
My company has a custom-made SWT control for creating textboxes with masks, allowing a user to fill in a prompt for things such as phone numbers:
When data from this control is copied, I want a way that subsequent pastes of the data vary by context. For example, if the contexts are copied and pasted into a text file, I want the masked characters to be included. However, if it is pasted into other certain controls in our system, I want it to only paste the non-mask characters. Since any arbitrary characters can be used for the mask characters in the mask control, it is not possible for the controls receiving the pasted to be made to parse the pasted result. As such, I believe that the only way to accomplish this is to customize the way that the copied data is stored in clipboard. Is this plausible?