📄 icombopropertyeditor.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 + -