blob: 06d5947139d23a30ccb42c7d68064c9ef97d1d66 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
/*******************************************************************************
* Copyright (c) 2011 Boeing.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
package org.eclipse.osee.display.view.web.search;
import org.eclipse.osee.display.view.web.components.OseeSearchResultsListComponent;
import org.eclipse.osee.vaadin.widgets.Navigator;
import com.vaadin.Application;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
/**
* @author Shawn F. Cook
*/
@SuppressWarnings("serial")
public class OseeSearchResultsView extends CustomComponent implements Navigator.View {
protected OseeSearchHeaderComponent oseeSearchHeader;
protected OseeSearchResultsListComponent searchResultsListComponent;
public OseeSearchResultsView() {
oseeSearchHeader = getOseeSearchHeader();
searchResultsListComponent = new OseeSearchResultsListComponent();
}
private void initLayout() {
setSizeFull();
HorizontalLayout leftMarginAndBody = new HorizontalLayout();
leftMarginAndBody.setSizeFull();
Label leftMarginSpace = new Label("");
leftMarginSpace.setWidth(80, UNITS_PIXELS);
leftMarginAndBody.addComponent(leftMarginSpace);
VerticalLayout bodyVertLayout = new VerticalLayout();
leftMarginAndBody.addComponent(searchResultsListComponent);
searchResultsListComponent.setSizeFull();
leftMarginAndBody.setExpandRatio(searchResultsListComponent, 1.0f);
leftMarginAndBody.addComponent(bodyVertLayout);
bodyVertLayout.setSizeFull();
leftMarginAndBody.setExpandRatio(bodyVertLayout, 1.0f);
final VerticalLayout vertLayout = new VerticalLayout();
vertLayout.addComponent(oseeSearchHeader);
vertLayout.setComponentAlignment(oseeSearchHeader, Alignment.TOP_LEFT);
oseeSearchHeader.setWidth(100, UNITS_PERCENTAGE);
oseeSearchHeader.setHeight(null);
vertLayout.addComponent(leftMarginAndBody);
vertLayout.setExpandRatio(leftMarginAndBody, 1.0f);
vertLayout.setSizeFull();
setCompositionRoot(vertLayout);
}
@Override
public void init(Navigator navigator, Application application) {
initComponents();
initLayout();
}
protected OseeSearchHeaderComponent getOseeSearchHeader() {
return new OseeSearchHeaderComponent();
}
@Override
public void navigateTo(String requestedDataId) {
//Do nothing
}
@Override
public String getWarningForNavigatingFrom() {
return null;
}
protected void initComponents() {
//Do nothing
}
}
|