KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > preferences > BooleanFieldEditor2


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.debug.internal.ui.preferences;
12
13  
14 import org.eclipse.jface.preference.BooleanFieldEditor;
15 import org.eclipse.swt.widgets.Button;
16 import org.eclipse.swt.widgets.Composite;
17
18 /**
19  * A boolean field editor that provides access to this editors boolean
20  * button.
21  */

22 public class BooleanFieldEditor2 extends BooleanFieldEditor {
23     
24     private Button fChangeControl;
25
26     /**
27      * @see BooleanFieldEditor#BooleanFieldEditor(java.lang.String, java.lang.String, int, org.eclipse.swt.widgets.Composite)
28      */

29     public BooleanFieldEditor2(
30         String JavaDoc name,
31         String JavaDoc labelText,
32         int style,
33         Composite parent) {
34         super(name, labelText, style, parent);
35     }
36
37     /**
38      * @see org.eclipse.jface.preference.BooleanFieldEditor#getChangeControl(Composite)
39      */

40     public Button getChangeControl(Composite parent) {
41         if (fChangeControl == null) {
42             fChangeControl = super.getChangeControl(parent);
43         }
44         return fChangeControl;
45     }
46
47
48 }
49
50
Popular Tags