KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nightlabs > editor2d > properties > CheckboxPropertyDescriptor


1 /**
2  * <p> Project: com.nightlabs.editor2d </p>
3  * <p> Copyright: Copyright (c) 2004 </p>
4  * <p> Company: NightLabs GmbH (Germany) </p>
5  * <p> Creation Date: 26.10.2004 </p>
6  * <p> Author: Daniel Mazurek </p>
7 **/

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     /**
19      * @param id
20      * @param displayName
21      */

22     public CheckboxPropertyDescriptor(Object JavaDoc id, String JavaDoc displayName)
23     {
24         super(id, displayName);
25         setValidator(new BooleanValidator());
26     }
27
28     /*
29      * @see org.eclipse.ui.views.properties.IPropertyDescriptor#createPropertyEditor(org.eclipse.swt.widgets.Composite)
30      */

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