Skip to content

Commit 10ab0b6

Browse files
committed
Add deinitialize method to Mediator
1 parent d498fc0 commit 10ab0b6

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

mvvm4fx-core/src/main/java/com/techsenger/mvvm4fx/core/AbstractComponent.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ public void setGroup(ComponentGroup value) {
108108
public ObjectProperty<ComponentGroup> groupProperty() {
109109
return group;
110110
}
111+
112+
@Override
113+
public void deinitialize() {
114+
AbstractComponent.this.deinitialize();
115+
}
111116
}
112117

113118
private final T view;

mvvm4fx-core/src/main/java/com/techsenger/mvvm4fx/core/AbstractComponentView.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public AbstractComponent<?> getComponent() {
4646
}
4747

4848
/**
49-
* Performs initialization.
49+
* Initializes view.
5050
*/
5151
protected void initialize() {
5252
build();
@@ -56,7 +56,7 @@ protected void initialize() {
5656
}
5757

5858
/**
59-
* Performs deinitialization.
59+
* Deinitializes view.
6060
*/
6161
protected void deinitialize() {
6262
removeHandlers();

mvvm4fx-core/src/main/java/com/techsenger/mvvm4fx/core/ComponentMediator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@
2222
*/
2323
public interface ComponentMediator extends ComponentDescriptor {
2424

25+
void deinitialize();
2526
}

0 commit comments

Comments
 (0)