ipaintpropertyeditor.java

来自「SWT_designer安装软件」· Java 代码 · 共 31 行

JAVA
31
字号
package com.swtdesigner.api.swt.property.editor;

import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Rectangle;

/**
 * Property editor that paints property value itself.
 * 
 * @author scheglov_ke
 */
public interface IPaintPropertyEditor extends IPropertyEditor {
	/**
	 * Designer calls this method to paint value of property in property table.
	 * 
	 * @param gc the graphics context
	 * @param bounds the bounds in which editor should paint
	 * @param focused that flag that tells if property is selected in table, you can for example use different backgound to show this.
	 */
	void paint(GC gc, Rectangle bounds, boolean focused);
	/**
	 * Returns image that should be displayed on button.
	 */
	Image getButtonImage();
	/**
	 * Designer calls this method when user clicks on button.
	 * You can show here dialog using Shell returned by property editor site.
	 */
	boolean onButtonClick();
}

⌨️ 快捷键说明

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