KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > progress > IAnimationProcessor


1 /*******************************************************************************
2  * Copyright (c) 2004, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.internal.progress;
12
13 import org.eclipse.core.runtime.jobs.Job;
14
15 /**
16  * The IAnimationProcessor is the class that handles the animation of
17  * the animation item.
18  */

19 interface IAnimationProcessor {
20
21     /**
22      * Add an item to the list of the items we are updating.
23      * @param item
24      */

25     void addItem(AnimationItem item);
26
27     /**
28      * Remove an item from the list of the items we are updating.
29      * @param item
30      */

31     void removeItem(AnimationItem item);
32
33     /**
34      * Return whether or not the receiver has any items.
35      * @return
36      */

37     boolean hasItems();
38
39     /**
40      * Animation has begun. Inform any listeners. This is called
41      * from the UI Thread.
42      */

43     void animationStarted();
44
45     /**
46      * Animation has finished. Inform any listeners. This is called
47      * from the UI Thread.
48      */

49     void animationFinished();
50
51     /**
52      * Get the preferred width of the types of items this
53      * processor manages.
54      * @return
55      */

56     int getPreferredWidth();
57
58     /**
59      * Return whether or not this is a job used by the processor.
60      * @param job
61      * @return
62      */

63     boolean isProcessorJob(Job job);
64
65 }
66
Popular Tags