ides.api.plugin.presentation
Interface CopyPastePresentation

All Superinterfaces:
Presentation

public interface CopyPastePresentation
extends Presentation

An interface for Presentations that implement cut, copy and paste. CopyPastePresentations should notify the CopyPasteManager of any changes in the cut, copy or paste status using Hub.getCopyPasteManager().refresh()

Only one CopyPastePresentation can be active at a time. It is this active presentation that the CopyPasteManager queries at any given time for enabled status and appropriate actions. The CopyPasteManager tracks the switching between presentations.

Author:
Valerie Sugarman

Method Summary
 javax.swing.Action getCopyAction()
          Gives the appropriate action for copy.
 javax.swing.Action getCutAction()
          Gives the appropriate action for cut.
 javax.swing.Action getPasteAction()
          Gives the appropriate action for paste.
 boolean isCutCopyEnabled()
          Determine whether cut and copy should currently be available to the user.
 boolean isPasteEnabled()
          Determine whether paste should currently be available to the user, depending on the state of the presentation and on the type of data on the clipboard.
 void newItemOnClipboard()
          Notification that a new item is on the clipboard.
 
Methods inherited from interface ides.api.plugin.presentation.Presentation
forceRepaint, getGUI, getModel, getName, release, setTrackModel
 

Method Detail

isCutCopyEnabled

boolean isCutCopyEnabled()
Determine whether cut and copy should currently be available to the user. This method is queried when the CopyPasteManager is refreshed.

Returns:
true if cut and copy should be available to the user, false otherwise.

isPasteEnabled

boolean isPasteEnabled()
Determine whether paste should currently be available to the user, depending on the state of the presentation and on the type of data on the clipboard. If the type of data on the clipboard cannot be accepted then return false. This method is queried when the CopyPasteManager is refreshed.

Returns:
true if paste should be available to the user, false otherwise.

getCutAction

javax.swing.Action getCutAction()
Gives the appropriate action for cut.

Returns:
The appropriate action for cut.

getCopyAction

javax.swing.Action getCopyAction()
Gives the appropriate action for copy.

Returns:
The appropriate action for copy.

getPasteAction

javax.swing.Action getPasteAction()
Gives the appropriate action for paste.

Returns:
The appropriate action for paste.

newItemOnClipboard

void newItemOnClipboard()
Notification that a new item is on the clipboard. This method is ONLY called when this CopyPastePresentation is the active presentation in the CopyPasteManager.