Skip to content
Snippets Groups Projects
Commit bcddad88 authored by Leonard Kupper's avatar Leonard Kupper
Browse files

Fix checkstyle.

parent 2c9ea92d
No related branches found
No related tags found
1 merge request!37Bar chart update & according legend change
......@@ -8,7 +8,6 @@ import de.tudresden.inf.mci.brailleplot.layout.RasterCanvas;
import de.tudresden.inf.mci.brailleplot.layout.Rectangle;
import de.tudresden.inf.mci.brailleplot.point.Point2DDouble;
import de.tudresden.inf.mci.brailleplot.printabledata.MatrixData;
import de.tudresden.inf.mci.brailleplot.rendering.language.BrailleLanguage;
import java.util.ArrayList;
import java.util.HashMap;
......
......@@ -15,6 +15,10 @@ public class BrailleText implements Renderable {
private String mContent;
private Rectangle mArea;
/**
* Getter for the associated language used in this braille text.
* @return String containing the language
*/
public String getLanguage() {
return mLanguage;
}
......@@ -32,7 +36,7 @@ public class BrailleText implements Renderable {
mLanguage = "de-g0.utb";
}
public BrailleText(final String content, final Rectangle area, BrailleLanguage.Language language) {
public BrailleText(final String content, final Rectangle area, final BrailleLanguage.Language language) {
setText(content);
setArea(area);
mLanguage = BrailleLanguage.getCorrectLanguage(language);
......
package de.tudresden.inf.mci.brailleplot.rendering.language;
/**
* Helper class for braillelanguage
* Helper class for braillelanguage.
* @author Andrey Ruzhanskiy
* @version 27.09.2019
*/
@SuppressWarnings("HideUtilityClassConstructor")
public class BrailleLanguage {
public static String getCorrectLanguage(Language language){
/**
* Method to get the correct name of the table for the given enum.
* @param language Enum, for which the table is to be known.
* @return String containing the name of the table.
*/
public static String getCorrectLanguage(final Language language) {
switch (language) {
case GERMAN_VOLLSCHRIFT:
case DE_VOLLSCHRIFT:
......@@ -18,11 +24,14 @@ public class BrailleLanguage {
case GERMAN_KURZSCHRIFT:
case DE_KURZSCHRIFT:
return "de-g2.ctb";
default:
throw new RuntimeException("Unsupported language given as braillelanguage! \"" + language.toString() + "\"");
}
throw new RuntimeException("Unsupported language given as braillelanguage! \"" + language.toString() + "\"");
}
/**
* Enum describing the current supported braille languages and grammars.
*/
public enum Language {
DE_KURZSCHRIFT,
DE_BASISSCHRIFT,
......
/**
* This package contains the language helper class and the braille language declaration.
*/
package de.tudresden.inf.mci.brailleplot.rendering.language;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment