Skip to content

Commit d498fc0

Browse files
committed
Make Mediator gettter public in ViewModel
1 parent 1fe3775 commit d498fc0

File tree

7 files changed

+10
-4
lines changed

7 files changed

+10
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ public class FooComponent extends AbstractChildComponent<FooView> {
222222
...
223223

224224
@Override
225-
protected FooMediator createMediator() {
225+
public FooMediator createMediator() {
226226
return new FooComponent.Mediator(); // the mediator is created at the beginning of initialization
227227
}
228228
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public AbstractChildViewModel() {
2727
}
2828

2929
@Override
30-
protected ChildMediator getMediator() {
30+
public ChildMediator getMediator() {
3131
return (ChildMediator) super.getMediator();
3232
}
3333
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public abstract class AbstractComponentViewModel implements ComponentViewModel {
3333

3434
private ComponentMediator mediator;
3535

36-
protected ComponentMediator getMediator() {
36+
public ComponentMediator getMediator() {
3737
return this.mediator;
3838
}
3939

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ List<ParentViewModel> getChildren(ParentViewModel parent) {
5151
}
5252

5353
@Override
54-
protected ParentMediator getMediator() {
54+
public ParentMediator getMediator() {
5555
return (ParentMediator) super.getMediator();
5656
}
5757
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@
2222
*/
2323
public interface ChildViewModel extends ParentViewModel {
2424

25+
@Override
26+
ChildMediator getMediator();
2527
}

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

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

25+
ComponentMediator getMediator();
2526
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,7 @@ public interface ParentViewModel extends ComponentViewModel {
3535
* @return an {@link Iterator} that iterates over this component and all of its descendants
3636
*/
3737
SubtreeIterator<ParentViewModel> breadthFirstIterator();
38+
39+
@Override
40+
ParentMediator getMediator();
3841
}

0 commit comments

Comments
 (0)