Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.virtuosotechnologies.asaph.modelutils
Interface DataTransferUtils  view DataTransferUtils download DataTransferUtils.java

All Known Implementing Classes:
DataTransferUtilsImpl

public interface DataTransferUtils

API that includes data transfer tools for songs and parts of songs


Field Summary
static java.lang.String API_NAME
          The name of this API.
static java.awt.datatransfer.DataFlavor BLOCKLIST_FLAVOR
          DataFlavor for a list of blocks
static java.awt.datatransfer.DataFlavor LINEFRAGMENT_FLAVOR
          DataFlavor for a part of a line
static java.awt.datatransfer.DataFlavor LINELIST_FLAVOR
          DataFlavor for a list of lines
 
Method Summary
 java.awt.datatransfer.Transferable createBlockListTransferable(com.virtuosotechnologies.asaph.model.Song song, java.util.Collection blocks, com.virtuosotechnologies.asaph.model.ChordSet currentSet, com.virtuosotechnologies.asaph.model.Variation variation, boolean remove, javax.swing.event.UndoableEditListener undoListener)
          Create a Transferable for an ordered collection of blocks in a song
 java.awt.datatransfer.Transferable createLineFragmentTransferable(com.virtuosotechnologies.asaph.model.SongLine line, com.virtuosotechnologies.asaph.model.StringSongLineMember startMember, int startPos, com.virtuosotechnologies.asaph.model.StringSongLineMember endMember, int endPos, com.virtuosotechnologies.asaph.model.ChordSet currentSet, boolean remove, javax.swing.event.UndoableEditListener undoListener)
          Create a Transferable for a fragment of a line
 java.awt.datatransfer.Transferable createLineListTransferable(com.virtuosotechnologies.asaph.model.Song song, java.util.Collection lines, com.virtuosotechnologies.asaph.model.ChordSet currentSet, boolean remove, javax.swing.event.UndoableEditListener undoListener)
          Create a Transferable for an ordered collection of lines in a song
 java.awt.datatransfer.Transferable createTransferableForString(java.lang.String str)
          Create a Transferable given a string.
 java.awt.datatransfer.Transferable getClipboardContents()
          Get the current system clipboard contents.
 java.awt.datatransfer.DataFlavor getFlavorOf(java.awt.datatransfer.Transferable transferable, java.awt.datatransfer.DataFlavor preferred)
          Get the flavor of the given transferable.
 java.awt.datatransfer.DataFlavor getPasteType(java.awt.datatransfer.Transferable transferable, java.awt.datatransfer.DataFlavor pasteContext)
          Get the type of object that would be pasted given a transferable and a context.
 void pasteTransferable(java.awt.datatransfer.Transferable transferable, com.virtuosotechnologies.asaph.model.SongLine line, com.virtuosotechnologies.asaph.model.StringSongLineMember member, int pos, com.virtuosotechnologies.asaph.model.ChordSet chordSet, com.virtuosotechnologies.asaph.model.Variation variation, javax.swing.event.UndoableEditListener undoListener)
          Paste the given transferable in the given position.
 void pasteTransferable(java.awt.datatransfer.Transferable transferable, com.virtuosotechnologies.asaph.model.SongLine line, com.virtuosotechnologies.asaph.model.StringSongLineMember startMember, int startPos, com.virtuosotechnologies.asaph.model.StringSongLineMember endMember, int endPos, com.virtuosotechnologies.asaph.model.ChordSet chordSet, com.virtuosotechnologies.asaph.model.Variation variation, javax.swing.event.UndoableEditListener undoListener)
          Paste the given transferable, replacing the given range.
 void pasteTransferableAfter(java.awt.datatransfer.Transferable transferable, com.virtuosotechnologies.asaph.model.SongBlock block, com.virtuosotechnologies.asaph.model.SongLine line, com.virtuosotechnologies.asaph.model.ChordSet chordSet, com.virtuosotechnologies.asaph.model.Variation variation, javax.swing.event.UndoableEditListener undoListener)
          Paste the given transferable after the given line.
 void pasteTransferableAfter(java.awt.datatransfer.Transferable transferable, com.virtuosotechnologies.asaph.model.Song song, com.virtuosotechnologies.asaph.model.SongBlock block, com.virtuosotechnologies.asaph.model.ChordSet chordSet, com.virtuosotechnologies.asaph.model.Variation variation, javax.swing.event.UndoableEditListener undoListener)
          Paste the given transferable after the given block.
 void setClipboardContents(java.awt.datatransfer.Transferable transfer)
          Set the current system clipboard contents.
 

Field Detail

API_NAME

public static final java.lang.String API_NAME
The name of this API.

See Also:
Constant Field Values

BLOCKLIST_FLAVOR

public static final java.awt.datatransfer.DataFlavor BLOCKLIST_FLAVOR
DataFlavor for a list of blocks


LINELIST_FLAVOR

public static final java.awt.datatransfer.DataFlavor LINELIST_FLAVOR
DataFlavor for a list of lines


LINEFRAGMENT_FLAVOR

public static final java.awt.datatransfer.DataFlavor LINEFRAGMENT_FLAVOR
DataFlavor for a part of a line

Method Detail

setClipboardContents

public void setClipboardContents(java.awt.datatransfer.Transferable transfer)
Set the current system clipboard contents.


getClipboardContents

public java.awt.datatransfer.Transferable getClipboardContents()
Get the current system clipboard contents. If the last call to setClipboardContents was given a Transferable obtained by one of the methods of this API (i.e. it is a TransferableImpl), and the clipboard contents haven't changed, then this will return a TransferableImpl.


createLineFragmentTransferable

public java.awt.datatransfer.Transferable createLineFragmentTransferable(com.virtuosotechnologies.asaph.model.SongLine line,
                                                                         com.virtuosotechnologies.asaph.model.StringSongLineMember startMember,
                                                                         int startPos,
                                                                         com.virtuosotechnologies.asaph.model.StringSongLineMember endMember,
                                                                         int endPos,
                                                                         com.virtuosotechnologies.asaph.model.ChordSet currentSet,
                                                                         boolean remove,
                                                                         javax.swing.event.UndoableEditListener undoListener)
Create a Transferable for a fragment of a line


createLineListTransferable

public java.awt.datatransfer.Transferable createLineListTransferable(com.virtuosotechnologies.asaph.model.Song song,
                                                                     java.util.Collection lines,
                                                                     com.virtuosotechnologies.asaph.model.ChordSet currentSet,
                                                                     boolean remove,
                                                                     javax.swing.event.UndoableEditListener undoListener)
Create a Transferable for an ordered collection of lines in a song


createBlockListTransferable

public java.awt.datatransfer.Transferable createBlockListTransferable(com.virtuosotechnologies.asaph.model.Song song,
                                                                      java.util.Collection blocks,
                                                                      com.virtuosotechnologies.asaph.model.ChordSet currentSet,
                                                                      com.virtuosotechnologies.asaph.model.Variation variation,
                                                                      boolean remove,
                                                                      javax.swing.event.UndoableEditListener undoListener)
Create a Transferable for an ordered collection of blocks in a song


createTransferableForString

public java.awt.datatransfer.Transferable createTransferableForString(java.lang.String str)
Create a Transferable given a string. Interprets the string into lines, and generates either LINFRAGMENT_FLAVOR or LINELIST_FLAVOR.


getFlavorOf

public java.awt.datatransfer.DataFlavor getFlavorOf(java.awt.datatransfer.Transferable transferable,
                                                    java.awt.datatransfer.DataFlavor preferred)
Get the flavor of the given transferable. If the given preferred flavor is available in the transferable, returns that flavor, otherwise, returns the "best" flavor out of LINFRAGMENT_FLAVOR, LINELIST_FLAVOR, BLOCKLIST_FLAVOR and stringFlavor. Returns null if none of those flavors is available.


getPasteType

public java.awt.datatransfer.DataFlavor getPasteType(java.awt.datatransfer.Transferable transferable,
                                                     java.awt.datatransfer.DataFlavor pasteContext)
                                              throws CannotPasteException
Get the type of object that would be pasted given a transferable and a context.


pasteTransferable

public void pasteTransferable(java.awt.datatransfer.Transferable transferable,
                              com.virtuosotechnologies.asaph.model.SongLine line,
                              com.virtuosotechnologies.asaph.model.StringSongLineMember member,
                              int pos,
                              com.virtuosotechnologies.asaph.model.ChordSet chordSet,
                              com.virtuosotechnologies.asaph.model.Variation variation,
                              javax.swing.event.UndoableEditListener undoListener)
                       throws CannotPasteException
Paste the given transferable in the given position.


pasteTransferable

public void pasteTransferable(java.awt.datatransfer.Transferable transferable,
                              com.virtuosotechnologies.asaph.model.SongLine line,
                              com.virtuosotechnologies.asaph.model.StringSongLineMember startMember,
                              int startPos,
                              com.virtuosotechnologies.asaph.model.StringSongLineMember endMember,
                              int endPos,
                              com.virtuosotechnologies.asaph.model.ChordSet chordSet,
                              com.virtuosotechnologies.asaph.model.Variation variation,
                              javax.swing.event.UndoableEditListener undoListener)
                       throws CannotPasteException
Paste the given transferable, replacing the given range.


pasteTransferableAfter

public void pasteTransferableAfter(java.awt.datatransfer.Transferable transferable,
                                   com.virtuosotechnologies.asaph.model.SongBlock block,
                                   com.virtuosotechnologies.asaph.model.SongLine line,
                                   com.virtuosotechnologies.asaph.model.ChordSet chordSet,
                                   com.virtuosotechnologies.asaph.model.Variation variation,
                                   javax.swing.event.UndoableEditListener undoListener)
                            throws CannotPasteException
Paste the given transferable after the given line.


pasteTransferableAfter

public void pasteTransferableAfter(java.awt.datatransfer.Transferable transferable,
                                   com.virtuosotechnologies.asaph.model.Song song,
                                   com.virtuosotechnologies.asaph.model.SongBlock block,
                                   com.virtuosotechnologies.asaph.model.ChordSet chordSet,
                                   com.virtuosotechnologies.asaph.model.Variation variation,
                                   javax.swing.event.UndoableEditListener undoListener)
                            throws CannotPasteException
Paste the given transferable after the given block.