1 /******************************************************************************* 2 * Copyright (c) 2006 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package org.eclipse.team.internal.ui.history; 15 16 import org.eclipse.jface.resource.JFaceColors; 17 import org.eclipse.swt.SWT; 18 import org.eclipse.swt.layout.FillLayout; 19 import org.eclipse.swt.widgets.Composite; 20 import org.eclipse.swt.widgets.Control; 21 import org.eclipse.team.ui.history.HistoryPage; 22 23 public class GenericHistoryViewDefaultPage extends HistoryPage { 24 private Composite pgComp; 25 26 @Override createControl(Composite parent)27 public void createControl(Composite parent) { 28 pgComp = new Composite(parent, SWT.NULL); 29 pgComp.setLayout(new FillLayout()); 30 pgComp.setBackground(JFaceColors.getBannerBackground(pgComp.getDisplay())); 31 } 32 33 @Override getControl()34 public Control getControl() { 35 return pgComp; 36 } 37 38 @Override setFocus()39 public void setFocus() { 40 pgComp.setFocus(); 41 } 42 43 @Override isValidInput(Object object)44 public boolean isValidInput(Object object) { 45 return false; 46 } 47 48 @Override refresh()49 public void refresh() { 50 // nothing to refresh 51 } 52 53 @Override getName()54 public String getName() { 55 return ""; //$NON-NLS-1$ 56 } 57 58 @Override getAdapter(Class<T> adapter)59 public <T> T getAdapter(Class<T> adapter) { 60 return null; 61 } 62 63 @Override getDescription()64 public String getDescription() { 65 return null; 66 } 67 68 @Override getInput()69 public Object getInput() { 70 return null; 71 } 72 73 @Override inputSet()74 public boolean inputSet() { 75 //no history to show 76 return false; 77 } 78 } 79