-
Notifications
You must be signed in to change notification settings - Fork 2
docs: improve javadocs #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -25,7 +25,7 @@ | |
|
|
||
| /** | ||
| * Internationalization object for customizing the component UI texts. An instance with the default | ||
| * messages can be obtained using {@link ErrorWindowI18n#createDefault()} | ||
| * messages can be obtained using {@link ErrorWindowI18n#createDefault()}. | ||
| * | ||
| * @author [email protected] | ||
| */ | ||
|
|
@@ -38,6 +38,7 @@ public class ErrorWindowI18n { | |
| private String defaultErrorMessage; | ||
| private String clipboard; | ||
|
|
||
| /** Constructor for creating the default instance of the object. */ | ||
| private ErrorWindowI18n() { | ||
| this.caption = "An error has occurred"; | ||
| this.instructions = "Please report the following code to your system administrator"; | ||
|
|
@@ -47,6 +48,11 @@ private ErrorWindowI18n() { | |
| this.clipboard = "Copy details to clipboard"; | ||
| } | ||
|
|
||
| /** | ||
| * Constructor for creating an instance of the object from a message translator function. | ||
| * | ||
| * @param i18nTranslator a message translation function | ||
| */ | ||
| private ErrorWindowI18n(SerializableFunction<String, String> i18nTranslator) { | ||
| this.caption = i18nTranslator.apply("com.flowingcode.vaadin.addons.errorwindow.caption"); | ||
| this.instructions = | ||
|
|
@@ -58,11 +64,21 @@ private ErrorWindowI18n(SerializableFunction<String, String> i18nTranslator) { | |
| this.clipboard = i18nTranslator.apply("com.flowingcode.vaadin.addons.errorwindow.clipboard"); | ||
| } | ||
|
|
||
| /** @return a new instance with the default messages */ | ||
| /** | ||
| * Creates a new instance with the default messages. | ||
| * | ||
| * @return a new instance with the default messages | ||
| */ | ||
| public static ErrorWindowI18n createDefault() { | ||
| return new ErrorWindowI18n(); | ||
| } | ||
|
|
||
| /** | ||
| * Creates a new instance with the provided message translation function. | ||
| * | ||
| * @param i18nTranslator a message translation function | ||
| * @return a new instance with the provided message translation function | ||
| */ | ||
| public static ErrorWindowI18n create(SerializableFunction<String, String> i18nTranslator) { | ||
| return new ErrorWindowI18n(i18nTranslator); | ||
| } | ||
|
|
@@ -72,7 +88,7 @@ public void setCaption(final String caption) { | |
| this.caption = caption; | ||
| } | ||
|
|
||
| /** @return returns the caption of the error window. */ | ||
| /** @return returns the caption of the error window */ | ||
| public String getCaption() { | ||
| return this.caption; | ||
| } | ||
|
|
@@ -82,7 +98,7 @@ public void setInstructions(final String instructions) { | |
| this.instructions = instructions; | ||
| } | ||
|
|
||
| /** @return returns the instructions for the user if the UUID is displayed in production mode. */ | ||
| /** @return returns the instructions for the user if the UUID is displayed in production mode */ | ||
| public String getInstructions() { | ||
| return this.instructions; | ||
| } | ||
|
|
@@ -92,7 +108,7 @@ public void setClose(final String close) { | |
| this.close = close; | ||
| } | ||
|
|
||
| /** @return returns the text of the "Close"-Button. */ | ||
| /** @return returns the text of the "Close"-Button */ | ||
| public String getClose() { | ||
| return this.close; | ||
| } | ||
|
|
@@ -102,7 +118,7 @@ public void setDetails(final String details) { | |
| this.details = details; | ||
| } | ||
|
|
||
| /** @return returns the text of the "Details"-Button. */ | ||
| /** @return returns the text of the "Details"-Button */ | ||
| public String getDetails() { | ||
| return this.details; | ||
| } | ||
|
|
@@ -117,13 +133,13 @@ public void setDefaultErrorMessage(final String defaultErrorMessage) { | |
|
|
||
| /** | ||
| * @return returns the default error message shown if the message passed to the error window is | ||
| * <code>null</code>. | ||
| * <code>null</code> | ||
| */ | ||
| public String getDefaultErrorMessage() { | ||
| return this.defaultErrorMessage; | ||
| } | ||
|
|
||
| /** @return returns the text for the "Copy details to clipboard" button. */ | ||
| /** @return returns the text for the "Copy details to clipboard" button */ | ||
| public String getClipboard() { | ||
| return clipboard; | ||
| } | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.