KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > texteditor > spelling > EmptySpellingPreferenceBlock


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.ui.internal.texteditor.spelling;
12
13 import org.eclipse.swt.SWT;
14 import org.eclipse.swt.layout.GridData;
15 import org.eclipse.swt.layout.GridLayout;
16 import org.eclipse.swt.widgets.Composite;
17 import org.eclipse.swt.widgets.Control;
18 import org.eclipse.swt.widgets.Label;
19
20 import org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock;
21 import org.eclipse.ui.texteditor.spelling.IPreferenceStatusMonitor;
22
23
24 /**
25  * Empty preference block for extensions to the
26  * <code>org.eclipse.ui.workbench.texteditor.spellingEngine</code> extension
27  * point that do not specify their own.
28  *
29  * @since 3.1
30  */

31 public class EmptySpellingPreferenceBlock implements ISpellingPreferenceBlock {
32
33     /*
34      * @see org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock#createControl(org.eclipse.swt.widgets.Composite)
35      */

36     public Control createControl(Composite composite) {
37         Composite inner= new Composite(composite, SWT.NONE);
38         inner.setLayout(new GridLayout(3, false));
39
40         Label label= new Label(inner, SWT.CENTER);
41         GridData gd= new GridData(GridData.FILL_BOTH);
42         gd.widthHint= 30;
43         label.setLayoutData(gd);
44
45         label= new Label(inner, SWT.CENTER);
46         label.setText(SpellingMessages.EmptySpellingPreferenceBlock_emptyCaption);
47         gd= new GridData(GridData.CENTER);
48         label.setLayoutData(gd);
49
50         label= new Label(inner, SWT.CENTER);
51         gd= new GridData(GridData.FILL_BOTH);
52         gd.widthHint= 30;
53         label.setLayoutData(gd);
54
55         return inner;
56     }
57
58     /*
59      * @see org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock#initialize(org.eclipse.ui.texteditor.spelling.IPreferenceStatusMonitor)
60      */

61     public void initialize(IPreferenceStatusMonitor statusMonitor) {
62     }
63
64     /*
65      * @see org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock#canPerformOk()
66      */

67     public boolean canPerformOk() {
68         return true;
69     }
70
71     /*
72      * @see org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock#performOk()
73      */

74     public void performOk() {
75     }
76
77     /*
78      * @see org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock#performDefaults()
79      */

80     public void performDefaults() {
81     }
82
83     /*
84      * @see org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock#performRevert()
85      */

86     public void performRevert() {
87     }
88
89     /*
90      * @see org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock#dispose()
91      */

92     public void dispose() {
93     }
94
95     /*
96      * @see org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock#setEnabled(boolean)
97      */

98     public void setEnabled(boolean enabled) {
99     }
100 }
101
Popular Tags