KickJava   Java API By Example, From Geeks To Geeks.

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


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: 14.03.2005 </p>
6  * <p> Author: Daniel Mazurek </p>
7 **/

8 package com.nightlabs.editor2d.properties;
9
10 import org.eclipse.jface.viewers.DialogCellEditor;
11 import org.eclipse.swt.widgets.Composite;
12 import org.eclipse.swt.widgets.Control;
13
14 public class LineStyleCellEditor
15 extends DialogCellEditor
16 {
17   public LineStyleCellEditor() {
18     super();
19   }
20
21   public LineStyleCellEditor(Composite parent) {
22     super(parent);
23   }
24
25   public LineStyleCellEditor(Composite parent, int style) {
26     super(parent, style);
27   }
28
29   protected Object JavaDoc openDialogBox(Control cellEditorWindow)
30   {
31     LineStyleDialog dialog = new LineStyleDialog(cellEditorWindow.getShell());
32     dialog.open();
33     Object JavaDoc[] result = dialog.getResult();
34     if (result != null)
35       return result[0];
36     
37     return new Integer JavaDoc(1);
38   }
39
40   protected void updateContents(Object JavaDoc value)
41   {
42     super.updateContents(value);
43   }
44   
45   
46 }
47
Popular Tags