01: /*******************************************************************************
02: * Copyright (c) 2003, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.dialogs;
11:
12: import org.eclipse.jface.resource.JFaceColors;
13: import org.eclipse.swt.SWT;
14: import org.eclipse.swt.widgets.Composite;
15: import org.eclipse.swt.widgets.Control;
16: import org.eclipse.swt.widgets.Text;
17: import org.eclipse.ui.internal.WorkbenchMessages;
18:
19: /**
20: * A page that is used to indicate an error in loading a page within the
21: * workbench.
22: *
23: * @since 3.0
24: */
25: public class ErrorPreferencePage extends EmptyPreferencePage {
26:
27: /*
28: * (non-Javadoc)
29: *
30: * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
31: */
32: protected Control createContents(Composite parent) {
33: Text text = new Text(parent, SWT.MULTI | SWT.READ_ONLY
34: | SWT.WRAP);
35: text.setForeground(JFaceColors.getErrorText(text.getDisplay()));
36: text.setBackground(text.getDisplay().getSystemColor(
37: SWT.COLOR_WIDGET_BACKGROUND));
38: text
39: .setText(WorkbenchMessages.ErrorPreferencePage_errorMessage);
40: return text;
41: }
42: }
|