?? textfield.java
字號:
package ExampleViewer.form;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;
import ExampleViewer.data.IExampleContentProvider;
public class TextField extends Field {
/**
* @param control
* @param id
*/
public TextField(Control control, int id) {
super(control, id);
}
/* (non-Javadoc)
* @see com.ibm.eworkplaces.pim.ui.docedit.form.IField#getData()
*/
public void readFromContent(IExampleContentProvider content) {
String newText = (String )content.getElement(getId());
if (newText != null)
((Text )_control).setText(newText);
}
/* (non-Javadoc)
* @see com.ibm.eworkplaces.pim.ui.docedit.form.IField#setData(java.lang.Object)
*/
public void writeToContent(IExampleContentProvider content) {
String newText = ((Text )_control).getText();
content.setElement(getId(), newText);
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -