1 8 package com.nightlabs.editor2d.properties; 9 10 import org.eclipse.jface.viewers.CellEditor; 11 import org.eclipse.swt.widgets.Composite; 12 import org.eclipse.ui.views.properties.PropertyDescriptor; 13 14 15 public class CheckboxPropertyDescriptor 16 extends PropertyDescriptor 17 { 18 22 public CheckboxPropertyDescriptor(Object id, String displayName) 23 { 24 super(id, displayName); 25 setValidator(new BooleanValidator()); 26 } 27 28 31 public CellEditor createPropertyEditor(Composite parent) 32 { 33 CellEditor editor = new CheckboxCellEditor(parent); 34 if (getValidator() != null) 35 editor.setValidator(getValidator()); 36 return editor; 37 } 38 39 } 40 41 | Popular Tags |