Project

General

Profile

Revision 388cf82b

ID388cf82b79d15ad9043ac8e2212ea4661e8518ab
Parent 25a150bd
Child 725b6f1f

Added by Andreas Kohlbecker about 3 years ago

solving layout problems related to hight and scrolling

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorksetViewBean.java
143 143
        addContentComponent(workingsetHeader, null);
144 144

  
145 145
        registrationListPanel = createRegistrationsList(workingset);
146
        registrationListPanel.setHeight("100%");
146 147
        registrationListPanel.setStyleName("registration-list");
147 148
        registrationListPanel.setCaption("Registrations");
148 149
        addContentComponent(registrationListPanel, 1.0f);
......
210 211
        registrationsGrid.setComponentAlignment(buttonContainer, Alignment.MIDDLE_RIGHT);
211 212

  
212 213
        Panel namesTypesPanel = new Panel(registrationsGrid);
213
        namesTypesPanel.setSizeFull();
214 214
        return namesTypesPanel;
215 215
    }
216 216

  
src/main/java/eu/etaxonomy/vaadin/ui/view/ViewAreaBean.java
4 4

  
5 5
import com.vaadin.navigator.View;
6 6
import com.vaadin.navigator.ViewDisplay;
7
import com.vaadin.shared.ui.MarginInfo;
7 8
import com.vaadin.spring.annotation.SpringComponent;
8 9
import com.vaadin.spring.annotation.UIScope;
9 10
import com.vaadin.ui.Component;
10
import com.vaadin.ui.CssLayout;
11 11
import com.vaadin.ui.HorizontalLayout;
12
import com.vaadin.ui.VerticalLayout;
12 13

  
13 14
import eu.etaxonomy.cdm.vaadin.toolbar.Toolbar;
14 15
import eu.etaxonomy.vaadin.ui.MainMenu;
......
32 33

  
33 34
	private Component toolbar = null;
34 35

  
35
	private CssLayout contentArea;
36
	// private VerticalLayout contentArea;
36 37

  
37
	private CssLayout mainArea;
38
	private VerticalLayout mainArea;
39

  
40
	private Component currentViewComponent = null;
38 41

  
39 42
    public ViewAreaBean() {
40 43

  
41 44
        setSizeFull();
42 45

  
43
        mainArea = new CssLayout();
46
        mainArea = new VerticalLayout();
44 47
        mainArea.setPrimaryStyleName("valo-toolbar");
45 48
        mainArea.setSizeFull();
46
        contentArea = new CssLayout();
47
        contentArea.setPrimaryStyleName("valo-content");
48
        contentArea.addStyleName("v-scrollable");
49
        contentArea.setSizeFull();
49
        mainArea.setMargin(new MarginInfo(false, false, true, false));
50 50

  
51
        mainArea.addComponent(contentArea);
52 51
        addComponent(mainArea);
53 52
        setExpandRatio(mainArea, 1);
54 53
    }
......
70 69

  
71 70
	@Override
72 71
	public void showView(View view) {
73
		contentArea.removeAllComponents();
74
		contentArea.addComponent(Component.class.cast(view));
72
	    if(currentViewComponent != null){
73
	        mainArea.removeComponent(currentViewComponent);
74
	    }
75
	    currentViewComponent = Component.class.cast(view);
76
	    mainArea.addComponent(currentViewComponent);
77
	    mainArea.setExpandRatio(Component.class.cast(view), 1);
75 78
	}
76 79

  
77 80
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)