Package com.iizigo.dnd
Class ClipboardHelper
java.lang.Object
com.iizigo.dnd.ClipboardHelper
The clip board helper class is used to interface with the clip board in Eclipse/SWT with the Properties.
- Author:
- Christopher Mindus
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- static boolean- doesClipboardContainText- (boolean emptyAllowed) Checks if the clipboard contains text.- static GProp<?>[]Gets the clip board data as a valid Properties Container.- static StringGets the text contained in the clipboard.- static void- setClipboard- (GProp<?>[] gps, ISelection selection, boolean doCopy) Sets the clip board with the properties.- static void- setClipboard- (String text) Sets the clipboard text.
- Constructor Details- ClipboardHelperpublic ClipboardHelper()
 
- Method Details- getClipboardTextGets the text contained in the clipboard.- Returns:
- The text String, null for none.
 
- doesClipboardContainTextpublic static boolean doesClipboardContainText- (boolean emptyAllowed) Checks if the clipboard contains text.
- getClipboardPropsGets the clip board data as a valid Properties Container.- Returns:
- The PropCnr []or null if clip board doesn't contain a valid property container.
 
- setClipboardSets the clipboard text.- Parameters:
- text- The clipboard text, formatted by LF for new lines.
 
- setClipboardSets the clip board with the properties.- The clip board is set with the transfer types PropertiesTransfer and ResourceTransfer if possible. - If the properties are all IPropDesigner instances with IResource's attached, the ResourceTransfer is only used. - When ResourceTransfer is used, the FileTransfer is also set. - If the - selectionparameter is non-null, the clip board is set with the LocalSelectionTransfer type for use in the same Eclipse instance.- Parameters:
- gps- The array of property containers.
- selection- The selection (or null for none).
- doCopy- Causes the selection to be saved to clipboard too (for cut or delete, this is not possible).