field.java

来自「利用 java SWT 实现MVC功能」· Java 代码 · 共 60 行

JAVA
60
字号
package ExampleViewer.form;

import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Listener;

public abstract class Field implements IField {
	protected Control	_control;
	protected Control[] _controls;
	protected int		_id;
//	 acw
	protected Listener	_listener;

	public Field(Control control, int id) {
		_control = control;
		_id = id;
	}
	
	public Field(Control[] controls, int id) {
		_controls = controls;
		_id = id;
	}


	/* (non-Javadoc)
	 * @see com.ibm.eworkplaces.pim.ui.docedit.form.IField#getControl()
	 */
	public Control getControl() {
		return _control;
	}
	
	/*
	 * (non-Javadoc)
	 * @see com.ibm.eworkplaces.pim.ui.docedit.form.IField#getControl()
	 */
	public Control[] getControls() {
		return _controls;
	}

	/* (non-Javadoc)
	 * @see com.ibm.eworkplaces.pim.ui.docedit.form.IField#getId()
	 */
	public int getId() {
		return _id;
	}
	
	//	Temporary 
	protected boolean setToNowIfNull(Control control) {

		return false;
	}
	
	
	public void setListener(Listener l) {
		_listener = l;
	}
	public Listener getListener() {
		return _listener;
	}
}

⌨️ 快捷键说明

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