1 /* 2 * Copyright (C) 2007 The Android Open Source Project 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 17 package com.android.ddmuilib; 18 19 import org.eclipse.jface.resource.ImageDescriptor; 20 import org.eclipse.swt.graphics.Image; 21 import org.eclipse.swt.widgets.Display; 22 23 /** 24 * Interface defining an image loader. jar app/lib and plugin have different packaging method 25 * so each implementation will be different. 26 * The implementation should implement at least one of the methods, and preferably both if possible. 27 * 28 */ 29 public interface IImageLoader { 30 31 /** 32 * Load an image from the resource from a filename 33 * @param filename 34 * @param display 35 */ loadImage(String filename, Display display)36 public Image loadImage(String filename, Display display); 37 38 /** 39 * Load an ImageDescriptor from the resource from a filename 40 * @param filename 41 * @param display 42 */ loadDescriptor(String filename, Display display)43 public ImageDescriptor loadDescriptor(String filename, Display display); 44 45 } 46