Updated Java to 21 and pom.xml to shade
This commit is contained in:
@@ -3,11 +3,8 @@ package alg.ngram;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.sun.xml.internal.bind.v2.runtime.reflect.Lister;
|
||||
import data.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
@@ -194,8 +194,6 @@ public class CorpusTab {
|
||||
}
|
||||
|
||||
public void initialize() {
|
||||
updateTooltipBehavior(0.0, 30000.0,0.0, true);
|
||||
|
||||
// add CSS style
|
||||
corpusTabPane.getStylesheets().add("style.css");
|
||||
corpusTabPane.getStyleClass().add("root");
|
||||
|
||||
@@ -61,23 +61,13 @@ public final class I18N {
|
||||
public static String get(final String key, final Object... args) {
|
||||
ResourceBundle bundle = ResourceBundle.getBundle("message", getLocale());
|
||||
String val = bundle.getString(key);
|
||||
try {
|
||||
return MessageFormat.format(new String(val.getBytes("ISO-8859-1"), "UTF-8"), args);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return val;
|
||||
return MessageFormat.format(val, args);
|
||||
}
|
||||
|
||||
public static String getDefaultLocaleItem(final String key, final Object... args) {
|
||||
ResourceBundle bundle = ResourceBundle.getBundle("message", getDefaultLocale());
|
||||
String val = bundle.getString(key);
|
||||
try {
|
||||
return MessageFormat.format(new String(val.getBytes("ISO-8859-1"), "UTF-8"), args);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return val;
|
||||
return MessageFormat.format(val, args);
|
||||
}
|
||||
|
||||
public static ObservableList<String> getObject(final ArrayList<String> keys, final Object... args) {
|
||||
@@ -86,11 +76,7 @@ public final class I18N {
|
||||
ArrayList<String> results = new ArrayList<>();
|
||||
for(String key : keys){
|
||||
String val = bundle.getString(key);
|
||||
try {
|
||||
results.add(MessageFormat.format(new String(val.getBytes("ISO-8859-1"), "UTF-8"), args));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
results.add(val);
|
||||
}
|
||||
|
||||
return FXCollections.observableArrayList(results);
|
||||
@@ -121,12 +107,7 @@ public final class I18N {
|
||||
public static String getIndependent(final String key, Locale locale, final Object... args) {
|
||||
ResourceBundle bundle = ResourceBundle.getBundle("message", locale);
|
||||
String val = bundle.getString(key);
|
||||
try {
|
||||
return MessageFormat.format(new String(val.getBytes("ISO-8859-1"), "UTF-8"), args);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return val;
|
||||
return MessageFormat.format(val, args);
|
||||
}
|
||||
|
||||
public static String getRootValue(String oldValue, ArrayList<String> nGramComputeForLetters) {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package gui;
|
||||
|
||||
public class Launcher {
|
||||
|
||||
public static void main(String[] args) {
|
||||
GUIController.main(args);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user