-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/main/java/de/vogel612/helper/ui/TranslationPresenter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package de.vogel612.helper.ui; | ||
|
||
import de.vogel612.helper.data.Translation; | ||
|
||
/** | ||
* <p> | ||
* Presenter for editing a single Translation. This part of the Program does not | ||
* require a model, since {@link Translation} <b>is</b> the model. The default | ||
* workflow is simple. From an OverviewPresenter call: | ||
* </p> | ||
* | ||
* <pre> | ||
* TranslationPresenter tp = new TranslationPresenterImpl(); | ||
* tp.register(this); | ||
* tp.setRequestedTranslation(translation); | ||
* </pre> | ||
* | ||
* <p> | ||
* And handle the onTranslate-Event like the following | ||
* </p> | ||
* | ||
* <pre> | ||
* onTranslationSubmit((t) -> tp.hide(); /* use translation *\/); | ||
* </pre> | ||
* | ||
* @implNote Implementation will not happen with an additional separated View | ||
* interface, since there is in no way enough View-Logic to justify it | ||
* | ||
* @author vogel612<<a href="mailto:vogel612@gmx.de">vogel612@gmx.de</a>> | ||
*/ | ||
public interface TranslationPresenter { | ||
|
||
public void register(OverviewPresenter p); | ||
|
||
public void show(); | ||
|
||
public void hide(); | ||
|
||
public void setRequestedTranslation(Translation t); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters