View Javadoc
1   /*
2    * Copyright (C) 2007-2012 Argeo GmbH
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *         http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.argeo.slc.e4;
17  
18  
19  import org.eclipse.jface.resource.ImageDescriptor;
20  import org.eclipse.swt.graphics.Image;
21  
22  /** Shared images. */
23  public class SlcImages {
24  	public final static Image AGENT = img("icons/agent.gif");
25  	public final static Image AGENT_FACTORY = img("icons/agentFactory.gif");
26  	public final static Image MODULE = img("icons/module.png");
27  	public final static Image MODULE_STOPPED = img("icons/module_stopped.gif");
28  	public final static Image FOLDER = img("icons/folder.gif");
29  	public final static Image MY_RESULTS_FOLDER = img("icons/myResult.png");
30  	public final static Image RENAME = img("icons/rename.png");
31  	public final static Image FLOW = img("icons/flow.png");
32  	public final static Image PROCESSES = img("icons/processes.gif");
33  	public final static Image PASSED = img("icons/passed.gif");
34  	public final static Image ERROR = img("icons/error.gif");
35  	public final static Image LAUNCH = img("icons/launch.gif");
36  	public final static Image RELAUNCH = img("icons/relaunch.gif");
37  	public final static Image KILL = img("icons/kill.png");
38  	public final static Image REMOVE_ONE = img("icons/remove_one.gif");
39  	public final static Image REMOVE_ALL = img("icons/removeAll.png");
40  	public final static Image EXECUTION_SPECS = img("icons/executionSpecs.gif");
41  	public final static Image EXECUTION_SPEC = img("icons/executionSpec.gif");
42  	public final static Image EXECUTION_SPEC_ATTRIBUTE = img("icons/executionSpecAttribute.gif");
43  	public final static Image CHOICES = img("icons/choices.gif");
44  	public final static Image PROCESS_ERROR = img("icons/process_error.png");
45  	public final static Image PROCESS_SCHEDULED = img("icons/process_scheduled.gif");
46  	public final static Image PROCESS_RUNNING = img("icons/process_running.png");
47  	public final static Image PROCESS_COMPLETED = img("icons/process_completed.png");
48  
49  	// Decorators
50  	public final static ImageDescriptor EXECUTION_ERROR = getImageDescriptor("icons/executionError.gif");
51  	public final static ImageDescriptor EXECUTION_PASSED = getImageDescriptor("icons/executionPassed.gif");
52  
53  	/** Creates the image */
54  	public static Image img(String path) {
55  		return getImageDescriptor(path).createImage();
56  	}
57  
58  	public static ImageDescriptor getImageDescriptor(String path) {
59  		return imageDescriptorFromPlugin("", path);
60  	}
61  	
62      public static ImageDescriptor imageDescriptorFromPlugin(String pluginId,
63              String imageFilePath) {
64      	return null;
65      }
66  
67  }