ref #6687 attempt to get rid of the hibernate.event.merge.entity_copy_observer=allow...
[cdm-vaadin.git] / src / main / java / eu / etaxonomy / vaadin / mvp / AbstractPopupView.java
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 public abstract class AbstractPopupView<P extends AbstractPresenter> extends AbstractView<P> implements PopupView {
15
16 private Window window;
17
18 protected void updateWindowCaption(String caption) {
19 window.setCaption(caption);
20 }
21
22 /**
23 * {@inheritDoc}
24 */
25 @Override
26 public boolean isResizable() {
27 return false;
28 }
29
30 /**
31 * {@inheritDoc}
32 */
33 @Override
34 public int getWindowPixelWidth() {
35 return -1;
36 }
37
38 /**
39 * {@inheritDoc}
40 */
41 @Override
42 public boolean isModal() {
43 return false;
44 }
45
46 /**
47 * {@inheritDoc}
48 */
49 @Override
50 public boolean isWindowCaptionAsHtml() {
51 return false;
52 }
53
54 @Override
55 public void viewEntered(){
56 getPresenter().onViewEnter();
57 }
58
59 /* Methods which existed in the original version of the AbstractPopupView
60 * There are not needed here since the creation of the window and disposal
61 * is done by the NavigationManagerBean
62 @Override
63 protected void onViewReady() {
64 super.onViewReady();
65
66 window = new Window();
67 window.setWidth(getWindowPixelWidth(), Unit.PIXELS);
68 window.setModal(isModal());
69 window.setContent(this);
70
71 UI.getCurrent().addWindow(window);
72 }
73
74 public void close() {
75 window.close();
76 }
77 */
78
79
80
81
82 }