home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
VCAFE.3.0A
/
Main.bin
/
VisualCafeClipboard.java
< prev
next >
Wrap
Text File
|
1998-10-25
|
4KB
|
88 lines
/*
* Copyright 1998 Symantec Corporation, All Rights Reserved.
*/
package com.symantec.itools.vcafe.openapi.datatransfer;
import com.symantec.itools.vcafe.openapi.*;
import java.awt.datatransfer.*;
/**
* Implements the mechanism used to hold and transfer data via
* cut/copy/paste operations.
*
* <p>The implementation of this class forces the native clipboard to be up to date
* with the java clipboard, and is extended for support of <code>VisualObjects</code>.
*
* <p>When placing a <code>Transferable</code> onto the clipboard, if it doesn't extend from
* <code>StringSelection</code> a new <code>TransferableProxy</code> object is created that wraps
* the <code>Transferable</code>.
* This ensures that the System Clipboard contents reflect the transferable data,
* even if it doesn't actually understand the 'real' contents.
*
* <p>When <code>VisualObject[s]</code> are placed onto the clipboard, a <code>TransferableVisualObjects</code>
* is created that wraps the <code>VisualObject[s]</code>.
*
* @see TransferableVisualObjects
* @see TransferableProxy
* @see com.symantec.itools.vcafe.openapi.VisualCafe#getClipboard
*
* @author Symantec Internet Tools Division
* @version 1.0
* @since VCafe 3.0
*/
public abstract class VisualCafeClipboard extends Clipboard
{
/**
* Constructs the <code>VisualCafeClipboard</code>.
*/
public VisualCafeClipboard() {
super("Visual Cafe");
}
/**
* Determines if the contents of Visual Cafe's native clipboard can
* be pasted onto/into the given <code>VisualObject</code>.
* @param the given <code>VisualObject</code>.
* @return <code>false</code> if the clipboard doesn't contain <code>VisualObjects</code>, or the given
* <code>VisualObject</code> cannot accept the <code>VisualObjects</code> on the clipboard.
*/
public abstract boolean canPasteInto(VisualObject visualObject);
/**
* Determines if Visual Cafe's clipboard currently contains <code>VisualObjects</code>.
* @return <code>true</code> if the clipboard contains <code>VisualObjects</code>, <code>false</code> otherwise.
*/
public abstract boolean containsVisualObjects();
/**
* Copies the array of <code>VisualObjects</code> onto Visual Cafe's native clipboard.
* <p>This function is provided to simplify the common task of putting a set
* of <code>VisualObjects</code> onto the clipboard.
* @param visualObjects the array of <code>VisualObjects</code> to copy onto the native clipboard.
* @param textValue the value to provide for the <code>StringSelection</code> flavors of the
* <code>TransferableVisualObjects</code> that is created.
* @see TransferableVisualObjects
*/
public abstract void setContents(VisualObject[] visualObjects, String textValue);
/**
* Copies the <code>VisualObject</code> onto Visual Cafe's native clipboard.
* This function is provided to simplify the common task of putting a
* <code>VisualObject</code> onto the clipboard.
* @param visualObject the <code>VisualObject</code> to copy onto the native clipboard.
* @param textValue the value to provide for the <code>StringSelection</code> flavors of the
* <code>TransferableVisualObjects</code> that is created.
* @see TransferableVisualObjects
*/
public abstract void setContents(VisualObject visualObject, String textValue);
/**
* Gets the <code>VisualObjects</code> on Visual Cafe's native clipboard.
* If the clipboard doesn't contain <code>VisualObjects</code>, <code>null</code> is returned.
* @return the clipboard's <code>VisualObjects</code>, or <code>null</code> if none.
*/
public abstract VisualObject[] getContents();
}