Project

General

Profile

Download (1.46 KB) Statistics
| Branch: | Tag: | Revision:
1
package eu.etaxonomy.vaadin.mvp;
2

    
3
import com.vaadin.ui.Window;
4

    
5
import eu.etaxonomy.vaadin.ui.view.PopupView;
6

    
7

    
8
/**
9
 * @author a.kohlbecker
10
 * @since Apr 5, 2017
11
 *
12
 * @param <P>
13
 */
14
@SuppressWarnings("serial")
15
public abstract class AbstractPopupView<P extends AbstractPresenter> extends AbstractView<P> implements PopupView  {
16

    
17
	private Window window;
18

    
19
	protected void updateWindowCaption(String caption) {
20
	    window.setCaption(caption);
21
	}
22

    
23
    /**
24
     * {@inheritDoc}
25
     */
26
    @Override
27
    public boolean isResizable() {
28
        return false;
29
    }
30

    
31
    /**
32
     * {@inheritDoc}
33
     */
34
    @Override
35
    public int getWindowPixelWidth() {
36
        return -1;
37
    }
38

    
39
    /**
40
     * {@inheritDoc}
41
     */
42
    @Override
43
    public boolean isModal() {
44
        return false;
45
    }
46

    
47
    /**
48
     * {@inheritDoc}
49
     */
50
    @Override
51
    public boolean isWindowCaptionAsHtml() {
52
        return false;
53
    }
54

    
55
    @Override
56
    public void viewEntered(){
57
        getPresenter().onViewEnter();
58
    }
59

    
60
	/* Methods which existed in the original version of the AbstractPopupView
61
	 * There are not needed here since the creation of the window and disposal
62
	 * is done by the NavigationManagerBean
63
	@Override
64
	protected void onViewReady() {
65
		super.onViewReady();
66

    
67
		window = new Window();
68
		window.setWidth(getWindowPixelWidth(), Unit.PIXELS);
69
		window.setModal(isModal());
70
		window.setContent(this);
71

    
72
		UI.getCurrent().addWindow(window);
73
	}
74

    
75
	public void close() {
76
	    window.close();
77
	}
78
	*/
79

    
80

    
81

    
82

    
83
}
(5-5/8)