public class PosInSequentTransferable extends Object implements Transferable
Transferable interface and
allows to transfer a PosInSequent object.
It supports to data flavors:
POS_IN_SEQUENT_TRANSFER flavor which is
of mime type DataFlavor.javaJVMLocalObjectMimeTypeDataFlavor.stringFlavor which returns the term described
by the PosInSequent as a parsable string | Modifier and Type | Field and Description |
|---|---|
private PosInSequent |
pis
the highlighted position in the sequentview to be transferred
|
static DataFlavor |
POS_IN_SEQUENT_TRANSFER |
private String |
stringSelection
the highlighted term as parseable string
|
| Constructor and Description |
|---|
PosInSequentTransferable(PosInSequent pis,
Services serv)
creates an instance of this transferable
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getTransferData(DataFlavor flavor)
if the flavor is equal to the
POS_IN_SEQUENT_TRANSFER the return data
is of kind PosInSequent. |
DataFlavor[] |
getTransferDataFlavors()
returns the supported flavors of this transferable.
|
boolean |
isDataFlavorSupported(DataFlavor flavor) |
public static DataFlavor POS_IN_SEQUENT_TRANSFER
private PosInSequent pis
private String stringSelection
public PosInSequentTransferable(PosInSequent pis, Services serv)
pis - the PosInSequent to be transfered
(string flavor only supported if pis denotes a term or formula, not the
complete sequent)public DataFlavor[] getTransferDataFlavors()
DataFlavor.stringFlavor and
POS_IN_SEQUENT_TRANSFERgetTransferDataFlavors in interface TransferableTransferable.getTransferDataFlavors()public boolean isDataFlavorSupported(DataFlavor flavor)
isDataFlavorSupported in interface Transferablepublic Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
POS_IN_SEQUENT_TRANSFER the return data
is of kind PosInSequent. If the flavor equals
DataFlavor.stringFlavor the highlighted term is returned as
parsable string.getTransferData in interface TransferableUnsupportedFlavorException - if the flavor is not supportedIOException