1
|
package eu.etaxonomy.vaadin.ui.view;
|
2
|
|
3
|
import com.vaadin.server.Sizeable.Unit;
|
4
|
|
5
|
import eu.etaxonomy.vaadin.ui.CanCastComponent;
|
6
|
|
7
|
/**
|
8
|
* This interface defines the api used by the {@link NavigationManagerBean} to
|
9
|
* show popup view in a {@link Window} with caption etc.
|
10
|
*
|
11
|
* @author a.kohlbecker
|
12
|
* @since Apr 5, 2017
|
13
|
*
|
14
|
*/
|
15
|
public interface PopupView extends CanCastComponent {
|
16
|
|
17
|
boolean isResizable();
|
18
|
|
19
|
/**
|
20
|
* Whether to show an activepopupView close button in the popup window header.
|
21
|
*/
|
22
|
boolean isClosable();
|
23
|
|
24
|
boolean isModal();
|
25
|
|
26
|
/**
|
27
|
* The initial width of the window. A value of <code>-1</code>
|
28
|
* means undefined.
|
29
|
*
|
30
|
* @return a positive number to define the initial with of the windows.
|
31
|
* A negative number implies <b>unspecified size</b> (terminal is free
|
32
|
* to set the size).
|
33
|
*/
|
34
|
int getWindowWidth();
|
35
|
|
36
|
|
37
|
Unit getWindowWidthUnit();
|
38
|
|
39
|
int getWindowHeight();
|
40
|
|
41
|
/**
|
42
|
* The initial width of the window. A value of <code>-1</code>
|
43
|
* means undefined.
|
44
|
*
|
45
|
* @return a positive number to define the initial with of the windows.
|
46
|
* A negative number implies <b>unspecified size</b> (terminal is free
|
47
|
* to set the size).
|
48
|
*/
|
49
|
Unit getWindowHeightUnit();
|
50
|
|
51
|
String getWindowCaption();
|
52
|
|
53
|
/**
|
54
|
* @return
|
55
|
*/
|
56
|
boolean isWindowCaptionAsHtml();
|
57
|
|
58
|
/**
|
59
|
* Is called once the popView is displayed in the UI
|
60
|
*/
|
61
|
void viewEntered();
|
62
|
|
63
|
/**
|
64
|
* Can be implemented by editor views to set the focus on a specific form
|
65
|
* item.
|
66
|
*/
|
67
|
void focusFirst();
|
68
|
|
69
|
/**
|
70
|
* Cancel any operation in progress and close the view.
|
71
|
*/
|
72
|
public void cancel();
|
73
|
|
74
|
|
75
|
}
|