001: /*******************************************************************************
002: * Copyright (c) 2000, 2005 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: *******************************************************************************/package org.eclipse.ui.internal.texteditor.spelling;
011:
012: import org.eclipse.swt.SWT;
013: import org.eclipse.swt.layout.GridData;
014: import org.eclipse.swt.layout.GridLayout;
015: import org.eclipse.swt.widgets.Composite;
016: import org.eclipse.swt.widgets.Control;
017: import org.eclipse.swt.widgets.Label;
018:
019: import org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock;
020: import org.eclipse.ui.texteditor.spelling.IPreferenceStatusMonitor;
021:
022: /**
023: * Empty preference block for extensions to the
024: * <code>org.eclipse.ui.workbench.texteditor.spellingEngine</code> extension
025: * point that do not specify their own.
026: *
027: * @since 3.1
028: */
029: public class EmptySpellingPreferenceBlock implements
030: ISpellingPreferenceBlock {
031:
032: /*
033: * @see org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock#createControl(org.eclipse.swt.widgets.Composite)
034: */
035: public Control createControl(Composite composite) {
036: Composite inner = new Composite(composite, SWT.NONE);
037: inner.setLayout(new GridLayout(3, false));
038:
039: Label label = new Label(inner, SWT.CENTER);
040: GridData gd = new GridData(GridData.FILL_BOTH);
041: gd.widthHint = 30;
042: label.setLayoutData(gd);
043:
044: label = new Label(inner, SWT.CENTER);
045: label
046: .setText(SpellingMessages.EmptySpellingPreferenceBlock_emptyCaption);
047: gd = new GridData(GridData.CENTER);
048: label.setLayoutData(gd);
049:
050: label = new Label(inner, SWT.CENTER);
051: gd = new GridData(GridData.FILL_BOTH);
052: gd.widthHint = 30;
053: label.setLayoutData(gd);
054:
055: return inner;
056: }
057:
058: /*
059: * @see org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock#initialize(org.eclipse.ui.texteditor.spelling.IPreferenceStatusMonitor)
060: */
061: public void initialize(IPreferenceStatusMonitor statusMonitor) {
062: }
063:
064: /*
065: * @see org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock#canPerformOk()
066: */
067: public boolean canPerformOk() {
068: return true;
069: }
070:
071: /*
072: * @see org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock#performOk()
073: */
074: public void performOk() {
075: }
076:
077: /*
078: * @see org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock#performDefaults()
079: */
080: public void performDefaults() {
081: }
082:
083: /*
084: * @see org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock#performRevert()
085: */
086: public void performRevert() {
087: }
088:
089: /*
090: * @see org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock#dispose()
091: */
092: public void dispose() {
093: }
094:
095: /*
096: * @see org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock#setEnabled(boolean)
097: */
098: public void setEnabled(boolean enabled) {
099: }
100: }
|