01: /*******************************************************************************
02: * Copyright (c) 2004, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.progress;
11:
12: import org.eclipse.core.runtime.jobs.Job;
13:
14: /**
15: * The IAnimationProcessor is the class that handles the animation of
16: * the animation item.
17: */
18: interface IAnimationProcessor {
19:
20: /**
21: * Add an item to the list of the items we are updating.
22: * @param item
23: */
24: void addItem(AnimationItem item);
25:
26: /**
27: * Remove an item from the list of the items we are updating.
28: * @param item
29: */
30: void removeItem(AnimationItem item);
31:
32: /**
33: * Return whether or not the receiver has any items.
34: * @return
35: */
36: boolean hasItems();
37:
38: /**
39: * Animation has begun. Inform any listeners. This is called
40: * from the UI Thread.
41: */
42: void animationStarted();
43:
44: /**
45: * Animation has finished. Inform any listeners. This is called
46: * from the UI Thread.
47: */
48: void animationFinished();
49:
50: /**
51: * Get the preferred width of the types of items this
52: * processor manages.
53: * @return
54: */
55: int getPreferredWidth();
56:
57: /**
58: * Return whether or not this is a job used by the processor.
59: * @param job
60: * @return
61: */
62: boolean isProcessorJob(Job job);
63:
64: }
|