numberpropertydescriptor.java

来自「mywork是rcp开发的很好的例子」· Java 代码 · 共 30 行

JAVA
30
字号
package net.sf.freenote.mindmap;

import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.views.properties.PropertyDescriptor;

/**
 * @author levin
 */
public class NumberPropertyDescriptor extends PropertyDescriptor{

	private Class subClass;
	
	public NumberPropertyDescriptor(Object id, String displayName) {
		super(id, displayName);
	}
	
	public NumberPropertyDescriptor(Object id, String displayName,Class subClass) {
		this(id, displayName);
		this.subClass=subClass;
	}

	@Override
	public CellEditor createPropertyEditor(Composite parent) {
		CellEditor cellEditor=new NumberCellEditor(parent,subClass);
		return cellEditor;
	}
	
}

⌨️ 快捷键说明

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