⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ilabeldecorator.java

📁 jfa2ce 源码帮助开发人员更好的理解运用
💻 JAVA
字号:
/******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: *     IBM Corporation - initial API and implementation *******************************************************************************/package org.eclipse.jface.viewers;import org.eclipse.swt.graphics.Image;/** * A label decorator decorates the label text and image for some element. * The original label text and image are obtained by some other means, * for example by a label provider. * * @see ILabelProvider */public interface ILabelDecorator extends IBaseLabelProvider {    /**     * Returns an image that is based on the given image,     * but decorated with additional information relating to the state     * of the provided element.     *      * Text and image decoration updates can occur as a result of other updates     * within the workbench including deferred decoration by background processes.     * Clients should handle labelProviderChangedEvents for the given element to get     * the complete decoration.     * @see LabelProviderChangedEvent     * @see IBaseLabelProvider#addListener     *     * @param image the input image to decorate, or <code>null</code> if the element has no image     * @param element the element whose image is being decorated     * @return the decorated image, or <code>null</code> if no decoration is to be applied     *     * @see org.eclipse.jface.resource.CompositeImageDescriptor     */    public Image decorateImage(Image image, Object element);    /**     * Returns a text label that is based on the given text label,     * but decorated with additional information relating to the state     * of the provided element.     *      * Text and image decoration updates can occur as a result of other updates     * within the workbench including deferred decoration by background processes.     * Clients should handle labelProviderChangedEvents for the given element to get     * the complete decoration.     * @see LabelProviderChangedEvent     * @see IBaseLabelProvider#addListener     *     * @param text the input text label to decorate     * @param element the element whose image is being decorated     * @return the decorated text label, or <code>null</code> if no decoration is to be applied     */    public String decorateText(String text, Object element);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -