Mercurial > dive4elements > river
diff gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DefaultModule.java @ 8870:c26fb37899ca
Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui.
Also using now the localization info from the server instead of localizing the modules again on the client side.
author | gernotbelger |
---|---|
date | Wed, 07 Feb 2018 11:59:13 +0100 |
parents | 5811dfe22897 |
children |
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DefaultModule.java Wed Feb 07 11:52:04 2018 +0100 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DefaultModule.java Wed Feb 07 11:59:13 2018 +0100 @@ -14,26 +14,31 @@ private String name; private String localname; - private boolean selected = false; + private ModuleGroup group; + private boolean selected; private List<String> rivers; public DefaultModule() { } public DefaultModule( - String name, - String localname, - boolean selected, - List<String> rivers) { + final String name, + final String localname, + final boolean selected, + final String groupId, + final String groupLabel, + final List<String> rivers) { this.name = name; this.localname = localname; this.selected = selected; + this.group = new ModuleGroup(groupId, groupLabel); this.rivers = rivers; } /** * Returns the name of the module */ + @Override public String getName() { return this.name; } @@ -41,6 +46,7 @@ /** * Returns the localized name of the module */ + @Override public String getLocalizedName() { return this.localname; } @@ -48,15 +54,21 @@ /** * Returns true if the module should be selected */ + @Override public boolean isSelected() { return this.selected; } + + @Override + public ModuleGroup getGroup() { + return this.group; + } /** * @return the rivers */ + @Override public List<String> getRivers() { return this.rivers; } -} -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 tw=80 : +} \ No newline at end of file