Revision c72259a1
Added by Andreas Kohlbecker over 1 year ago
src/main/java/eu/etaxonomy/cdm/vaadin/component/TextFieldNFix.java | ||
---|---|---|
13 | 13 |
import com.vaadin.ui.TextField; |
14 | 14 |
|
15 | 15 |
/** |
16 |
* TextField which has "" as null represnetation, fixed the ugly "null"s in the
|
|
16 |
* TextField which has "" as null representation, fixed the ugly "null"s in the
|
|
17 | 17 |
* default TextField implementation in vaadin 7. TODO: this might no longer be |
18 | 18 |
* required in vaadin 8 since it is supposed to have a mechanism to configure |
19 | 19 |
* the null representations. |
... | ... | |
32 | 32 |
|
33 | 33 |
private static final long serialVersionUID = -7582619519894748364L; |
34 | 34 |
|
35 |
/** |
|
36 |
* @param format |
|
37 |
*/ |
|
35 |
|
|
38 | 36 |
public TextFieldNFix(String format) { |
39 | 37 |
super(format); |
40 | 38 |
init(); |
41 | 39 |
} |
42 | 40 |
|
43 |
|
|
44 |
|
|
45 |
/** |
|
46 |
* |
|
47 |
*/ |
|
48 | 41 |
public TextFieldNFix() { |
49 | 42 |
super(); |
50 | 43 |
init(); |
51 | 44 |
} |
52 | 45 |
|
53 |
|
|
54 |
|
|
55 |
/** |
|
56 |
* @param dataSource |
|
57 |
*/ |
|
58 | 46 |
public TextFieldNFix(Property dataSource) { |
59 | 47 |
super(dataSource); |
60 | 48 |
init(); |
61 | 49 |
} |
62 | 50 |
|
63 |
|
|
64 |
|
|
65 |
/** |
|
66 |
* @param caption |
|
67 |
* @param dataSource |
|
68 |
*/ |
|
69 | 51 |
public TextFieldNFix(String caption, Property dataSource) { |
70 | 52 |
super(caption, dataSource); |
71 | 53 |
init(); |
72 | 54 |
} |
73 | 55 |
|
74 |
|
|
75 |
|
|
76 |
/** |
|
77 |
* @param caption |
|
78 |
* @param value |
|
79 |
*/ |
|
80 | 56 |
public TextFieldNFix(String caption, String value) { |
81 | 57 |
super(caption, value); |
82 | 58 |
init(); |
83 | 59 |
} |
84 | 60 |
|
85 |
|
|
86 | 61 |
protected void init() { |
87 | 62 |
setNullSettingAllowed(true); |
88 | 63 |
addBlurListener(e -> { |
... | ... | |
93 | 68 |
}); |
94 | 69 |
} |
95 | 70 |
|
96 |
|
|
97 | 71 |
@Override |
98 | 72 |
public String getNullRepresentation() { |
99 | 73 |
return ""; |
... | ... | |
130 | 104 |
|
131 | 105 |
|
132 | 106 |
|
133 |
|
|
134 |
|
|
135 | 107 |
} |
src/main/java/eu/etaxonomy/cdm/vaadin/event/CollectionEditorAction.java | ||
---|---|---|
23 | 23 |
*/ |
24 | 24 |
public class CollectionEditorAction extends AbstractEditorAction<Collection> { |
25 | 25 |
|
26 |
/** |
|
27 |
* @param eventType |
|
28 |
*/ |
|
26 |
|
|
29 | 27 |
public CollectionEditorAction(EditorActionType type) { |
30 | 28 |
super(type); |
31 | 29 |
} |
32 | 30 |
|
33 |
/** |
|
34 |
* @param action |
|
35 |
* @param source |
|
36 |
*/ |
|
37 | 31 |
public CollectionEditorAction(EditorActionType action, Button source, Field<Collection> target, AbstractView sourceView) { |
38 | 32 |
super(action, source, target, sourceView); |
39 | 33 |
} |
40 | 34 |
|
41 |
/** |
|
42 |
* @param action |
|
43 |
* @param entityId |
|
44 |
* @param source |
|
45 |
* @param sourceView |
|
46 |
*/ |
|
47 | 35 |
public CollectionEditorAction(EditorActionType action, UUID entityUuid, Button source, Field<Collection> target, AbstractView sourceView) { |
48 | 36 |
super(action, entityUuid, source, target, sourceView); |
49 | 37 |
} |
src/main/java/eu/etaxonomy/cdm/vaadin/event/EditorActionContext.java | ||
---|---|---|
44 | 44 |
return parentEntity; |
45 | 45 |
} |
46 | 46 |
|
47 |
/** |
|
48 |
* @return the parentView |
|
49 |
*/ |
|
50 | 47 |
public AbstractView getParentView() { |
51 | 48 |
return parentView; |
52 | 49 |
} |
53 | 50 |
|
54 |
/** |
|
55 |
* @param targetField |
|
56 |
*/ |
|
57 | 51 |
public void setTargetField(Field<?> targetField) { |
58 | 52 |
this.targetField = targetField; |
59 | 53 |
} |
src/main/java/eu/etaxonomy/cdm/vaadin/event/ToOneRelatedEntityReloader.java | ||
---|---|---|
42 | 42 |
this.cachingPresenter = entityCache; |
43 | 43 |
} |
44 | 44 |
|
45 |
/** |
|
46 |
* {@inheritDoc} |
|
47 |
*/ |
|
48 | 45 |
@Override |
49 | 46 |
public void valueChange(ValueChangeEvent event) { |
50 | 47 |
|
Also available in: Unified diff
code cleaning