KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ui > history > GenericHistoryViewDefaultPage


1 /*******************************************************************************
2  * Copyright (c) 2006 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
12 package org.eclipse.team.internal.ui.history;
13
14 import org.eclipse.jface.resource.JFaceColors;
15 import org.eclipse.swt.SWT;
16 import org.eclipse.swt.layout.FillLayout;
17 import org.eclipse.swt.widgets.Composite;
18 import org.eclipse.swt.widgets.Control;
19 import org.eclipse.team.ui.history.HistoryPage;
20
21 public class GenericHistoryViewDefaultPage extends HistoryPage {
22
23     private Composite pgComp;
24
25     public void createControl(Composite parent) {
26         pgComp = new Composite(parent, SWT.NULL);
27         pgComp.setLayout(new FillLayout());
28         pgComp.setBackground(JFaceColors.getBannerBackground(pgComp.getDisplay()));
29     }
30
31     public Control getControl() {
32         return pgComp;
33     }
34
35     public void setFocus() {
36         pgComp.setFocus();
37     }
38
39     public boolean isValidInput(Object JavaDoc object) {
40         return false;
41     }
42
43     public void refresh() {
44         //nothing to refresh
45
}
46
47     public String JavaDoc getName() {
48         return ""; //$NON-NLS-1$
49
}
50
51     public Object JavaDoc getAdapter(Class JavaDoc adapter) {
52         return null;
53     }
54
55     public String JavaDoc getDescription() {
56         return null;
57     }
58
59     public Object JavaDoc getInput() {
60         return null;
61     }
62
63     public boolean inputSet() {
64         //no history to show
65
return false;
66     }
67
68 }
69
Popular Tags