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

📄 icombopropertyeditor.java

📁 SWT_designer安装软件
💻 JAVA
字号:
package com.swtdesigner.api.swt.property.editor;

/**
 * Property editor that uses combo box as property editor control.
 * Events flow on property editor activation is following:
 * <ol>
 * <li>Designer calls setValue(value)
 * <li>Designer calls getText().
 * <li>Designer calls getItems().
 * <li>Designer creates combo box and fills it with text and items.
 * <li>User selects some item in combo box.
 * <li>Designer calls setSelection(index, text).
 * <li>Designer calls getValue() to access new value.
 * </ol>
 * 
 * @author scheglov_ke
 */
public interface IComboPropertyEditor extends IPropertyEditor {
	/**
	 * Returns text to show in combo box.
	 */
	String getText();
	/**
	 * Returns array of items to show in combo box.
	 */
	String[] getItems();
	/**
	 * When user changes selection in combo box, Designer will notify editor about this.
	 * You can use index or text to handle selection. If user removes value of property,
	 * for example presses DEL, index is -1 and text is <code>null</code>.
	 * 
	 * 
	 * @param index the index of selected item
	 * @param text the text of selected item
	 */
	void setSelection(int index, String text);
}

⌨️ 快捷键说明

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