|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gmf.runtime.emf.clipboard.core.ClipboardOperation
public abstract class ClipboardOperation
Abstract specification of a copy or paste operation. Maintains a progress monitor, support utility, and provides some reusable features.
Note that this class is not intended to be extended by clients. Clients may not instantiate it.
Field Summary | |
---|---|
static int |
TOTAL_WORK
The total amount of work accorded to a progress monitor. |
static int |
WORK_UNIT
The size of a single work unit in the progress monitor. |
Constructor Summary | |
---|---|
ClipboardOperation(IProgressMonitor monitor,
IClipboardSupport clipboardSupport)
Initializes me with my progress monitor and clipboard support. |
Method Summary | |
---|---|
protected void |
catchException(java.lang.String methodName,
java.lang.Exception ex)
Traces and logs a caught exception. |
IClipboardSupport |
getClipboardOperationHelper()
Obtains the clipboard support object that I rely on to make decisions about copy/paste semantics. |
IProgressMonitor |
getProgressMonitor()
Obtains my progress monitor. |
protected boolean |
isCancelled()
Queries whether I have been cancelled, by cancellation of my progress monitor. |
protected void |
throwCancelException(java.lang.String methodName)
Throws, traces, and logs a cancellation exception. |
protected void |
throwException(java.lang.String methodName,
java.lang.RuntimeException ex)
Traces and logs a thrown exception. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int WORK_UNIT
public static final int TOTAL_WORK
Constructor Detail |
---|
public ClipboardOperation(IProgressMonitor monitor, IClipboardSupport clipboardSupport)
monitor
- a progress monitor, or null
if
no progress tracking is neededclipboardSupport
- the clipboard support objectMethod Detail |
---|
public IProgressMonitor getProgressMonitor()
null
)protected boolean isCancelled()
public final IClipboardSupport getClipboardOperationHelper()
protected void catchException(java.lang.String methodName, java.lang.Exception ex)
methodName
- the method in which the exception was caughtex
- the exception that was caughtprotected void throwException(java.lang.String methodName, java.lang.RuntimeException ex)
methodName
- the method in which the exception was thrownex
- the exception that was thrown
java.lang.RuntimeException
- the ex
parameterprotected void throwCancelException(java.lang.String methodName)
methodName
- the method in which the exception was caught
OperationCanceledException
- always
|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.