Interface TerpClipboardInterface


public interface TerpClipboardInterface

This class is the clipboard interface for Terp Paint. It interacts with all other TerpOffice products. There is no visible state of this class. It should work with all operating systems and hardware. There are no variances and no security constraints. Since this is a clipboard, there are lots of external specifications: You can test which TerpOffice application the copy came from by specifying where it was copiedFrom(). Examples include: if( copiedFrom() == TerpClipboardInterface.CALC ) if( copiedFrom() == TerpClipboardInterface.SPREADSHEET ) and others.


Field Summary
static int CALC
          This field models the Terp Calc application which is static at 5.
static int INTEGRATOR
          This field models the Terp Manager application which is static at 6.
static int NOTEPAD
          This field models the Terp Pad application which is static at 2.
static int OOD
          This field models the Terp Present application which is static at 3.
static int PAINT
          This field models the Terp Paint application which is static at 4.
static int SPREADSHEET
          This field models the Terp SpreadSheet application which is static at 1.
 
Method Summary
 int copiedFrom()
          This function returns an integer which tells the program which TerpOffice application the copy came from.
 java.awt.image.BufferedImage getImage()
          This BufferedImage is used to get an image from the clipboard.
 java.lang.String getString()
          This string is used to get a string from whichever application.
 

Field Detail

SPREADSHEET

static final int SPREADSHEET
This field models the Terp SpreadSheet application which is static at 1.

See Also:
Constant Field Values

NOTEPAD

static final int NOTEPAD
This field models the Terp Pad application which is static at 2.

See Also:
Constant Field Values

OOD

static final int OOD
This field models the Terp Present application which is static at 3.

See Also:
Constant Field Values

PAINT

static final int PAINT
This field models the Terp Paint application which is static at 4.

See Also:
Constant Field Values

CALC

static final int CALC
This field models the Terp Calc application which is static at 5.

See Also:
Constant Field Values

INTEGRATOR

static final int INTEGRATOR
This field models the Terp Manager application which is static at 6.

See Also:
Constant Field Values
Method Detail

getString

java.lang.String getString()
This string is used to get a string from whichever application. Valid applications include Terp SpreadSheet, Terp Pad, Terp Calc, and perhaps Terp Manager.

Returns:
String which is on the clipboard.

getImage

java.awt.image.BufferedImage getImage()
This BufferedImage is used to get an image from the clipboard. Valid for Terp Paint and Terp Present applications.

Returns:
BufferedImage from the clipboard.

copiedFrom

int copiedFrom()
This function returns an integer which tells the program which TerpOffice application the copy came from. Usage: if( copiedFrom() == TerpClipboardInterface.SPREADSHEET ) if( copiedFrom() == TerpClipboardInterface.NOTEPAD ) if( copiedFrom() == TerpClipboardInterface.OOD ) if( copiedFrom() == TerpClipboardInterface.PAINT ) if( copiedFrom() == TerpClipboardInterface.CALC ) if( copiedFrom() == TerpClipboardInterface.INTEGRATOR )

Returns:
Returns an integer of one of the static constants of terp applications. Spreadsheet = 1, Notepad = 2, Object-Oriented Drawing = 3, Paint = 4, Calculator = 5, and Integrator = 6.