diff options
Diffstat (limited to 'src/main/java/sevenUnitsGUI/View.java')
-rw-r--r-- | src/main/java/sevenUnitsGUI/View.java | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/src/main/java/sevenUnitsGUI/View.java b/src/main/java/sevenUnitsGUI/View.java index 7dd0c44..0adeb3a 100644 --- a/src/main/java/sevenUnitsGUI/View.java +++ b/src/main/java/sevenUnitsGUI/View.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2021-2022 Adrien Hopkins + * Copyright (C) 2021, 2022, 2024, 2025 Adrien Hopkins * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -24,16 +24,16 @@ import sevenUnits.utils.NameSymbol; /** * An object that controls user interaction with 7Units - * + * * @author Adrien Hopkins - * @since v0.4.0 * @since 2021-12-15 + * @since v0.4.0 */ public interface View { /** * @return a new tabbed view - * @since v0.4.0 * @since 2022-04-19 + * @since v0.4.0 */ static View createTabbedView() { return new TabbedView(); @@ -41,22 +41,22 @@ public interface View { /** * @return the presenter associated with this view - * @since v0.4.0 * @since 2022-04-19 + * @since v0.4.0 */ Presenter getPresenter(); /** * @return name of prefix currently being viewed - * @since v0.4.0 * @since 2022-04-10 + * @since v0.4.0 */ Optional<String> getViewedPrefixName(); /** * @return name of unit currently being viewed - * @since v0.4.0 * @since 2022-04-10 + * @since v0.4.0 */ Optional<String> getViewedUnitName(); @@ -65,8 +65,8 @@ public interface View { * viewer * * @param prefixNames prefix names to view - * @since v0.4.0 * @since 2022-04-10 + * @since v0.4.0 */ void setViewablePrefixNames(Set<String> prefixNames); @@ -74,8 +74,8 @@ public interface View { * Sets the list of units that are available to be viewed in a unit viewer * * @param unitNames unit names to view - * @since v0.4.0 * @since 2022-04-10 + * @since v0.4.0 */ void setViewableUnitNames(Set<String> unitNames); @@ -85,8 +85,8 @@ public interface View { * @param title title of error message; on any view that uses an error * dialog, this should be the title of the error dialog. * @param message error message - * @since v0.4.0 * @since 2021-12-15 + * @since v0.4.0 */ void showErrorMessage(String title, String message); @@ -95,8 +95,8 @@ public interface View { * * @param name name(s) and symbol of prefix * @param multiplierString string representation of prefix multiplier - * @since v0.4.0 * @since 2022-04-10 + * @since v0.4.0 */ void showPrefix(NameSymbol name, String multiplierString); @@ -107,9 +107,16 @@ public interface View { * @param definition unit's definition string * @param dimensionName name of unit's dimension * @param type type of unit (metric/semi-metric/non-metric) - * @since v0.4.0 * @since 2022-04-10 + * @since v0.4.0 */ void showUnit(NameSymbol name, String definition, String dimensionName, UnitType type); + + /** + * Updates the view's text to reflect the presenter's locale. + * + * This method <b>must not</b> call {@link Presenter#setUserLocale(String)}. + */ + void updateText(); } |