Fixed applet bug when not signed.

This commit is contained in:
Chris Cromer 2016-07-27 19:53:29 -04:00
parent 1ce043c21d
commit a0ba43ba8a
18 changed files with 399 additions and 29 deletions

View File

@ -0,0 +1,64 @@
<component name="ArtifactManager">
<artifact type="javafx" name="Estructuras de Datos">
<output-path>$PROJECT_DIR$/out/artifacts/Estructuras_de_Datos</output-path>
<properties id="ant-postprocessing">
<options>
<file>file://$PROJECT_DIR$/estructuras_de_datos.xml</file>
<target>all</target>
</options>
</properties>
<properties id="ant-preprocessing">
<options>
<file>file://$PROJECT_DIR$/estructuras_de_datos.xml</file>
<target>clean</target>
</options>
</properties>
<properties id="javafx-properties">
<options>
<option name="alias" value="cromercl" />
<option name="appClass" value="cl.cromer.estructuras.Main" />
<option name="customManifestAttributes">
<list>
<JavaFxManifestAttribute>
<option name="name" value="Created-By" />
<option name="value" value="Chris Cromer" />
</JavaFxManifestAttribute>
<JavaFxManifestAttribute>
<option name="name" value="Class-Path" />
<option name="value" value="/cl/cromer/estructuras" />
</JavaFxManifestAttribute>
<JavaFxManifestAttribute>
<option name="name" value="Codebase" />
<option name="value" value="*.cromer.cl 127.0.0.1" />
</JavaFxManifestAttribute>
<JavaFxManifestAttribute>
<option name="name" value="Application-Name" />
<option name="value" value="Estructuras de Datos" />
</JavaFxManifestAttribute>
<JavaFxManifestAttribute>
<option name="name" value="Permissions" />
<option name="value" value="all-permissions" />
</JavaFxManifestAttribute>
</list>
</option>
<option name="description" value="Esta aplicación muestra varios tipos de estrucuras de datos visualmente." />
<option name="height" value="768" />
<option name="htmlParamFile" value="" />
<option name="keypass" value="SzdQUnhlNGV5ZVhHcjNGZVVMU2FwVUVxSGNLQVpna2FHZTZIbVg3Y05kODczWEJMd1I=" />
<option name="keystore" value="$USER_HOME$/cromercl_new/keystore" />
<option name="nativeBundle" value="all" />
<option name="paramFile" value="" />
<option name="selfSigning" value="false" />
<option name="storepass" value="SzdQUnhlNGV5ZVhHcjNGZVVMU2FwVUVxSGNLQVpna2FHZTZIbVg3Y05kODczWEJMd1I=" />
<option name="title" value="Estructuras de Datos" />
<option name="vendor" value="Chris Cromer" />
<option name="width" value="1024" />
</options>
</properties>
<root id="root">
<element id="archive" name="Estructuras_de_Datos.jar">
<element id="module-output" name="Estructuras de Datos" />
</element>
</root>
</artifact>
</component>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value>
<XML>
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
</value>
</option>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Cromer" />
</component>
</project>

23
.idea/compiler.xml Normal file
View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
</project>

View File

@ -0,0 +1,3 @@
<component name="CopyrightManager">
<settings default="" />
</component>

2
.idea/description.html Normal file
View File

@ -0,0 +1,2 @@
<html>Simple <b>JavaFX 2.0</b> application that includes simple .fxml file with attached controller and Main class to quick start. Artifact to build JavaFX application is provided.
</html>

View File

@ -0,0 +1,3 @@
<component name="ProjectDictionaryState">
<dictionary name="cromer" />
</component>

5
.idea/encodings.xml Normal file
View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
</project>

7
.idea/gradle.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="gradleHome" value="C:/Program Files (x86)/Gradle/gradle-1.0-rc-3" />
</component>
</project>

View File

@ -0,0 +1,20 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false">
<option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" />
<option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
</inspection_tool>
<inspection_tool class="ParameterCanBeLocal" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
<inspection_tool class="WeakerAccess" enabled="false" level="WARNING" enabled_by_default="false">
<option name="SUGGEST_PACKAGE_LOCAL_FOR_MEMBERS" value="true" />
<option name="SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES" value="true" />
<option name="SUGGEST_PRIVATE_FOR_INNERS" value="false" />
</inspection_tool>
</profile>
</component>

View File

@ -0,0 +1,7 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" value="Project Default" />
<option name="USE_PROJECT_PROFILE" value="true" />
<version value="1.0" />
</settings>
</component>

68
.idea/misc.xml Normal file
View File

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ClientPropertiesManager">
<properties class="javax.swing.AbstractButton">
<property name="hideActionText" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JComponent">
<property name="html.disable" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JEditorPane">
<property name="JEditorPane.w3cLengthUnits" class="java.lang.Boolean" />
<property name="JEditorPane.honorDisplayProperties" class="java.lang.Boolean" />
<property name="charset" class="java.lang.String" />
</properties>
<properties class="javax.swing.JList">
<property name="List.isFileList" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JPasswordField">
<property name="JPasswordField.cutCopyAllowed" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JSlider">
<property name="Slider.paintThumbArrowShape" class="java.lang.Boolean" />
<property name="JSlider.isFilled" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JTable">
<property name="Table.isFileList" class="java.lang.Boolean" />
<property name="JTable.autoStartsEdit" class="java.lang.Boolean" />
<property name="terminateEditOnFocusLost" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JToolBar">
<property name="JToolBar.isRollover" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JTree">
<property name="JTree.lineStyle" class="java.lang.String" />
</properties>
<properties class="javax.swing.text.JTextComponent">
<property name="caretAspectRatio" class="java.lang.Double" />
<property name="caretWidth" class="java.lang.Integer" />
</properties>
</component>
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="JavadocGenerationManager">
<option name="OUTPUT_DIRECTORY" value="$PROJECT_DIR$/doc" />
<option name="OPTION_SCOPE" value="private" />
<option name="OPTION_HIERARCHY" value="true" />
<option name="OPTION_NAVIGATOR" value="true" />
<option name="OPTION_INDEX" value="true" />
<option name="OPTION_SEPARATE_INDEX" value="true" />
<option name="OPTION_DOCUMENT_TAG_USE" value="true" />
<option name="OPTION_DOCUMENT_TAG_AUTHOR" value="true" />
<option name="OPTION_DOCUMENT_TAG_VERSION" value="true" />
<option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
<option name="OPTION_DEPRECATED_LIST" value="true" />
<option name="OTHER_OPTIONS" value="-charset utf8" />
<option name="HEAP_SIZE" />
<option name="LOCALE" value="es" />
<option name="OPEN_IN_BROWSER" value="false" />
<option name="OPTION_INCLUDE_LIBS" value="true" />
</component>
<component name="ProjectKey">
<option name="state" value="project://e79810c8-c5c8-43b1-b19c-90c1f4095425" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Estructuras de Datos.iml" filepath="$PROJECT_DIR$/Estructuras de Datos.iml" />
</modules>
</component>
</project>

125
.idea/uiDesigner.xml Normal file
View File

@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -35,14 +35,14 @@
<exclude name="**/vssver2.scc/**"/>
</patternset>
<patternset id="library.patterns">
<include name="*.war"/>
<include name="*.swc"/>
<include name="*.apk"/>
<include name="*.zip"/>
<include name="*.egg"/>
<include name="*.ane"/>
<include name="*.jar"/>
<include name="*.ear"/>
<include name="*.apk"/>
<include name="*.swc"/>
<include name="*.war"/>
<include name="*.ane"/>
<include name="*.zip"/>
</patternset>
<patternset id="compiler.resources">
<exclude name="**/?*.java"/>
@ -87,13 +87,6 @@
<property name="project.jdk.home" value="${jdk.home.1.8}"/>
<property name="project.jdk.bin" value="${jdk.bin.1.8}"/>
<property name="project.jdk.classpath" value="jdk.classpath.1.8"/>
<!-- Global Libraries -->
<path id="library.dtjava.classpath">
<pathelement location="/home/cromer/.IntelliJIdea2016.1/config/javascript/extLibs/http_java.com_js_dtjava.js"/>
</path>
<!-- Register Custom Compiler Taskdefs -->
<property name="javac2.home" value="${idea.home}/lib"/>
<path id="javac2.classpath">
@ -115,9 +108,9 @@
<dirname property="module.estructuras_de_datos.basedir" file="${ant.file}"/>
<property name="module.jdk.home.estructuras_de_datos" value="${jdk.home.1.8}"/>
<property name="module.jdk.bin.estructuras_de_datos" value="${jdk.bin.1.8}"/>
<property name="module.jdk.classpath.estructuras_de_datos" value="jdk.classpath.1.8"/>
<property name="module.jdk.home.estructuras_de_datos" value="${project.jdk.home}"/>
<property name="module.jdk.bin.estructuras_de_datos" value="${project.jdk.bin}"/>
<property name="module.jdk.classpath.estructuras_de_datos" value="${project.jdk.classpath}"/>
<property name="compiler.args.estructuras_de_datos" value="-encoding UTF-8 -source 8 -target 8 ${compiler.args}"/>
@ -130,24 +123,20 @@
<path id="estructuras_de_datos.module.production.classpath">
<path refid="${module.jdk.classpath.estructuras_de_datos}"/>
<path refid="library.dtjava.classpath"/>
</path>
<path id="estructuras_de_datos.runtime.production.module.classpath">
<pathelement location="${estructuras_de_datos.output.dir}"/>
<path refid="library.dtjava.classpath"/>
</path>
<path id="estructuras_de_datos.module.classpath">
<path refid="${module.jdk.classpath.estructuras_de_datos}"/>
<pathelement location="${estructuras_de_datos.output.dir}"/>
<path refid="library.dtjava.classpath"/>
</path>
<path id="estructuras_de_datos.runtime.module.classpath">
<pathelement location="${estructuras_de_datos.testoutput.dir}"/>
<pathelement location="${estructuras_de_datos.output.dir}"/>
<path refid="library.dtjava.classpath"/>
</path>
@ -237,12 +226,23 @@
</manifest>
</fx:jar>
<fx:deploy width="1024" height="768" updatemode="background" outdir="${artifact.temp.output.Estructuras_de_Datos}/deploy" outfile="Estructuras_de_Datos" nativeBundles="all">
<fx:permissions elevated="true"/>
<fx:application refid="Estructuras_de_Datos_id"/>
<fx:info title="Estructuras de Datos" vendor="Chris Cromer" description="Esta aplicación muestra varios tipos de estrucuras de datos visualmente."/>
<fx:resources>
<fx:fileset refid="all_Estructuras_de_Datos"/>
</fx:resources>
</fx:deploy>
<property name="artifact.sign.vendor.Estructuras_de_Datos" value="CN=Chris Cromer"/>
<property name="artifact.sign.alias.Estructuras_de_Datos" value="cromercl"/>
<property name="artifact.sign.keystore.Estructuras_de_Datos" value="/home/cromer/cromercl_new/keystore"/>
<property name="artifact.sign.storepass.Estructuras_de_Datos" value="K7PRxe4eyeXGr3FeULSapUEqHcKAZgkaGe6HmX7cNd873XBLwR"/>
<property name="artifact.sign.keypass.Estructuras_de_Datos" value="K7PRxe4eyeXGr3FeULSapUEqHcKAZgkaGe6HmX7cNd873XBLwR"/>
<signjar alias="${artifact.sign.alias.Estructuras_de_Datos}" keystore="${artifact.sign.keystore.Estructuras_de_Datos}" storepass="${artifact.sign.storepass.Estructuras_de_Datos}" keypass="${artifact.sign.keypass.Estructuras_de_Datos}">
<fileset dir="${artifact.temp.output.Estructuras_de_Datos}/deploy">
<include name="*.jar"/>
</fileset>
</signjar>
<copy todir="${artifact.output.estructuras_de_datos}">
<fileset dir="${artifact.temp.output.Estructuras_de_Datos}/deploy"/>
</copy>

View File

@ -1,5 +1,5 @@
Manifest-Version: 1.0
Permissions: sandbox
Permissions: all-permissions
Codebase: *.cromer.cl 127.0.0.1
JavaFX-Version: 8.0
Class-Path: /cl/cromer/estructuras

View File

@ -11,6 +11,7 @@ import javafx.scene.image.Image;
import javafx.stage.Stage;
import java.io.IOException;
import java.security.AccessControlException;
import java.util.Locale;
import java.util.ResourceBundle;
import java.util.logging.Level;
@ -38,11 +39,22 @@ public class Main extends Application {
*/
@Override
public void start(Stage stage) {
Preferences preferences = Preferences.userRoot().node(this.getClass().getName());
String idoma = preferences.get("idioma", "en");
String idoma2 = preferences.get("idioma2", "EN");
String idioma;
String idioma2;
Preferences preferences;
try {
preferences = Preferences.userRoot().node(this.getClass().getName());
idioma = preferences.get("idioma", "en");
idioma2 = preferences.get("idioma2", "EN");
}
catch (AccessControlException exception) {
// This will throw if the applet is not signed.
preferences = null;
idioma = "en";
idioma2 = "EN";
}
Locale locale = new Locale(idoma, idoma2);
Locale locale = new Locale(idioma, idioma2);
ResourceBundle resourceBundle = ResourceBundle.getBundle("cl.cromer.estructuras.bundles.Idioma", locale);
try {
@ -58,7 +70,7 @@ public class Main extends Application {
stage.close();
}
//stage.setMaximized(true);
stage.setMaximized(true);
stage.setMinHeight(640);
stage.setMinWidth(768);
stage.getIcons().add(new Image(getClass().getResourceAsStream("/cl/cromer/estructuras/images/icon.png")));

View File

@ -303,8 +303,10 @@ public class MenuController extends VBox implements Initializable {
Optional<ButtonType> result = dialog.showAndWait();
if (result.isPresent() && result.get() == botonCambiar) {
// Si hace click en cambiar, cambiar el idioma y reiniciar.
preferences.put("idioma", "en");
preferences.put("idioma2", "EN");
if (preferences != null) {
preferences.put("idioma", "en");
preferences.put("idioma2", "EN");
}
Locale locale = new Locale("en", "EN");
ResourceBundle resourceBundle = ResourceBundle.getBundle("cl.cromer.estructuras.bundles.Idioma", locale);
@ -335,8 +337,10 @@ public class MenuController extends VBox implements Initializable {
Optional<ButtonType> result = dialog.showAndWait();
if (result.isPresent() && result.get() == botonCambiar) {
// Si hace click en cambiar, cambiar el idioma y reiniciar.
preferences.put("idioma", "es");
preferences.put("idioma2", "ES");
if (preferences != null) {
preferences.put("idioma", "es");
preferences.put("idioma2", "ES");
}
Locale locale = new Locale("es", "ES");
ResourceBundle resourceBundle = ResourceBundle.getBundle("cl.cromer.estructuras.bundles.Idioma", locale);