|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.TransferHandler
jigcell.compare.impl.Transferer
jigcell.compare.impl.DataSource
jigcell.compare.impl.OwnedDataSource
jigcell.compare.impl.ClipboardDataSource
public final class ClipboardDataSource
A generic transfer agent for a source of data that supports reading and writing to a clipboard.
This code is licensed under the DARPA BioCOMP Open Source License. See LICENSE for more details.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface jigcell.compare.IDataSource |
|---|
IDataSource.Option |
| Nested classes/interfaces inherited from interface jigcell.compare.IDataSource |
|---|
IDataSource.Option |
| Field Summary | |
|---|---|
private static java.lang.String |
DESCRIPTION_READ
Read operation description |
private static java.lang.String |
DESCRIPTION_WRITE
Write operation description |
private static java.lang.String |
MESSAGE_NOCLIPBOARDERROR
Error message when no clipboard is provided |
private static java.lang.String |
MESSAGE_NOFLAVORERROR
Error message when no transfer flavors are provided |
private static java.lang.String |
OPTION_CLIPBOARD
Clipboard to use |
private static java.lang.String |
OPTION_CLIPCONTENTS
Owned clipboard contents |
static java.lang.String |
OPTION_FLAVORS
Flavors to request data in |
| Fields inherited from class jigcell.compare.impl.OwnedDataSource |
|---|
MESSAGE_PACKERROR, MESSAGE_PROXYERROR, OPTION_OWNER, OPTION_TRANSFERCLASS, SIGNATURE_TRANSFER |
| Fields inherited from class jigcell.compare.impl.DataSource |
|---|
OPTIONS_LOCK, SEPARATOR_PAIR, SEPARATOR_PART, SEPARATORS |
| Fields inherited from class jigcell.compare.impl.Transferer |
|---|
CSV_FOOTER, CSV_LINEPOSTPEND, CSV_LINEPREPEND, CSV_LINESEPARATOR, HTML_FOOTER, HTML_HEADPOSTPEND, HTML_HEADPREPEND, HTML_HEADSEPARATOR, HTML_LINEPOSTPEND, HTML_LINEPREPEND, HTML_LINESEPARATOR |
| Fields inherited from class javax.swing.TransferHandler |
|---|
COPY, COPY_OR_MOVE, MOVE, NONE |
| Fields inherited from interface jigcell.compare.IReadableDataSource |
|---|
OPTION_READDESCRIPTION, OPTION_READICON |
| Fields inherited from interface jigcell.compare.IDataSource |
|---|
OPTION_NAME |
| Fields inherited from interface jigcell.compare.IWriteableDataSource |
|---|
OPTION_WRITEDESCRIPTION, OPTION_WRITEICON |
| Fields inherited from interface jigcell.compare.IDataSource |
|---|
OPTION_NAME |
| Constructor Summary | |
|---|---|
ClipboardDataSource()
Creates a new data source that represents a clipboard. |
|
ClipboardDataSource(java.awt.datatransfer.Clipboard clipboard)
Creates a new data source that represents a file. |
|
| Method Summary | |
|---|---|
private void |
addToClipboardContents(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
Adds a transferable to the clipboard contents option. |
private java.util.Map |
getClipboardContentsOption()
The clipboard contents option. |
private java.awt.datatransfer.Clipboard |
getClipboardOption()
The clipboard option. |
java.util.List |
getFlavorsOption()
The clipboard flavors option. |
java.lang.Class |
getPredictedContents()
A prediction on the type of data this source contains. |
protected void |
initializeSource()
Performs any initialization work for the view that must be duplicated for each new instance. |
void |
lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable transferable)
|
java.lang.Object |
read()
The contents of this data source or the first available content if multiple objects are supported. |
private boolean |
removeFromClipboardContents(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
Removes a transferable from the clipboard contents option. |
private void |
setClipboardContentsOption(java.util.Map contents)
Sets the clipboard contents option. |
private void |
setClipboardOption(java.awt.datatransfer.Clipboard clipboard)
Sets the clipboard option. |
void |
setFlavorsOption(java.util.List flavors)
Sets the clipboard flavors option. |
void |
write(java.lang.Object data)
Writes data to the source destroying the previous contents if multiple objects are not supported. |
| Methods inherited from class jigcell.compare.impl.OwnedDataSource |
|---|
encode, getOwnerOption, getPredictedCompatibility, getPredictedCompatibility, getTransferClassOption, setOwnerOption, setTransferClassOption |
| Methods inherited from class jigcell.compare.impl.Transferer |
|---|
addExtension, addFlavor, createCSVTable, createFormattedTable, createHTMLTable, getExceptionRecorder, getExpectedClasses, getExpectedClasses, getExpectedClasses, getFlavors, getFlavors, getPreferredExtensions, getPreferredExtensions, getTransferClass, getTransferData, getTransferDataFlavors, getTransferFlavor, isDataFlavorSupported, transfer |
| Methods inherited from class javax.swing.TransferHandler |
|---|
canImport, createTransferable, exportAsDrag, exportDone, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getSourceActions, getVisualRepresentation, importData |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jigcell.compare.IReadableDataSource |
|---|
getReadDescriptionOption, getReadIconOption, setReadDescriptionOption, setReadIconOption |
| Methods inherited from interface jigcell.compare.IDataSource |
|---|
addOption, clone, configure, getName, getOption, getState, setOption, setState |
| Methods inherited from interface jigcell.compare.IWriteableDataSource |
|---|
getPredictedCompatibility, getPredictedCompatibility, getWriteDescriptionOption, getWriteIconOption, setWriteDescriptionOption, setWriteIconOption |
| Methods inherited from interface jigcell.compare.IDataSource |
|---|
addOption, clone, configure, getName, getOption, getState, setOption, setState |
| Field Detail |
|---|
public static final java.lang.String OPTION_FLAVORS
private static final java.lang.String DESCRIPTION_READ
private static final java.lang.String DESCRIPTION_WRITE
private static final java.lang.String MESSAGE_NOCLIPBOARDERROR
private static final java.lang.String MESSAGE_NOFLAVORERROR
private static final java.lang.String OPTION_CLIPBOARD
private static final java.lang.String OPTION_CLIPCONTENTS
| Constructor Detail |
|---|
public ClipboardDataSource()
public ClipboardDataSource(java.awt.datatransfer.Clipboard clipboard)
clipboard - Underlying clipboard| Method Detail |
|---|
public java.util.List getFlavorsOption()
public java.lang.Class getPredictedContents()
getPredictedContents in interface IReadableDataSource
public void lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable transferable)
lostOwnership in interface java.awt.datatransfer.ClipboardOwner
public java.lang.Object read()
throws java.lang.Exception
read in interface IReadableDataSourcejava.lang.Exceptionpublic void setFlavorsOption(java.util.List flavors)
flavors - Flavors
public void write(java.lang.Object data)
throws java.lang.Exception
write in interface IWriteableDataSourcedata - Data
java.lang.Exceptionprotected void initializeSource()
initializeSource in class DataSource
private void addToClipboardContents(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
clipboard - Containing clipboardcontents - Clipboard contentsprivate java.util.Map getClipboardContentsOption()
private java.awt.datatransfer.Clipboard getClipboardOption()
private boolean removeFromClipboardContents(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
clipboard - Containing clipboardcontents - Clipboard contentsprivate void setClipboardContentsOption(java.util.Map contents)
contents - Clipboard contentsprivate void setClipboardOption(java.awt.datatransfer.Clipboard clipboard)
clipboard - Clipboard
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||