add some localization items

This commit is contained in:
huangyuhui
2016-01-23 18:04:30 +08:00
parent 08301bed8d
commit 3bdaaddcd8
31 changed files with 512 additions and 947 deletions

View File

@@ -50,8 +50,8 @@ import org.jackhuang.hellominecraft.utils.version.MinecraftVersionRequest;
* *
* This class can manage mod packs, for example, importing and exporting, the * This class can manage mod packs, for example, importing and exporting, the
* format of game is the offical one. * format of game is the offical one.
* Not compatible with MultiMC(no instance.cfg) & FTB(not leaving mcversion in * Not compatible with MultiMC(no instance.cfg processor) & FTB(not leaving
* pack.json). * mcversion(jar) in pack.json).
* *
* @author huangyuhui * @author huangyuhui
*/ */
@@ -75,19 +75,17 @@ public final class ModpackManager {
Compressor.unzip(input, versions, t -> { Compressor.unzip(input, versions, t -> {
if (t.equals("minecraft/pack.json")) if (t.equals("minecraft/pack.json"))
b.incrementAndGet(); b.incrementAndGet();
if (t.equals("minecraft/pack.jar"))
b.incrementAndGet();
return true; return true;
}); });
if (b.get() < 2) if (b.get() < 1)
throw new FileNotFoundException("the mod pack is in an incorrect format."); throw new FileNotFoundException(C.i18n("modpack.incorrect_format.no_json"));
File nowFile = new File(versions, id); File nowFile = new File(versions, id);
oldFile.renameTo(nowFile); oldFile.renameTo(nowFile);
File json = new File(nowFile, "pack.json"); File json = new File(nowFile, "pack.json");
MinecraftVersion mv = C.gson.fromJson(FileUtils.readFileToString(json), MinecraftVersion.class); MinecraftVersion mv = C.gson.fromJson(FileUtils.readFileToString(json), MinecraftVersion.class);
if (mv.jar == null) if (mv.jar == null)
throw new FileSystemException("the mod pack is in an incorrect format, pack.json does not have attribute 'jar'."); throw new FileNotFoundException(C.i18n("modpack.incorrect_format.no_jar"));
service.download().downloadMinecraftJarTo(mv.jar, new File(nowFile, id + ".jar")); service.download().downloadMinecraftJarTo(mv.jar, new File(nowFile, id + ".jar"));
mv.jar = null; mv.jar = null;
FileUtils.writeStringToFile(json, C.gsonPrettyPrinting.toJson(mv)); FileUtils.writeStringToFile(json, C.gsonPrettyPrinting.toJson(mv));
@@ -132,7 +130,7 @@ public final class ModpackManager {
mv.runDir = "version"; mv.runDir = "version";
MinecraftVersionRequest r = MinecraftVersionRequest.minecraftVersion(provider.getMinecraftJar(version)); MinecraftVersionRequest r = MinecraftVersionRequest.minecraftVersion(provider.getMinecraftJar(version));
if (r.type != MinecraftVersionRequest.OK) if (r.type != MinecraftVersionRequest.OK)
throw new FileSystemException("Cannot read vanilla version, " + MinecraftVersionRequest.getResponse(r)); throw new FileSystemException(C.i18n("modpack.cannot_read_version") + ": " + MinecraftVersionRequest.getResponse(r));
mv.jar = r.version; mv.jar = r.version;
zip.putTextFile(C.gsonPrettyPrinting.toJson(mv), "minecraft/pack.json"); zip.putTextFile(C.gsonPrettyPrinting.toJson(mv), "minecraft/pack.json");
} finally { } finally {

View File

@@ -347,7 +347,7 @@
<Component class="javax.swing.JButton" name="btnExportModpack"> <Component class="javax.swing.JButton" name="btnExportModpack">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/jackhuang/hellominecraft/launcher/I18N.properties" key="settings.modpack.save.task" replaceFormat="C.i18n(&quot;{key}&quot;)"/> <ResourceString bundle="org/jackhuang/hellominecraft/launcher/I18N.properties" key="modpack.save.task" replaceFormat="C.i18n(&quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
<Events> <Events>
@@ -357,7 +357,7 @@
<Component class="javax.swing.JButton" name="btnImportModpack"> <Component class="javax.swing.JButton" name="btnImportModpack">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/jackhuang/hellominecraft/launcher/I18N.properties" key="settings.modpack.install.task" replaceFormat="C.i18n(&quot;{key}&quot;)"/> <ResourceString bundle="org/jackhuang/hellominecraft/launcher/I18N.properties" key="modpack.install.task" replaceFormat="C.i18n(&quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
<Events> <Events>

View File

@@ -35,8 +35,6 @@ import java.io.IOException;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFileChooser; import javax.swing.JFileChooser;
import javax.swing.JMenuItem; import javax.swing.JMenuItem;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
@@ -409,14 +407,14 @@ public final class GameSettingsPanel extends AnimatedPanel implements DropTarget
} }
}); });
btnExportModpack.setText(C.i18n("settings.modpack.save.task")); // NOI18N btnExportModpack.setText(C.i18n("modpack.save.task")); // NOI18N
btnExportModpack.addActionListener(new java.awt.event.ActionListener() { btnExportModpack.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
btnExportModpackActionPerformed(evt); btnExportModpackActionPerformed(evt);
} }
}); });
btnImportModpack.setText(C.i18n("settings.modpack.install.task")); // NOI18N btnImportModpack.setText(C.i18n("modpack.install.task")); // NOI18N
btnImportModpack.addActionListener(new java.awt.event.ActionListener() { btnImportModpack.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
btnImportModpackActionPerformed(evt); btnImportModpackActionPerformed(evt);
@@ -1144,18 +1142,18 @@ public final class GameSettingsPanel extends AnimatedPanel implements DropTarget
private void btnImportModpackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImportModpackActionPerformed private void btnImportModpackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImportModpackActionPerformed
JFileChooser fc = new JFileChooser(); JFileChooser fc = new JFileChooser();
fc.setFileSelectionMode(JFileChooser.FILES_ONLY); fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
fc.setDialogTitle(C.i18n("settings.modpack.choose")); fc.setDialogTitle(C.i18n("modpack.choose"));
fc.setMultiSelectionEnabled(false); fc.setMultiSelectionEnabled(false);
fc.setFileFilter(new FileNameExtensionFilter(C.i18n("settings.modpack"), "zip")); fc.setFileFilter(new FileNameExtensionFilter(C.i18n("modpack"), "zip"));
fc.showOpenDialog(this); fc.showOpenDialog(this);
if (fc.getSelectedFile() == null) if (fc.getSelectedFile() == null)
return; return;
String suggestedModpackId = JOptionPane.showInputDialog("Please enter your favourite game name", FileUtils.getBaseName(fc.getSelectedFile().getName())); String suggestedModpackId = JOptionPane.showInputDialog("Please enter your favourite game name", FileUtils.getBaseName(fc.getSelectedFile().getName()));
TaskWindow.getInstance().addTask(new TaskRunnable(C.i18n("settings.modpack.install.task"), () -> { TaskWindow.getInstance().addTask(new TaskRunnable(C.i18n("modpack.install.task"), () -> {
try { try {
ModpackManager.install(fc.getSelectedFile(), getProfile().service(), suggestedModpackId); ModpackManager.install(fc.getSelectedFile(), getProfile().service(), suggestedModpackId);
} catch (IOException ex) { } catch (IOException ex) {
MessageBox.Show(C.i18n("settings.modpack.install_error")); MessageBox.Show(C.i18n("modpack.install_error"));
HMCLog.err("Failed to install modpack", ex); HMCLog.err("Failed to install modpack", ex);
} }
})).start(); })).start();
@@ -1164,7 +1162,7 @@ public final class GameSettingsPanel extends AnimatedPanel implements DropTarget
private void btnExportModpackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExportModpackActionPerformed private void btnExportModpackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExportModpackActionPerformed
Map settings = (Map) WizardDisplayer.showWizard(new ModpackWizard(getProfile().service().version()).createWizard()); Map settings = (Map) WizardDisplayer.showWizard(new ModpackWizard(getProfile().service().version()).createWizard());
if (settings != null) if (settings != null)
TaskWindow.getInstance().addTask(new TaskRunnable(C.i18n("settings.modpack.save.task"), TaskWindow.getInstance().addTask(new TaskRunnable(C.i18n("modpack.save.task"),
() -> { () -> {
try { try {
ModpackManager.export(new File((String) settings.get(ModpackInitializationPanel.KEY_MODPACK_LOCATION)), ModpackManager.export(new File((String) settings.get(ModpackInitializationPanel.KEY_MODPACK_LOCATION)),
@@ -1172,7 +1170,7 @@ public final class GameSettingsPanel extends AnimatedPanel implements DropTarget
(String) settings.get(ModpackInitializationPanel.KEY_GAME_VERSION), (String) settings.get(ModpackInitializationPanel.KEY_GAME_VERSION),
((Boolean) settings.get(ModpackInitializationPanel.KEY_SAVE) == false) ? Arrays.asList("saves") : null); ((Boolean) settings.get(ModpackInitializationPanel.KEY_SAVE) == false) ? Arrays.asList("saves") : null);
} catch (IOException | GameException ex) { } catch (IOException | GameException ex) {
MessageBox.Show(C.i18n("settings.modpack.export_error")); MessageBox.Show(C.i18n("modpack.export_error"));
HMCLog.err("Failed to export modpack", ex); HMCLog.err("Failed to export modpack", ex);
} }
})).start(); })).start();

View File

@@ -19,9 +19,9 @@
<Group type="102" attributes="0"> <Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0"> <Group type="102" alignment="0" attributes="0">
<Component id="lblModpackLocation" min="-2" max="-2" attributes="0"/> <Component id="lblModpackLocation" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="175" max="32767" attributes="0"/> <EmptySpace max="32767" attributes="0"/>
<Component id="cboModpackLocation" min="-2" max="-2" attributes="0"/> <Component id="cboModpackLocation" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<Component id="txtModpackLocation" max="32767" attributes="0"/> <Component id="txtModpackLocation" max="32767" attributes="0"/>
@@ -30,8 +30,9 @@
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="lblGameVersion" min="-2" max="-2" attributes="0"/> <Component id="lblGameVersion" min="-2" max="-2" attributes="0"/>
<Component id="chkSave" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="chkSave" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/> <EmptySpace min="0" pref="67" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
@@ -42,19 +43,21 @@
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="92" max="32767" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0"> <Group type="103" groupAlignment="3" attributes="0">
<Component id="lblModpackLocation" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="lblModpackLocation" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="cboModpackLocation" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="cboModpackLocation" alignment="3" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="txtModpackLocation" min="-2" max="-2" attributes="0"/> <Component id="txtModpackLocation" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="29" max="-2" attributes="0"/> <EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="lblGameVersion" min="-2" max="-2" attributes="0"/> <Component id="lblGameVersion" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="cboGameVersion" min="-2" max="-2" attributes="0"/> <Component id="cboGameVersion" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="chkSave" min="-2" max="-2" attributes="0"/> <Component id="chkSave" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="133" max="32767" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
@@ -63,7 +66,7 @@
<Component class="javax.swing.JLabel" name="lblModpackLocation"> <Component class="javax.swing.JLabel" name="lblModpackLocation">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/jackhuang/hellominecraft/launcher/I18N.properties" key="settings.modpack.save" replaceFormat="C.i18n(&quot;{key}&quot;)"/> <ResourceString bundle="org/jackhuang/hellominecraft/launcher/I18N.properties" key="modpack.save" replaceFormat="C.i18n(&quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
@@ -106,5 +109,12 @@
<EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="chkSaveItemStateChanged"/> <EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="chkSaveItemStateChanged"/>
</Events> </Events>
</Component> </Component>
<Component class="javax.swing.JLabel" name="jLabel1">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/jackhuang/hellominecraft/launcher/I18N.properties" key="modpack.warning" replaceFormat="C.i18n(&quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
</SubComponents> </SubComponents>
</Form> </Form>

View File

@@ -17,7 +17,6 @@
*/ */
package org.jackhuang.hellominecraft.launcher.views.modpack; package org.jackhuang.hellominecraft.launcher.views.modpack;
import java.io.File;
import java.util.Map; import java.util.Map;
import javax.swing.DefaultComboBoxModel; import javax.swing.DefaultComboBoxModel;
import javax.swing.JFileChooser; import javax.swing.JFileChooser;
@@ -51,7 +50,7 @@ public class ModpackInitializationPanel extends javax.swing.JPanel {
wizardData.put(KEY_SAVE, false); wizardData.put(KEY_SAVE, false);
configureComboContents(); configureComboContents();
controller.setProblem("Not a valid file location"); controller.setProblem(C.i18n("modpack.not_a_valid_location"));
controller.setForwardNavigationMode(WizardController.MODE_CAN_FINISH); controller.setForwardNavigationMode(WizardController.MODE_CAN_FINISH);
} }
@@ -78,8 +77,9 @@ public class ModpackInitializationPanel extends javax.swing.JPanel {
lblGameVersion = new javax.swing.JLabel(); lblGameVersion = new javax.swing.JLabel();
cboGameVersion = new javax.swing.JComboBox<>(); cboGameVersion = new javax.swing.JComboBox<>();
chkSave = new javax.swing.JCheckBox(); chkSave = new javax.swing.JCheckBox();
jLabel1 = new javax.swing.JLabel();
lblModpackLocation.setText(C.i18n("settings.modpack.save")); // NOI18N lblModpackLocation.setText(C.i18n("modpack.save")); // NOI18N
txtModpackLocation.addCaretListener(new javax.swing.event.CaretListener() { txtModpackLocation.addCaretListener(new javax.swing.event.CaretListener() {
public void caretUpdate(javax.swing.event.CaretEvent evt) { public void caretUpdate(javax.swing.event.CaretEvent evt) {
@@ -109,6 +109,8 @@ public class ModpackInitializationPanel extends javax.swing.JPanel {
} }
}); });
jLabel1.setText(C.i18n("modpack.warning")); // NOI18N
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout); this.setLayout(layout);
layout.setHorizontalGroup( layout.setHorizontalGroup(
@@ -118,42 +120,45 @@ public class ModpackInitializationPanel extends javax.swing.JPanel {
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addComponent(lblModpackLocation) .addComponent(lblModpackLocation)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 175, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(cboModpackLocation)) .addComponent(cboModpackLocation))
.addComponent(txtModpackLocation) .addComponent(txtModpackLocation)
.addComponent(cboGameVersion, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(cboGameVersion, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lblGameVersion) .addComponent(lblGameVersion)
.addComponent(chkSave)) .addComponent(chkSave)
.addGap(0, 0, Short.MAX_VALUE))) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(0, 67, Short.MAX_VALUE)))
.addContainerGap()) .addContainerGap())
); );
layout.setVerticalGroup( layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addContainerGap() .addContainerGap()
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 92, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lblModpackLocation) .addComponent(lblModpackLocation)
.addComponent(cboModpackLocation)) .addComponent(cboModpackLocation))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtModpackLocation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtModpackLocation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(29, 29, 29) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(lblGameVersion) .addComponent(lblGameVersion)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cboGameVersion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cboGameVersion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(chkSave) .addComponent(chkSave)
.addContainerGap(133, Short.MAX_VALUE)) .addContainerGap())
); );
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
private void cboModpackLocationActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cboModpackLocationActionPerformed private void cboModpackLocationActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cboModpackLocationActionPerformed
JFileChooser fc = new JFileChooser(); JFileChooser fc = new JFileChooser();
fc.setFileSelectionMode(JFileChooser.FILES_ONLY); fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
fc.setDialogTitle(C.i18n("settings.modpack.save")); fc.setDialogTitle(C.i18n("modpack.save"));
fc.setMultiSelectionEnabled(false); fc.setMultiSelectionEnabled(false);
fc.setFileFilter(new FileNameExtensionFilter(C.i18n("settings.modpack") + "(*.zip)", "zip")); fc.setFileFilter(new FileNameExtensionFilter(C.i18n("modpack") + "(*.zip)", "zip"));
fc.showSaveDialog(this); fc.showSaveDialog(this);
if (fc.getSelectedFile() != null) if (fc.getSelectedFile() != null)
txtModpackLocation.setText(fc.getSelectedFile().getAbsolutePath()); txtModpackLocation.setText(fc.getSelectedFile().getAbsolutePath());
@@ -163,7 +168,7 @@ public class ModpackInitializationPanel extends javax.swing.JPanel {
wizardData.put(KEY_MODPACK_LOCATION, txtModpackLocation.getText()); wizardData.put(KEY_MODPACK_LOCATION, txtModpackLocation.getText());
if (txtModpackLocation.getText().trim().isEmpty()) if (txtModpackLocation.getText().trim().isEmpty())
controller.setProblem("Please choose a location!!!"); controller.setProblem(C.i18n("modpack.not_a_valid_location"));
else else
controller.setProblem(null); controller.setProblem(null);
}//GEN-LAST:event_txtModpackLocationCaretUpdate }//GEN-LAST:event_txtModpackLocationCaretUpdate
@@ -180,6 +185,7 @@ public class ModpackInitializationPanel extends javax.swing.JPanel {
private javax.swing.JComboBox<String> cboGameVersion; private javax.swing.JComboBox<String> cboGameVersion;
private javax.swing.JButton cboModpackLocation; private javax.swing.JButton cboModpackLocation;
private javax.swing.JCheckBox chkSave; private javax.swing.JCheckBox chkSave;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel lblGameVersion; private javax.swing.JLabel lblGameVersion;
private javax.swing.JLabel lblModpackLocation; private javax.swing.JLabel lblModpackLocation;
private javax.swing.JTextField txtModpackLocation; private javax.swing.JTextField txtModpackLocation;

View File

@@ -22,6 +22,7 @@ import java.util.Map;
import javax.swing.JComponent; import javax.swing.JComponent;
import org.jackhuang.hellominecraft.launcher.core.service.IMinecraftProvider; import org.jackhuang.hellominecraft.launcher.core.service.IMinecraftProvider;
import org.jackhuang.hellominecraft.launcher.core.version.MinecraftVersion; import org.jackhuang.hellominecraft.launcher.core.version.MinecraftVersion;
import org.jackhuang.hellominecraft.utils.C;
import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardBranchController; import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardBranchController;
import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardController; import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardController;
import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardPanelProvider; import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardPanelProvider;
@@ -33,7 +34,7 @@ import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardPanelProvider;
public class ModpackWizard extends WizardBranchController { public class ModpackWizard extends WizardBranchController {
public ModpackWizard(IMinecraftProvider provider) { public ModpackWizard(IMinecraftProvider provider) {
super(new WizardPanelProvider("Modpack Wizard", new String[] { "Settings" }, new String[] { "Select location, version and allow version" }) { super(new WizardPanelProvider(C.i18n("modpack.wizard"), new String[] { C.i18n("modpack.wizard.step.1") }, new String[] { C.i18n("modpack.wizard.step.1.title") }) {
@Override @Override
protected JComponent createPanel(WizardController controller, String id, Map settings) { protected JComponent createPanel(WizardController controller, String id, Map settings) {

View File

@@ -23,16 +23,14 @@ import javax.swing.JOptionPane;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JRootPane; import javax.swing.JRootPane;
import javax.swing.UIManager; import javax.swing.UIManager;
import org.jackhuang.hellominecraft.utils.C;
import org.jackhuang.hellominecraft.utils.views.wizard.api.WizardDisplayer;
import org.jackhuang.hellominecraft.utils.views.wizard.modules.MergeMap; import org.jackhuang.hellominecraft.utils.views.wizard.modules.MergeMap;
import org.jackhuang.hellominecraft.utils.views.wizard.modules.NbBridge;
import org.jackhuang.hellominecraft.utils.views.wizard.spi.DeferredWizardResult; import org.jackhuang.hellominecraft.utils.views.wizard.spi.DeferredWizardResult;
import org.jackhuang.hellominecraft.utils.views.wizard.spi.Summary; import org.jackhuang.hellominecraft.utils.views.wizard.spi.Summary;
import org.jackhuang.hellominecraft.utils.views.wizard.spi.Wizard; import org.jackhuang.hellominecraft.utils.views.wizard.spi.Wizard;
import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardException; import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardException;
import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardObserver; import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardObserver;
import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardPage;
import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardPanel; import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardPanel;
import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardPanelNavResult; import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardPanelNavResult;
@@ -84,9 +82,6 @@ public class NavButtonManager implements ActionListener {
WizardDisplayerImpl parent; WizardDisplayerImpl parent;
String closeString = NbBridge.getString("org/jackhuang/hellominecraft/utils/views/wizard/api/Bundle", // NOI18N
WizardDisplayer.class, "Close"); // NOI18N
boolean suppressMessageDialog = false; boolean suppressMessageDialog = false;
/** /**
* Deferred status of not null means we are waiting for a deferred result to * Deferred status of not null means we are waiting for a deferred result to
@@ -102,44 +97,28 @@ public class NavButtonManager implements ActionListener {
protected void buildButtons(Action helpAction) { protected void buildButtons(Action helpAction) {
next = new JButton(NbBridge.getString("org/jackhuang/hellominecraft/utils/views/wizard/api/Bundle", // NOI18N next = new JButton(C.i18n("wizard.next_>"));
WizardDisplayer.class, "Next_>")); // NOI18N
next.setName(NAME_NEXT); next.setName(NAME_NEXT);
next.setMnemonic(NbBridge.getString("org/jackhuang/hellominecraft/utils/views/wizard/api/Bundle", // NOI18N next.setMnemonic(C.i18n("wizard.next_mnemonic").charAt(0));
WizardDisplayer.class, "Next_mnemonic").charAt(0)); // NOI18N
prev = new JButton(NbBridge.getString("org/jackhuang/hellominecraft/utils/views/wizard/api/Bundle", // NOI18N prev = new JButton(C.i18n("wizard.<_prev"));
WizardDisplayer.class, "<_Prev")); // NOI18N
prev.setName(NAME_PREV); prev.setName(NAME_PREV);
prev.setMnemonic(NbBridge.getString("org/jackhuang/hellominecraft/utils/views/wizard/api/Bundle", // NOI18N prev.setMnemonic(C.i18n("wizard.prev_mnemonic").charAt(0));
WizardDisplayer.class, "Prev_mnemonic").charAt(0)); // NOI18N
finish = new JButton(NbBridge.getString("org/jackhuang/hellominecraft/utils/views/wizard/api/Bundle", // NOI18N finish = new JButton(C.i18n("wizard.finish")); // NOI18N
WizardDisplayer.class, "Finish")); // NOI18N
finish.setName(NAME_FINISH); finish.setName(NAME_FINISH);
finish.setMnemonic(NbBridge.getString("org/jackhuang/hellominecraft/utils/views/wizard/api/Bundle", // NOI18N finish.setMnemonic(C.i18n("wizard.finish_mnemonic").charAt(0));
WizardDisplayer.class, "Finish_mnemonic").charAt(0)); // NOI18N
cancel = new JButton(NbBridge.getString("org/jackhuang/hellominecraft/utils/views/wizard/api/Bundle", // NOI18N cancel = new JButton(C.i18n("wizard.cancel"));
WizardDisplayer.class, "Cancel")); // NOI18N
cancel.setName(NAME_CANCEL); cancel.setName(NAME_CANCEL);
cancel.setMnemonic(NbBridge.getString("org/jackhuang/hellominecraft/utils/views/wizard/api/Bundle", // NOI18N cancel.setMnemonic(C.i18n("wizard.cancel_mnemonic").charAt(0));
WizardDisplayer.class, "Cancel_mnemonic").charAt(0)); // NOI18N
help = new JButton(); help = new JButton();
if (helpAction != null) { if (helpAction != null)
help.setAction(helpAction); help.setAction(helpAction);
if (helpAction.getValue(Action.NAME) == null) { if (helpAction == null || helpAction.getValue(Action.NAME) == null) {
help.setText(NbBridge.getString("org/jackhuang/hellominecraft/utils/views/wizard/api/Bundle", // NOI18N help.setText(C.i18n("wizard.help"));
WizardDisplayer.class, "Help")); // NOI18N help.setMnemonic(C.i18n("wizard.help_mnemonic").charAt(0));
help.setMnemonic(NbBridge.getString("org/jackhuang/hellominecraft/utils/views/wizard/api/Bundle", // NOI18N
WizardDisplayer.class, "Help_mnemonic").charAt(0)); // NOI18N
}
} else {
help.setText(NbBridge.getString("org/jackhuang/hellominecraft/utils/views/wizard/api/Bundle", // NOI18N
WizardDisplayer.class, "Help")); // NOI18N
help.setMnemonic(NbBridge.getString("org/jackhuang/hellominecraft/utils/views/wizard/api/Bundle", // NOI18N
WizardDisplayer.class, "Help_mnemonic").charAt(0)); // NOI18N
} }
next.setDefaultCapable(true); next.setDefaultCapable(true);
@@ -224,24 +203,20 @@ public class NavButtonManager implements ActionListener {
final boolean enableNext = nextStep != null && canContinue && problem == null && !isDeferredResult; final boolean enableNext = nextStep != null && canContinue && problem == null && !isDeferredResult;
final boolean enablePrevious = wizard.getPreviousStep() != null && !isDeferredResult; final boolean enablePrevious = wizard.getPreviousStep() != null && !isDeferredResult;
final Runnable runnable = new Runnable() { final Runnable runnable = () -> {
next.setEnabled(enableNext);
public void run() { prev.setEnabled(enablePrevious);
next.setEnabled(enableNext); finish.setEnabled(enableFinish);
prev.setEnabled(enablePrevious); JRootPane root = next.getRootPane();
finish.setEnabled(enableFinish); if (root != null)
JRootPane root = next.getRootPane(); if (next.isEnabled())
if (root != null) root.setDefaultButton(next);
if (next.isEnabled()) else if (finish.isEnabled())
root.setDefaultButton(next); root.setDefaultButton(finish);
else if (finish.isEnabled()) else if (prev.isEnabled())
root.setDefaultButton(finish); root.setDefaultButton(prev);
else if (prev.isEnabled()) else
root.setDefaultButton(prev); root.setDefaultButton(null);
else
root.setDefaultButton(null);
}
}; };
if (EventQueue.isDispatchThread()) if (EventQueue.isDispatchThread())
@@ -268,34 +243,42 @@ public class NavButtonManager implements ActionListener {
return; return;
} }
if (NAME_NEXT.equals(name)) if (null != name)
processNext(); switch (name) {
else if (NAME_PREV.equals(name)) case NAME_NEXT:
processPrev(); processNext();
else if (NAME_FINISH.equals(name)) break;
processFinish(event); case NAME_PREV:
else if (NAME_CLOSE.equals(name)) processPrev();
processClose(event); break;
case NAME_FINISH:
processFinish(event);
break;
case NAME_CLOSE:
processClose(event);
// else ignore, we don't know it
break;
default:
break;
}
// else ignore, we don't know it // else ignore, we don't know it
parent.updateProblem(); parent.updateProblem();
} }
void deferredResultFailed(final boolean canGoBack) { void deferredResultFailed(final boolean canGoBack) {
final Runnable runnable = new Runnable() { final Runnable runnable = () -> {
public void run() { if (!canGoBack)
if (!canGoBack) getCancel().setText(getCloseString());
getCancel().setText(closeString); getPrev().setEnabled(true);
getPrev().setEnabled(true); getNext().setEnabled(false);
getNext().setEnabled(false); getCancel().setEnabled(true);
getCancel().setEnabled(true); getFinish().setEnabled(false);
getFinish().setEnabled(false);
if (NAME_CLOSE.equals(deferredStatus)) { if (NAME_CLOSE.equals(deferredStatus)) {
// no action // no action
} else } else
deferredStatus = DEFERRED_FAILED + deferredStatus; deferredStatus = DEFERRED_FAILED + deferredStatus;
}
}; };
if (EventQueue.isDispatchThread()) if (EventQueue.isDispatchThread())
runnable.run(); runnable.run();
@@ -326,23 +309,31 @@ public class NavButtonManager implements ActionListener {
return; return;
} }
if (NAME_NEXT.equals(name)) switch (name) {
case NAME_NEXT:
processNextProceed(o); processNextProceed(o);
else if (NAME_PREV.equals(name)) break;
// else ignore, we don't know it
case NAME_PREV:
processPrevProceed(o); processPrevProceed(o);
else if (NAME_CANCEL.equals(name)) break;
case NAME_CANCEL:
processCancel(o instanceof ActionEvent ? (ActionEvent) o processCancel(o instanceof ActionEvent ? (ActionEvent) o
: null, false); : null, false);
else if (NAME_FINISH.equals(name)) break;
case NAME_FINISH:
// allowFinish on the "down" click of the finish button // allowFinish on the "down" click of the finish button
processFinishProceed(o); processFinishProceed(o);
else if (NAME_CLOSE.equals(name)) { break;
case NAME_CLOSE:
// the "up" click of the finish button: wizard.finish was a deferred result // the "up" click of the finish button: wizard.finish was a deferred result
Window dlg = getWindow(); Window dlg = getWindow();
dlg.setVisible(false); dlg.setVisible(false);
dlg.dispose(); dlg.dispose();
break;
default:
break;
} }
// else ignore, we don't know it
parent.updateProblem(); parent.updateProblem();
} }
@@ -484,14 +475,10 @@ public class NavButtonManager implements ActionListener {
curr = settings.popAndCalve(); curr = settings.popAndCalve();
settings.push(id); settings.push(id);
parent.navigateTo(id); parent.navigateTo(id);
return;
} catch (NoSuchElementException ex) { } catch (NoSuchElementException ex) {
IllegalStateException e = new IllegalStateException("Exception " IllegalStateException e = new IllegalStateException("Exception "
+ // NOI18N + "said to return to " + id + " but no such "
"said to return to " + id + " but no such " + "step found", ex);
+ // NOI18N
"step found"); // NOI18N
e.initCause(ex);
throw e; throw e;
} }
} }
@@ -504,11 +491,9 @@ public class NavButtonManager implements ActionListener {
Wizard wizard = parent.getWizard(); Wizard wizard = parent.getWizard();
MergeMap settings = parent.getSettings(); MergeMap settings = parent.getSettings();
// System.err.println("ProcessCancel " + reallyCancel + " receiver " + parent.receiver); boolean closeWindow;
boolean closeWindow = false;
if (reallyCancel && parent.cancel()) { if (reallyCancel && parent.cancel()) {
// System.err.println("DO CANCEL");
logger.fine("calling wizard cancel method on " + wizard); logger.fine("calling wizard cancel method on " + wizard);
wizard.cancel(settings); wizard.cancel(settings);
return; return;
@@ -545,9 +530,8 @@ public class NavButtonManager implements ActionListener {
if (window != null && parent.receiver == null && window instanceof JDialog) if (window != null && parent.receiver == null && window instanceof JDialog)
((JDialog) window).getRootPane().setDefaultButton(cancel); ((JDialog) window).getRootPane().setDefaultButton(cancel);
cancel.setText(closeString); // NOI18N cancel.setText(getCloseString()); // NOI18N
cancel.setMnemonic(NbBridge.getString("org/jackhuang/hellominecraft/utils/views/wizard/api/Bundle", // NOI18N cancel.setMnemonic(C.i18n("wizard.close_mnemonic").charAt(0));
WizardDisplayer.class, "Close_mnemonic").charAt(0)); // NOI18N
cancel.setName(NAME_CLOSE); cancel.setName(NAME_CLOSE);
deferredStatus = null; // ?? should summary be different deferredStatus = null; // ?? should summary be different
} }
@@ -565,7 +549,7 @@ public class NavButtonManager implements ActionListener {
} }
public String getCloseString() { public String getCloseString() {
return closeString; return C.i18n("wizard.close");
} }
public Window getWindow() { public Window getWindow() {
@@ -617,26 +601,22 @@ public class NavButtonManager implements ActionListener {
} }
public void navigabilityChanged(final Wizard wizard) { public void navigabilityChanged(final Wizard wizard) {
final Runnable runnable = new Runnable() { final Runnable runnable = () -> {
if (wizard.isBusy()) {
public void run() { next.setEnabled(false);
if (wizard.isBusy()) { prev.setEnabled(false);
next.setEnabled(false); finish.setEnabled(false);
prev.setEnabled(false); cancel.setEnabled(false);
finish.setEnabled(false); parent.getOuterPanel().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
cancel.setEnabled(false); wasBusy = true;
parent.getOuterPanel().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); return;
wasBusy = true; } else if (wasBusy) {
return; cancel.setEnabled(true);
} else if (wasBusy) { parent.getOuterPanel().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
cancel.setEnabled(true);
parent.getOuterPanel().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
configureNavigationButtons(wizard, prev, next, finish);
parent.updateProblem();
} }
configureNavigationButtons(wizard, prev, next, finish);
parent.updateProblem();
}; };
if (EventQueue.isDispatchThread()) if (EventQueue.isDispatchThread())
runnable.run(); runnable.run();

View File

@@ -11,13 +11,10 @@ import javax.swing.ImageIcon;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JProgressBar; import javax.swing.JProgressBar;
import javax.swing.border.EmptyBorder; import javax.swing.border.EmptyBorder;
import org.jackhuang.hellominecraft.utils.C;
import org.jackhuang.hellominecraft.utils.views.wizard.api.WizardDisplayer;
import org.jackhuang.hellominecraft.utils.views.wizard.modules.InstructionsPanelImpl;
import org.jackhuang.hellominecraft.utils.views.wizard.modules.NbBridge;
import org.jackhuang.hellominecraft.utils.views.wizard.spi.ResultProgressHandle; import org.jackhuang.hellominecraft.utils.views.wizard.spi.ResultProgressHandle;
import org.jackhuang.hellominecraft.utils.views.wizard.spi.Summary; import org.jackhuang.hellominecraft.utils.views.wizard.spi.Summary;
import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardPage;
/** /**
* Show progress bar for deferred results, with a label showing percent done and * Show progress bar for deferred results, with a label showing percent done and
@@ -75,49 +72,40 @@ public class NavProgress implements ResultProgressHandle {
} }
public void setProgress(final String description, final int currentStep, final int totalSteps) { public void setProgress(final String description, final int currentStep, final int totalSteps) {
Runnable r = new Runnable() { invoke(() -> {
public void run() { lbl.setText(description == null ? " " : description); // NOI18N
lbl.setText(description == null ? " " : description); // NOI18N setProgress(currentStep, totalSteps);
setProgress(currentStep, totalSteps); });
}
};
invoke(r);
} }
public void setProgress(final int currentStep, final int totalSteps) { public void setProgress(final int currentStep, final int totalSteps) {
Runnable r = new Runnable() { invoke(() -> {
public void run() { if (totalSteps == -1)
if (totalSteps == -1) progressBar.setIndeterminate(true);
progressBar.setIndeterminate(true); else {
else { if (currentStep > totalSteps || currentStep < 0) {
if (currentStep > totalSteps || currentStep < 0) { if (currentStep == -1 && totalSteps == -1)
if (currentStep == -1 && totalSteps == -1) return;
return; throw new IllegalArgumentException("Bad step values: "
throw new IllegalArgumentException("Bad step values: " // NOI18N + currentStep + " out of " + totalSteps);
+ currentStep + " out of " + totalSteps); // NOI18N
}
progressBar.setIndeterminate(false);
progressBar.setMaximum(totalSteps);
progressBar.setValue(currentStep);
} }
progressBar.setIndeterminate(false);
setUseBusy(false); progressBar.setMaximum(totalSteps);
progressBar.setValue(currentStep);
} }
};
invoke(r); setUseBusy(false);
});
} }
public void setBusy(final String description) { public void setBusy(final String description) {
Runnable r = new Runnable() { invoke(() -> {
public void run() { lbl.setText(description == null ? " " : description);
lbl.setText(description == null ? " " : description); // NOI18N
progressBar.setIndeterminate(true); progressBar.setIndeterminate(true);
setUseBusy(true); setUseBusy(true);
} });
};
invoke(r);
} }
protected void setUseBusy(boolean useBusy) { protected void setUseBusy(boolean useBusy) {
@@ -137,7 +125,7 @@ public class NavProgress implements ResultProgressHandle {
private void ensureBusyInitialized() { private void ensureBusyInitialized() {
if (busy.getIcon() == null) { if (busy.getIcon() == null) {
URL url = getClass().getResource("busy.gif"); URL url = getClass().getResource("/org/jackhuang/hellominecraft/busy.gif");
Icon icon = new ImageIcon(url); Icon icon = new ImageIcon(url);
busy.setIcon(icon); busy.setIcon(icon);
} }
@@ -149,29 +137,24 @@ public class NavProgress implements ResultProgressHandle {
else else
try { try {
EventQueue.invokeAndWait(r); EventQueue.invokeAndWait(r);
} catch (InvocationTargetException ex) { } catch (InvocationTargetException | InterruptedException ex) {
ex.printStackTrace(); ex.printStackTrace();
logger.severe("Error invoking operation " + ex.getClass().getName() + " " + ex.getMessage()); logger.severe("Error invoking operation " + ex.getClass().getName() + " " + ex.getMessage());
} catch (InterruptedException ex) {
logger.severe("Error invoking operation " + ex.getClass().getName() + " " + ex.getMessage());
ex.printStackTrace();
} }
} }
public void finished(final Object o) { public void finished(final Object o) {
isRunning = false; isRunning = false;
Runnable r = new Runnable() { Runnable r = () -> {
public void run() { if (o instanceof Summary) {
if (o instanceof Summary) { Summary summary = (Summary) o;
Summary summary = (Summary) o; parent.handleSummary(summary);
parent.handleSummary(summary); parent.setWizardResult(summary.getResult());
parent.setWizardResult(summary.getResult()); } else if (parent.getDeferredResult() != null) {
} else if (parent.getDeferredResult() != null) { parent.setWizardResult(o);
parent.setWizardResult(o);
// handle result based on which button was pushed // handle result based on which button was pushed
parent.getButtonManager().deferredResultFinished(o); parent.getButtonManager().deferredResultFinished(o);
}
} }
}; };
invoke(r); invoke(r);
@@ -181,19 +164,14 @@ public class NavProgress implements ResultProgressHandle {
failMessage = message; failMessage = message;
isRunning = false; isRunning = false;
Runnable r = new Runnable() { Runnable r = () -> {
public void run() { // cheap word wrap
// cheap word wrap JLabel comp = new JLabel("<html><body>" + message); // NOI18N
JLabel comp = new JLabel("<html><body>" + message); // NOI18N comp.setBorder(new EmptyBorder(5, 5, 5, 5));
comp.setBorder(new EmptyBorder(5, 5, 5, 5)); parent.setCurrentWizardPanel(comp);
parent.setCurrentWizardPanel(comp); parent.getTtlLabel().setText(C.i18n("wizard.failed"));
parent.getTtlLabel().setText( NavButtonManager bm = parent.getButtonManager();
NbBridge bm.deferredResultFailed(canGoBack);
.getString("org/netbeans/api/wizard/Bundle", // NOI18N
WizardDisplayer.class, "Failed")); // NOI18N
NavButtonManager bm = parent.getButtonManager();
bm.deferredResultFailed(canGoBack);
}
}; };
invoke(r); invoke(r);
} }

View File

@@ -1,17 +1,17 @@
/* The contents of this file are subject to the terms of the Common Development /*
and Distribution License (the License). You may not use this file except in * The contents of this file are subject to the terms of the Common Development
compliance with the License. * and Distribution License (the License). You may not use this file except in
You can obtain a copy of the License at http://www.netbeans.org/cddl.html * compliance with the License.
or http://www.netbeans.org/cddl.txt. * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
When distributing Covered Code, include this CDDL Header Notice in each file * or http://www.netbeans.org/cddl.txt.
and include the License file at http://www.netbeans.org/cddl.txt. * When distributing Covered Code, include this CDDL Header Notice in each file
If applicable, add the following below the CDDL Header, with the fields * and include the License file at http://www.netbeans.org/cddl.txt.
enclosed by brackets [] replaced by your own identifying information: * If applicable, add the following below the CDDL Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
Written by Stanley@StanleyKnutson.com based on code from Tim B. *
* Written by Stanley@StanleyKnutson.com based on code from Tim B.
*
*/ */
package org.jackhuang.hellominecraft.utils.views.wizard.api.displayer; package org.jackhuang.hellominecraft.utils.views.wizard.api.displayer;
import java.awt.BorderLayout; import java.awt.BorderLayout;
@@ -51,11 +51,12 @@ import javax.swing.WindowConstants;
import javax.swing.border.Border; import javax.swing.border.Border;
import javax.swing.border.CompoundBorder; import javax.swing.border.CompoundBorder;
import javax.swing.border.EmptyBorder; import javax.swing.border.EmptyBorder;
import org.jackhuang.hellominecraft.utils.C;
import org.jackhuang.hellominecraft.utils.logging.HMCLog;
import org.jackhuang.hellominecraft.utils.views.wizard.api.WizardDisplayer; import org.jackhuang.hellominecraft.utils.views.wizard.api.WizardDisplayer;
import org.jackhuang.hellominecraft.utils.views.wizard.api.WizardResultReceiver; import org.jackhuang.hellominecraft.utils.views.wizard.api.WizardResultReceiver;
import org.jackhuang.hellominecraft.utils.views.wizard.modules.InstructionsPanelImpl; import org.jackhuang.hellominecraft.utils.views.wizard.modules.InstructionsPanelImpl;
import org.jackhuang.hellominecraft.utils.views.wizard.modules.MergeMap; import org.jackhuang.hellominecraft.utils.views.wizard.modules.MergeMap;
import org.jackhuang.hellominecraft.utils.views.wizard.modules.NbBridge;
import org.jackhuang.hellominecraft.utils.views.wizard.spi.DeferredWizardResult; import org.jackhuang.hellominecraft.utils.views.wizard.spi.DeferredWizardResult;
import org.jackhuang.hellominecraft.utils.views.wizard.spi.ResultProgressHandle; import org.jackhuang.hellominecraft.utils.views.wizard.spi.ResultProgressHandle;
import org.jackhuang.hellominecraft.utils.views.wizard.spi.Summary; import org.jackhuang.hellominecraft.utils.views.wizard.spi.Summary;
@@ -64,95 +65,85 @@ import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardPanel;
/** /**
* Default implementation of WizardDisplayer. * Default implementation of WizardDisplayer.
* <b><i><font color="red">This class is NOT AN API CLASS. There is no * <b><i><font color="red">This class is NOT AN API CLASS. There is no
* commitment that it will remain backward compatible or even exist in the * commitment that it will remain backward compatible or even exist in the
* future. The API of this library is in the packages <code>org.netbeans.api.wizard</code> * future. The API of this library is in the packages
* and <code>org.netbeans.spi.wizard</code></font></i></b>. <p>Use * <code>org.netbeans.api.wizard</code>
* and <code>org.netbeans.spi.wizard</code></font></i></b>.
* <p>
* Use
* <code>WizardDisplayer.showWizard()</code> or its other static methods to * <code>WizardDisplayer.showWizard()</code> or its other static methods to
* display wizards in a way which will continue to work over time. * display wizards in a way which will continue to work over time.
*
* @author stanley@StanleyKnutson.com * @author stanley@StanleyKnutson.com
* @author Tim Boudreau * @author Tim Boudreau
*/ */
public class WizardDisplayerImpl extends WizardDisplayer public class WizardDisplayerImpl extends WizardDisplayer {
{
ResultProgressHandle progress = null;
ResultProgressHandle progress = null; JLabel ttlLabel = null;
JLabel ttlLabel = null; JPanel ttlPanel = null;
JPanel ttlPanel = null; Wizard wizard = null;
Wizard wizard = null; JPanel outerPanel = null;
JPanel outerPanel = null; NavButtonManager buttonManager = null;
NavButtonManager buttonManager = null; InstructionsPanel instructions = null;
InstructionsPanel instructions = null; MergeMap settings = null;
MergeMap settings = null; JPanel inner = null;
JPanel inner = null; JLabel problem = null;
JLabel problem = null; Object wizardResult = null;
Object wizardResult = null; WizardResultReceiver receiver = null;
WizardResultReceiver receiver = null;
/** /**
* WizardPanel is the panel returned as the panel to display. Often a * WizardPanel is the panel returned as the panel to display. Often a
* subclass of WizardPanel * subclass of WizardPanel
*/ */
JComponent wizardPanel = null; JComponent wizardPanel = null;
boolean inSummary = false; boolean inSummary = false;
DeferredWizardResult deferredResult = null; DeferredWizardResult deferredResult = null;
/** /**
* Default constructor used by WizardDisplayer static methods. * Default constructor used by WizardDisplayer static methods.
* *
*/ */
public WizardDisplayerImpl() public WizardDisplayerImpl() {
{
} }
protected void buildStepTitle() protected void buildStepTitle() {
{
ttlLabel = new JLabel(wizard.getStepDescription(wizard.getAllSteps()[0])); ttlLabel = new JLabel(wizard.getStepDescription(wizard.getAllSteps()[0]));
ttlLabel.setBorder(BorderFactory.createCompoundBorder(BorderFactory ttlLabel.setBorder(BorderFactory.createCompoundBorder(BorderFactory
.createEmptyBorder(5, 5, 12, 5), BorderFactory.createMatteBorder(0, 0, 1, 0, UIManager .createEmptyBorder(5, 5, 12, 5), BorderFactory.createMatteBorder(0, 0, 1, 0, UIManager
.getColor("textText")))); // NOI18N .getColor("textText")))); // NOI18N
ttlPanel = new JPanel() ttlPanel = new JPanel() {
{ public void doLayout() {
public void doLayout()
{
Dimension d = ttlLabel.getPreferredSize(); Dimension d = ttlLabel.getPreferredSize();
if (ttlLabel.getComponentOrientation() == ComponentOrientation.RIGHT_TO_LEFT) if (ttlLabel.getComponentOrientation() == ComponentOrientation.RIGHT_TO_LEFT)
{
ttlLabel.setBounds(getWidth() - d.width, 0, getWidth(), d.height); ttlLabel.setBounds(getWidth() - d.width, 0, getWidth(), d.height);
}
else else
{
ttlLabel.setBounds(0, 0, getWidth(), d.height); ttlLabel.setBounds(0, 0, getWidth(), d.height);
}
} }
public Dimension getPreferredSize() public Dimension getPreferredSize() {
{
return ttlLabel.getPreferredSize(); return ttlLabel.getPreferredSize();
} }
}; };
ttlPanel.add(ttlLabel); ttlPanel.add(ttlLabel);
Font f = ttlLabel.getFont(); Font f = ttlLabel.getFont();
if (f == null) if (f == null)
{
f = UIManager.getFont("controlFont"); // NOI18N f = UIManager.getFont("controlFont"); // NOI18N
} if (f != null) {
if (f != null)
{
f = f.deriveFont(Font.BOLD); f = f.deriveFont(Font.BOLD);
ttlLabel.setFont(f); ttlLabel.setFont(f);
} }
@@ -161,33 +152,28 @@ public class WizardDisplayerImpl extends WizardDisplayer
/** /**
* Show a wizard * Show a wizard
* *
* @param awizard is the wizard to be displayed * @param awizard is the wizard to be displayed
* @param bounds for display, may be null for default of 0,0,400,600. * @param bounds for display, may be null for default of
* 0,0,400,600.
* @param helpAction * @param helpAction
* @param initialProperties - initial values for the map * @param initialProperties - initial values for the map
*
* @return value of the 'finish' processing * @return value of the 'finish' processing
* @see org.netbeans.api.wizard.WizardDisplayer#show(org.netbeans.spi.wizard.Wizard, java.awt.Rectangle, javax.swing.Action, java.util.Map) *
* @see
* org.netbeans.api.wizard.WizardDisplayer#show(org.netbeans.spi.wizard.Wizard,
* java.awt.Rectangle, javax.swing.Action, java.util.Map)
*/ */
private JPanel createOuterPanel(final Wizard awizard, Rectangle bounds, Action helpAction, private JPanel createOuterPanel(final Wizard awizard, Rectangle bounds, Action helpAction,
Map initialProperties) Map initialProperties) {
{
this.wizard = awizard; this.wizard = awizard;
outerPanel = new JPanel(); outerPanel = new JPanel();
// apply default size
// we don't enforce any maximum size
if (bounds == null)
{
bounds = new Rectangle(0,0, 600,400);
}
if (wizard.getAllSteps().length == 0) if (wizard.getAllSteps().length == 0)
{
throw new IllegalArgumentException("Wizard has no steps"); // NOI18N throw new IllegalArgumentException("Wizard has no steps"); // NOI18N
}
// initialize the ttl* stuff // initialize the ttl* stuff
buildStepTitle(); buildStepTitle();
@@ -195,17 +181,16 @@ public class WizardDisplayerImpl extends WizardDisplayer
buttonManager = new NavButtonManager(this); buttonManager = new NavButtonManager(this);
outerPanel.setLayout(new BorderLayout()); outerPanel.setLayout(new BorderLayout());
Action kbdCancel = new AbstractAction() { Action kbdCancel = new AbstractAction() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
JButton b = buttonManager.getCancel(); JButton b = buttonManager.getCancel();
if (b.isEnabled()) { if (b.isEnabled())
b.doClick(); b.doClick();
}
} }
}; };
outerPanel.getInputMap(outerPanel.WHEN_IN_FOCUSED_WINDOW).put( outerPanel.getInputMap(JPanel.WHEN_IN_FOCUSED_WINDOW).put(
KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "cancel"); //NOI18N KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "cancel"); //NOI18N
outerPanel.getActionMap().put("cancel", kbdCancel); //NOI18N outerPanel.getActionMap().put("cancel", kbdCancel); //NOI18N
instructions = createInstructionsPanel(); instructions = createInstructionsPanel();
@@ -232,81 +217,67 @@ public class WizardDisplayerImpl extends WizardDisplayer
// introduce the initial properties as if they had been set on page 1 // introduce the initial properties as if they had been set on page 1
// even though they may be defaults for page 2 // even though they may be defaults for page 2
if (initialProperties != null) if (initialProperties != null)
{
settings.putAll(initialProperties); settings.putAll(initialProperties);
}
wizardPanel = wizard.navigatingTo(first, settings); wizardPanel = wizard.navigatingTo(first, settings);
String desc = wizard.getLongDescription (first); String desc = wizard.getLongDescription(first);
if (desc != null) { if (desc != null)
ttlLabel.setText (desc); ttlLabel.setText(desc);
}
inner.add(wizardPanel, BorderLayout.CENTER); inner.add(wizardPanel, BorderLayout.CENTER);
buttonManager.initializeNavigation(); buttonManager.initializeNavigation();
return outerPanel; return outerPanel;
} }
protected InstructionsPanel createInstructionsPanel() { protected InstructionsPanel createInstructionsPanel() {
return new InstructionsPanelImpl (wizard); return new InstructionsPanelImpl(wizard);
} }
public void install (Container c, Object layoutConstraint, Wizard awizard, public void install(Container c, Object layoutConstraint, Wizard awizard,
Action helpAction, Map initialProperties, WizardResultReceiver receiver) { Action helpAction, Map initialProperties, WizardResultReceiver receiver) {
JPanel pnl = createOuterPanel (awizard, new Rectangle(), helpAction, initialProperties); JPanel pnl = createOuterPanel(awizard, new Rectangle(), helpAction, initialProperties);
if (layoutConstraint != null) { if (layoutConstraint != null)
if (c instanceof RootPaneContainer) { if (c instanceof RootPaneContainer)
((RootPaneContainer) c).getContentPane().add (pnl, layoutConstraint); ((RootPaneContainer) c).getContentPane().add(pnl, layoutConstraint);
} else { else
c.add (pnl, layoutConstraint); c.add(pnl, layoutConstraint);
} else if (c instanceof RootPaneContainer)
} else { ((RootPaneContainer) c).getContentPane().add(pnl);
if (c instanceof RootPaneContainer) { else
((RootPaneContainer) c).getContentPane().add (pnl); c.add(pnl);
} else {
c.add (pnl);
}
}
this.receiver = receiver; this.receiver = receiver;
} }
private static boolean warned; private static boolean warned;
public Object show(final Wizard awizard, Rectangle bounds, Action helpAction, public Object show(final Wizard awizard, Rectangle bounds, Action helpAction,
Map initialProperties) { Map initialProperties) {
if (!EventQueue.isDispatchThread() && !warned) { if (!EventQueue.isDispatchThread() && !warned) {
Logger.getLogger(WizardDisplayerImpl.class.getName()).log(Level.WARNING, Logger.getLogger(WizardDisplayerImpl.class.getName()).log(Level.WARNING,
"show() should be called from the AWT Event Thread. This " "show() should be called from the AWT Event Thread. This "
+ "call may deadlock - c.f. " + "call may deadlock - c.f. "
+ "http://java.net/jira/browse/WIZARD-33", new Throwable()); + "http://java.net/jira/browse/WIZARD-33", new Throwable());
warned = true; warned = true;
} }
createOuterPanel (awizard, bounds, helpAction, initialProperties); createOuterPanel(awizard, bounds, helpAction, initialProperties);
Object result = showInDialog(bounds); Object result = showInDialog(bounds);
return result; return result;
} }
protected JDialog createDialog() protected JDialog createDialog() {
{
JDialog dlg; JDialog dlg;
Object o = findLikelyOwnerWindow(); Object o = findLikelyOwnerWindow();
if (o instanceof Frame) if (o instanceof Frame)
{
dlg = new JDialog((Frame) o); dlg = new JDialog((Frame) o);
}
else if (o instanceof Dialog) else if (o instanceof Dialog)
{
dlg = new JDialog((Dialog) o); dlg = new JDialog((Dialog) o);
}
else else
{
dlg = new JDialog(); dlg = new JDialog();
}
return dlg; return dlg;
} }
protected Object showInDialog(Rectangle bounds) protected Object showInDialog(Rectangle bounds) {
{
// TODO: add flag for "showInFrame" // TODO: add flag for "showInFrame"
JDialog dlg = createDialog(); JDialog dlg = createDialog();
@@ -318,45 +289,28 @@ public class WizardDisplayerImpl extends WizardDisplayer
dlg.getContentPane().setLayout(new BorderLayout()); dlg.getContentPane().setLayout(new BorderLayout());
dlg.getContentPane().add(outerPanel, BorderLayout.CENTER); dlg.getContentPane().add(outerPanel, BorderLayout.CENTER);
if (bounds != null) if (bounds != null)
{
dlg.setBounds(bounds); dlg.setBounds(bounds);
}
else else
{
dlg.pack(); dlg.pack();
}
dlg.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); dlg.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
dlg.addWindowListener(new WindowAdapter() dlg.addWindowListener(new WindowAdapter() {
{ public void windowClosing(WindowEvent e) {
public void windowClosing(WindowEvent e) if (!(e.getWindow() instanceof JDialog))
{
if (!(e.getWindow() instanceof JDialog)) {
return; return;
}
JDialog dlg = (JDialog) e.getWindow(); JDialog dlg = (JDialog) e.getWindow();
boolean dontClose = false; boolean dontClose = false;
if (!wizard.isBusy()) if (!wizard.isBusy()) {
{
DeferredWizardResult defResult; DeferredWizardResult defResult;
synchronized(WizardDisplayerImpl.this) { synchronized (WizardDisplayerImpl.this) {
defResult = deferredResult; defResult = deferredResult;
} }
try try {
{
if (defResult != null && defResult.canAbort()) if (defResult != null && defResult.canAbort())
{
defResult.abort(); defResult.abort();
}
else if (defResult != null && !defResult.canAbort()) else if (defResult != null && !defResult.canAbort())
{
dontClose = true; dontClose = true;
return; } finally {
} if (!dontClose && wizard.cancel(settings)) {
}
finally
{
if (!dontClose && wizard.cancel(settings))
{
dlg.setVisible(false); dlg.setVisible(false);
dlg.dispose(); dlg.dispose();
} }
@@ -380,63 +334,58 @@ public class WizardDisplayerImpl extends WizardDisplayer
return wizardResult; return wizardResult;
} }
private Window findLikelyOwnerWindow() private Window findLikelyOwnerWindow() {
{
return KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusedWindow(); return KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusedWindow();
} }
/** /**
* Return the current wizard panel, or null if the currently displayed page * Return the current wizard panel, or null if the currently displayed page
* is not a WizardPanel. * is not a WizardPanel.
* *
* @return * @return
*/ */
public WizardPanel getCurrentWizardPanel() public WizardPanel getCurrentWizardPanel() {
{
JComponent comp = wizardPanel; JComponent comp = wizardPanel;
if (comp instanceof WizardPanel) if (comp instanceof WizardPanel)
{
return (WizardPanel) comp; return (WizardPanel) comp;
}
return null; return null;
} }
public String getCurrentStep() public String getCurrentStep() {
{
return settings.currID(); return settings.currID();
} }
// available in the package only // available in the package only
static void checkLegalNavMode(int i) static void checkLegalNavMode(int i) {
{ switch (i) {
switch (i) case Wizard.MODE_CAN_CONTINUE:
{ case Wizard.MODE_CAN_CONTINUE_OR_FINISH:
case Wizard.MODE_CAN_CONTINUE: case Wizard.MODE_CAN_FINISH:
case Wizard.MODE_CAN_CONTINUE_OR_FINISH: return;
case Wizard.MODE_CAN_FINISH: default:
return; throw new IllegalArgumentException("Illegal forward "
default: + // NOI18N
throw new IllegalArgumentException("Illegal forward " + // NOI18N "navigation mode: " + i); // NOI18N
"navigation mode: " + i); // NOI18N
} }
} }
/* /*
* private static final class LDlg extends JDialog { public LDlg() { * private static final class LDlg extends JDialog { public LDlg() {
* } public LDlg (Frame frame) { super (frame); } * } public LDlg (Frame frame) { super (frame); }
* *
* public LDlg (Dialog dlg) { super (dlg); } * public LDlg (Dialog dlg) { super (dlg); }
* *
* public void setVisible (boolean val) { if (!val) { Thread.dumpStack(); } * public void setVisible (boolean val) { if (!val) { Thread.dumpStack(); }
* super.setVisible (val); } } * super.setVisible (val); } }
*/ */
/**
/**
* Set the currently displayed panel. * Set the currently displayed panel.
* @parm comp is can be anything - it is not required to be a WizardPage or WizardPanel *
* */ * @parm comp is can be anything - it is not required to be a WizardPage or
public void setCurrentWizardPanel(JComponent comp) * WizardPanel
{ *
*/
public void setCurrentWizardPanel(JComponent comp) {
inner.add(comp, BorderLayout.CENTER); inner.add(comp, BorderLayout.CENTER);
inner.remove(wizardPanel); inner.remove(wizardPanel);
wizardPanel = comp; wizardPanel = comp;
@@ -445,37 +394,30 @@ public class WizardDisplayerImpl extends WizardDisplayer
inner.repaint(); inner.repaint();
comp.requestFocus(); comp.requestFocus();
if (!inSummary) if (!inSummary)
{
buttonManager.updateButtons(); buttonManager.updateButtons();
}
} }
void handleSummary(Summary summary) void handleSummary(Summary summary) {
{
inSummary = true; inSummary = true;
instructions.setInSummaryPage(true); instructions.setInSummaryPage(true);
JComponent summaryComp = (JComponent) summary.getSummaryComponent(); // XXX JComponent summaryComp = (JComponent) summary.getSummaryComponent(); // XXX
if (summaryComp.getBorder() != null) if (summaryComp.getBorder() != null) {
{
CompoundBorder b = new CompoundBorder(new EmptyBorder(5, 5, 5, 5), summaryComp CompoundBorder b = new CompoundBorder(new EmptyBorder(5, 5, 5, 5), summaryComp
.getBorder()); .getBorder());
summaryComp.setBorder(b); summaryComp.setBorder(b);
} }
setCurrentWizardPanel((JComponent) summaryComp); // XXX setCurrentWizardPanel((JComponent) summaryComp); // XXX
ttlLabel.setText(NbBridge.getString("org/netbeans/api/wizard/Bundle", // NOI18N ttlLabel.setText(C.i18n("wizard.summary"));
WizardDisplayer.class, "Summary")); // NOI18N
getButtonManager().setSummaryShowingMode(); getButtonManager().setSummaryShowingMode();
summaryComp.requestFocus(); summaryComp.requestFocus();
} }
protected ResultProgressHandle createProgressDisplay (boolean isUseBusy) protected ResultProgressHandle createProgressDisplay(boolean isUseBusy) {
{
return new NavProgress(this, isUseBusy); return new NavProgress(this, isUseBusy);
} }
void handleDeferredWizardResult(final DeferredWizardResult r, final boolean inSummary) void handleDeferredWizardResult(final DeferredWizardResult r, final boolean inSummary) {
{
synchronized (this) { synchronized (this) {
deferredResult = r; deferredResult = r;
} }
@@ -484,56 +426,30 @@ public class WizardDisplayerImpl extends WizardDisplayer
Container inst = instructions.getComponent(); Container inst = instructions.getComponent();
progress.addProgressComponents(inst); progress.addProgressComponents(inst);
inst.invalidate(); inst.invalidate();
if (inst instanceof JComponent) { if (inst instanceof JComponent)
((JComponent)inst).revalidate(); ((JComponent) inst).revalidate();
}
inst.repaint(); inst.repaint();
Runnable run = new Runnable() Runnable run = new Runnable() {
{ public void run() {
public void run()
{
if (!EventQueue.isDispatchThread()) if (!EventQueue.isDispatchThread())
{ try {
try EventQueue.invokeLater(() -> buttonManager.getWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)));
{
EventQueue.invokeLater (new Runnable() {
public void run() {
buttonManager.getWindow()
.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
}
});
r.start(settings, progress); r.start(settings, progress);
if (progress.isRunning()) if (progress.isRunning())
{ progress.failed("Start method did not inidicate "
progress.failed("Start method did not inidicate " + + "failure or finished in " + r, false);
"failure or finished in " + r, false);
} } finally {
try {
}
finally
{
try
{
EventQueue.invokeAndWait(this); EventQueue.invokeAndWait(this);
} } catch (InvocationTargetException | InterruptedException ex) {
catch (InvocationTargetException ex) HMCLog.err("Failed to invoke and wait", ex);
{
ex.printStackTrace();
return; return;
} } finally {
catch (InterruptedException ex)
{
ex.printStackTrace();
return;
}
finally
{
buttonManager.getWindow().setCursor(Cursor.getDefaultCursor()); buttonManager.getWindow().setCursor(Cursor.getDefaultCursor());
} }
} }
} else {
else
{
synchronized (this) { synchronized (this) {
deferredResult = null; deferredResult = null;
} }
@@ -541,9 +457,8 @@ public class WizardDisplayerImpl extends WizardDisplayer
Container inst = instructions.getComponent(); Container inst = instructions.getComponent();
inst.removeAll(); inst.removeAll();
inst.invalidate(); inst.invalidate();
if (inst instanceof JComponent) { if (inst instanceof JComponent)
((JComponent)instructions).revalidate(); ((JComponent) instructions).revalidate();
}
inst.repaint(); inst.repaint();
} }
} }
@@ -552,123 +467,97 @@ public class WizardDisplayerImpl extends WizardDisplayer
runner.start(); runner.start();
} }
public void navigateTo(String id) public void navigateTo(String id) {
{
JComponent comp = wizard.navigatingTo(id, getSettings()); JComponent comp = wizard.navigatingTo(id, getSettings());
String description = wizard.getLongDescription (id); String description = wizard.getLongDescription(id);
if (description == null) { if (description == null)
description = wizard.getStepDescription (id); description = wizard.getStepDescription(id);
}
getTtlLabel().setText(description); getTtlLabel().setText(description);
setCurrentWizardPanel(comp); setCurrentWizardPanel(comp);
} }
public NavButtonManager getButtonManager() public NavButtonManager getButtonManager() {
{
return buttonManager; return buttonManager;
} }
public synchronized DeferredWizardResult getDeferredResult() public synchronized DeferredWizardResult getDeferredResult() {
{
return deferredResult; return deferredResult;
} }
public InstructionsPanel getInstructions() public InstructionsPanel getInstructions() {
{
return instructions; return instructions;
} }
public boolean isInSummary() public boolean isInSummary() {
{
return inSummary; return inSummary;
} }
public void setInSummary(final boolean state) public void setInSummary(final boolean state) {
{
inSummary = state; inSummary = state;
Runnable r = new Runnable() { Runnable r = () -> instructions.setInSummaryPage(state);
public void run() { if (EventQueue.isDispatchThread())
instructions.setInSummaryPage(state);
}
};
if (EventQueue.isDispatchThread()) {
r.run(); r.run();
} else { else
EventQueue.invokeLater (r); EventQueue.invokeLater(r);
}
} }
public JPanel getOuterPanel() public JPanel getOuterPanel() {
{
return outerPanel; return outerPanel;
} }
public MergeMap getSettings() public MergeMap getSettings() {
{
return settings; return settings;
} }
public JLabel getTtlLabel() public JLabel getTtlLabel() {
{
return ttlLabel; return ttlLabel;
} }
public JPanel getTtlPanel() public JPanel getTtlPanel() {
{
return ttlPanel; return ttlPanel;
} }
public Wizard getWizard() public Wizard getWizard() {
{
return wizard; return wizard;
} }
public JComponent getWizardPanel() public JComponent getWizardPanel() {
{
return wizardPanel; return wizardPanel;
} }
public Object getWizardResult() public Object getWizardResult() {
{
return wizardResult; return wizardResult;
} }
public void setWizardResult(Object wizardResult) public void setWizardResult(Object wizardResult) {
{
this.wizardResult = wizardResult; this.wizardResult = wizardResult;
if (receiver != null) { if (receiver != null)
receiver.finished(wizardResult); receiver.finished(wizardResult);
}
} }
public synchronized void setDeferredResult(DeferredWizardResult deferredResult) public synchronized void setDeferredResult(DeferredWizardResult deferredResult) {
{
this.deferredResult = deferredResult; this.deferredResult = deferredResult;
} }
/** /**
* Will only be called if there is a WizardResultReceiver - i.e. if the * Will only be called if there is a WizardResultReceiver - i.e. if the
* wizard is being displayed in some kind of custom container. Return * wizard is being displayed in some kind of custom container. Return
* true to indicate we should not try to close the parent window. * true to indicate we should not try to close the parent window.
*/ */
boolean cancel() { boolean cancel() {
boolean result = receiver != null; boolean result = receiver != null;
if (result) { if (result)
receiver.cancelled(settings); receiver.cancelled(settings);
}
return result; return result;
} }
void updateProblem() void updateProblem() {
{
String prob = wizard.getProblem(); String prob = wizard.getProblem();
problem.setText(prob == null ? " " : prob); // NOI18N problem.setText(prob == null ? " " : prob); // NOI18N
if (prob != null && prob.trim().length() == 0) if (prob != null && prob.trim().length() == 0)
{
// Issue 3 - provide ability to disable next w/o // Issue 3 - provide ability to disable next w/o
// showing the error line // showing the error line
prob = null; prob = null;
}
Border b = prob == null ? BorderFactory.createEmptyBorder(1, 0, 0, 0) : BorderFactory Border b = prob == null ? BorderFactory.createEmptyBorder(1, 0, 0, 0) : BorderFactory
.createMatteBorder(1, 0, 0, 0, problem.getForeground()); .createMatteBorder(1, 0, 0, 0, problem.getForeground());

View File

@@ -43,6 +43,8 @@ import javax.swing.CellRendererPane;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JEditorPane; import javax.swing.JEditorPane;
import javax.swing.UIManager; import javax.swing.UIManager;
import org.jackhuang.hellominecraft.utils.C;
import org.jackhuang.hellominecraft.utils.logging.HMCLog;
import org.jackhuang.hellominecraft.utils.views.wizard.api.displayer.InstructionsPanel; import org.jackhuang.hellominecraft.utils.views.wizard.api.displayer.InstructionsPanel;
import org.jackhuang.hellominecraft.utils.views.wizard.spi.Wizard; import org.jackhuang.hellominecraft.utils.views.wizard.spi.Wizard;
import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardObserver; import org.jackhuang.hellominecraft.utils.views.wizard.spi.WizardObserver;
@@ -149,9 +151,9 @@ public class InstructionsPanelImpl extends JComponent implements WizardObserver,
if (img == null) if (img == null)
try { try {
img = ImageIO.read(InstructionsPanelImpl.class.getResourceAsStream( img = ImageIO.read(InstructionsPanelImpl.class.getResourceAsStream(
"defaultWizard.png")); //NOI18N "/org/jackhuang/hellominecraft/wizard.jpg")); //NOI18N
} catch (IOException ioe) { } catch (IOException ioe) {
ioe.printStackTrace(); HMCLog.err("Failed to load wizard.jpg, maybe you fucking modified the launcher", ioe);
} }
this.img = img; this.img = img;
this.wizard = wizard; this.wizard = wizard;
@@ -202,9 +204,7 @@ public class InstructionsPanelImpl extends JComponent implements WizardObserver,
steps = wizard.getAllSteps(); steps = wizard.getAllSteps();
String steps[] = this.steps; String steps[] = this.steps;
if (inSummaryPage) { if (inSummaryPage) {
String summaryStep = NbBridge.getString( String summaryStep = C.i18n("wizard.summary");
"org/jackhuang/hellominecraft/utils/views/wizard/modules/Bundle", //NOI18N
InstructionsPanelImpl.class, "Summary"); //NOI18N
String[] nue = new String[steps.length + 1]; String[] nue = new String[steps.length + 1];
System.arraycopy(steps, 0, nue, 0, steps.length); System.arraycopy(steps, 0, nue, 0, steps.length);
nue[nue.length - 1] = summaryStep; nue[nue.length - 1] = summaryStep;
@@ -217,8 +217,7 @@ public class InstructionsPanelImpl extends JComponent implements WizardObserver,
Font boldFont = f.deriveFont(Font.BOLD); Font boldFont = f.deriveFont(Font.BOLD);
g.setFont(boldFont); g.setFont(boldFont);
g.drawString(NbBridge.getString("org/jackhuang/hellominecraft/utils/views/wizard/modules/Bundle", //NOI18N g.drawString(C.i18n("wizard.steps"), x, y);
InstructionsPanelImpl.class, "Steps"), x, y); //NOI18N
int underlineY = ins.top + MARGIN + fm.getAscent() + 3; int underlineY = ins.top + MARGIN + fm.getAscent() + 3;
g.drawLine(x, underlineY, x + (getWidth() - (x + ins.left + MARGIN)), g.drawLine(x, underlineY, x + (getWidth() - (x + ins.left + MARGIN)),
@@ -230,8 +229,6 @@ public class InstructionsPanelImpl extends JComponent implements WizardObserver,
y += h + 10; y += h + 10;
int first = 0; int first = 0;
int stop = steps.length; int stop = steps.length;
String elipsis = NbBridge.getString("org/jackhuang/hellominecraft/utils/views/wizard/modules/Bundle", //NOI18N
InstructionsPanelImpl.class, "elipsis"); //NOI18N
boolean wontFit = y + (h * (steps.length)) > getHeight(); boolean wontFit = y + (h * (steps.length)) > getHeight();
if (wontFit) { if (wontFit) {
//try to center the current step //try to center the current step
@@ -255,33 +252,6 @@ public class InstructionsPanelImpl extends JComponent implements WizardObserver,
stop = rangeEnd; stop = rangeEnd;
} }
} }
/*
* if (wontFit) {
* int currStepIndex = Arrays.asList (steps).indexOf(currentStep);
* if (currStepIndex != -1) { //shouldn't happen
* steps = (String[]) steps.clone();
* first = Math.max (0, currStepIndex - 2);
* if (first != 0) {
* if (y + ((currStepIndex - first) * h) > getHeight()) {
* //Best effort to keep current step on screen
* first++;
* }
* if (first != currStepIndex) {
* steps[first] = elipsis;
* }
* }
* }
* }
* if (y + ((stop - first) * h) > bottom) {
* int avail = bottom - y;
* int willFit = avail / h;
* int last = first + willFit - 1;
* if (last < steps.length - 1) {
* steps[last] = elipsis;
* stop = last + 1;
* }
* }
*/
g.setFont(getFont()); g.setFont(getFont());
g.setColor(getForeground()); g.setColor(getForeground());
@@ -298,11 +268,9 @@ public class InstructionsPanelImpl extends JComponent implements WizardObserver,
curr = (i + 1) + ". " + steps[i]; curr = (i + 1) + ". " + steps[i];
else else
curr = (i + 1) + ". " + (isUndetermined curr = (i + 1) + ". " + (isUndetermined
? NbBridge.getString("org/jackhuang/hellominecraft/utils/views/wizard/modules/Bundle", //NOI18N ? elipsis
InstructionsPanelImpl.class, "elipsis") : steps[i].equals(elipsis) ? elipsis
: //NOI18N : wizard.getStepDescription(steps[i]));
steps[i].equals(elipsis) ? elipsis
: wizard.getStepDescription(steps[i])); //NOI18N
else else
curr = elipsis; curr = elipsis;
if (curr != null) { if (curr != null) {
@@ -313,10 +281,7 @@ public class InstructionsPanelImpl extends JComponent implements WizardObserver,
int width = fm.stringWidth(curr); int width = fm.stringWidth(curr);
while (width > getWidth() - (ins.left + ins.right) && curr.length() > 5) while (width > getWidth() - (ins.left + ins.right) && curr.length() > 5)
curr = curr.substring(0, curr.length() - 5) curr = curr.substring(0, curr.length() - 5) + elipsis;
+ NbBridge.getString(
"org/jackhuang/hellominecraft/utils/views/wizard/modules/Bundle", //NOI18N
InstructionsPanelImpl.class, "elipsis"); //NOI18N
g.drawString(curr, x, y); g.drawString(curr, x, y);
if (selected) if (selected)
@@ -328,6 +293,8 @@ public class InstructionsPanelImpl extends JComponent implements WizardObserver,
private int historicWidth = Integer.MIN_VALUE; private int historicWidth = Integer.MIN_VALUE;
String elipsis = "...";
public final Dimension getPreferredSize() { public final Dimension getPreferredSize() {
Font f = getFont() != null ? getFont() Font f = getFont() != null ? getFont()
: UIManager.getFont("controlFont"); //NOI18N : UIManager.getFont("controlFont"); //NOI18N
@@ -344,8 +311,7 @@ public class InstructionsPanelImpl extends JComponent implements WizardObserver,
int w = Integer.MIN_VALUE; int w = Integer.MIN_VALUE;
for (int i = 0; i < steps.length; i++) { for (int i = 0; i < steps.length; i++) {
String desc = i + ". " + (Wizard.UNDETERMINED_STEP.equals(steps[i]) String desc = i + ". " + (Wizard.UNDETERMINED_STEP.equals(steps[i])
? NbBridge.getString("org/jackhuang/hellominecraft/utils/views/wizard/modules/Bundle", //NOI18N ? elipsis
InstructionsPanelImpl.class, "elipsis")
: //NOI18N : //NOI18N
wizard.getStepDescription(steps[i])); wizard.getStepDescription(steps[i]));
if (desc != null) if (desc != null)
@@ -414,12 +380,6 @@ public class InstructionsPanelImpl extends JComponent implements WizardObserver,
panel = pnl; panel = pnl;
if (pnl.getParent() instanceof Accessible) if (pnl.getParent() instanceof Accessible)
setAccessibleParent((Accessible) pnl.getParent()); setAccessibleParent((Accessible) pnl.getParent());
setAccessibleName(NbBridge.getString(
"org/jackhuang/hellominecraft/utils/views/wizard/modules/Bundle", //NOI18N
InstructionsPanelImpl.class, "ACN_InstructionsPanel")); //NOI18N
setAccessibleDescription(NbBridge.getString(
"org/jackhuang/hellominecraft/utils/views/wizard/modules/Bundle", //NOI18N
InstructionsPanelImpl.class, "ACSD_InstructionsPanel")); //NOI18N
} }
JEditorPane pane; JEditorPane pane;
@@ -444,12 +404,10 @@ public class InstructionsPanelImpl extends JComponent implements WizardObserver,
} }
public String getText() { public String getText() {
StringBuffer sb = new StringBuffer(); StringBuilder sb = new StringBuilder();
String[] s = wizard.getAllSteps(); String[] s = wizard.getAllSteps();
for (int i = 0; i < s.length; i++) { for (String item : s)
sb.append(wizard.getStepDescription(s[i])); sb.append(wizard.getStepDescription(item)).append('\n');
sb.append('\n');
}
return sb.toString(); return sb.toString();
} }

View File

@@ -1,34 +0,0 @@
/*
* The contents of this file are subject to the terms of the Common Development
* and Distribution License (the License). You may not use this file except in
* compliance with the License.
* You can obtain a copy of the License at http://www.netbeans.org/cddl.html
* or http://www.netbeans.org/cddl.txt.
* When distributing Covered Code, include this CDDL Header Notice in each file
* and include the License file at http://www.netbeans.org/cddl.txt.
* If applicable, add the following below the CDDL Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*/
package org.jackhuang.hellominecraft.utils.views.wizard.modules;
import java.util.ResourceBundle;
/**
* Non API class for accessing a few things in NetBeans via reflection.
*
* @author Tim Boudreau
*/
public final class NbBridge {
private NbBridge() {
}
public static String getString(String path, Class callerType, String key) {
return getStringViaResourceBundle(path, key);
}
private static String getStringViaResourceBundle(String path, String key) {
return ResourceBundle.getBundle(path).getString(key);
}
}

View File

@@ -208,14 +208,22 @@ settings.custom=\u81ea\u5b9a\u4e49
settings.choose_gamedir=\u9009\u62e9\u6e38\u620f\u8def\u5f84 settings.choose_gamedir=\u9009\u62e9\u6e38\u620f\u8def\u5f84
settings.failed_load=\u8bbe\u7f6e\u6587\u4ef6\u52a0\u8f7d\u5931\u8d25\uff0c\u53ef\u80fd\u662f\u5347\u7ea7\u4e86\u542f\u52a8\u5668\u6216\u88ab\u4eba\u5de5\u4fee\u6539\u9020\u6210\u9519\u8bef\uff0c\u662f\u5426\u6e05\u9664\uff1f settings.failed_load=\u8bbe\u7f6e\u6587\u4ef6\u52a0\u8f7d\u5931\u8d25\uff0c\u53ef\u80fd\u662f\u5347\u7ea7\u4e86\u542f\u52a8\u5668\u6216\u88ab\u4eba\u5de5\u4fee\u6539\u9020\u6210\u9519\u8bef\uff0c\u662f\u5426\u6e05\u9664\uff1f
settings.modpack=\u6574\u5408\u5305 modpack=\u6574\u5408\u5305
settings.modpack.choose=\u9009\u62e9\u8981\u5bfc\u5165\u7684\u6e38\u620f\u6574\u5408\u5305\u6587\u4ef6 modpack.choose=\u9009\u62e9\u8981\u5bfc\u5165\u7684\u6e38\u620f\u6574\u5408\u5305\u6587\u4ef6
settings.modpack.install.task=\u5bfc\u5165\u6574\u5408\u5305 modpack.install.task=\u5bfc\u5165\u6574\u5408\u5305
settings.modpack.install_error=\u5b89\u88c5\u5931\u8d25\uff0c\u53ef\u80fd\u662f\u6574\u5408\u5305\u683c\u5f0f\u4e0d\u6b63\u786e\u6216\u64cd\u4f5c\u6587\u4ef6\u5931\u8d25 modpack.install_error=\u5b89\u88c5\u5931\u8d25\uff0c\u53ef\u80fd\u662f\u6574\u5408\u5305\u683c\u5f0f\u4e0d\u6b63\u786e\u6216\u64cd\u4f5c\u6587\u4ef6\u5931\u8d25
settings.modpack.save=\u9009\u62e9\u8981\u5bfc\u51fa\u5230\u7684\u6e38\u620f\u6574\u5408\u5305\u4f4d\u7f6e modpack.save=\u9009\u62e9\u8981\u5bfc\u51fa\u5230\u7684\u6e38\u620f\u6574\u5408\u5305\u4f4d\u7f6e
settings.modpack.save.task=\u5bfc\u51fa\u6574\u5408\u5305 modpack.save.task=\u5bfc\u51fa\u6574\u5408\u5305
settings.modpack.export_error=\u5bfc\u51fa\u5931\u8d25\uff0c\u53ef\u80fd\u662f\u60a8\u7684\u6e38\u620f\u6587\u4ef6\u5939\u683c\u5f0f\u4e0d\u6b63\u786e\u6216\u64cd\u4f5c\u6587\u4ef6\u5931\u8d25 modpack.export_error=\u5bfc\u51fa\u5931\u8d25\uff0c\u53ef\u80fd\u662f\u60a8\u7684\u6e38\u620f\u6587\u4ef6\u5939\u683c\u5f0f\u4e0d\u6b63\u786e\u6216\u64cd\u4f5c\u6587\u4ef6\u5931\u8d25
settings.modpack.enter_name=\u7ed9\u6e38\u620f\u8d77\u4e2a\u4f60\u559c\u6b22\u7684\u540d\u5b57 modpack.enter_name=\u7ed9\u6e38\u620f\u8d77\u4e2a\u4f60\u559c\u6b22\u7684\u540d\u5b57
modpack.wizard=\u5bfc\u51fa\u6574\u5408\u5305\u5411\u5bfc
modpack.wizard.step.1=\u57fa\u672c\u8bbe\u7f6e
modpack.wizard.step.1.title=\u8bbe\u7f6e\u6574\u5408\u5305\u7684\u4e3b\u8981\u4fe1\u606f
modpack.incorrect_format.no_json=\u6574\u5408\u5305\u683c\u5f0f\u9519\u8bef\uff0cpack.json\u4e22\u5931
modpack.incorrect_format.no_jar=\u6574\u5408\u5305\u683c\u5f0f\u9519\u8bef\uff0cpack.json\u4e22\u5931jar\u5b57\u6bb5
modpack.cannot_read_version=\u8bfb\u53d6\u6e38\u620f\u7248\u672c\u5931\u8d25
modpack.not_a_valid_location=\u4e0d\u662f\u4e00\u4e2a\u6709\u6548\u6574\u5408\u5305\u4f4d\u7f6e
modpack.warning=<html>\u5728\u5236\u4f5c\u6574\u5408\u5305\u524d\uff0c\u8bf7\u60a8\u786e\u8ba4\u60a8\u9009\u62e9\u7684\u7248\u672c\u53ef\u4ee5\u6b63\u5e38\u542f\u52a8\uff0c<br/>\u5e76\u4fdd\u8bc1\u60a8\u7684Minecraft\u662f\u6b63\u5f0f\u7248\u800c\u975e\u5feb\u7167\u7248\uff0c<br/>\u800c\u4e14\u4e0d\u5e94\u5f53\u5c06\u4e0d\u5141\u8bb8\u975e\u5b98\u65b9\u9014\u5f84\u4f20\u64ad\u7684Mod\u7eb3\u5165\u6574\u5408\u5305\u3002</html>
mods=Mod\u7ba1\u7406 mods=Mod\u7ba1\u7406
mods.choose_mod=\u9009\u62e9\u6a21\u7ec4 mods.choose_mod=\u9009\u62e9\u6a21\u7ec4
@@ -340,5 +348,21 @@ color.red=\u7ea2\u8272
color.blue=\u84dd\u8272 color.blue=\u84dd\u8272
color.green=\u7eff\u8272 color.green=\u7eff\u8272
color.orange=\u6a59\u8272 color.orange=\u6a59\u8272
color.dark_blue=\u6df1\u84dd\u8272 color.dark_blue=\u6df1\u84dd\u8272\u5931\u8d25
color.purple=\u7d2b\u8272 color.purple=\u7d2b\u8272
wizard.next_>=\u4e0b\u4e00\u6b65 >
wizard.next_mnemonic=\u4e0b
wizard.<_prev=< \u4e0a\u4e00\u6b65
wizard.prev_mnemonic=\u4e0a
wizard.finish=\u5b8c\u6210
wizard.finish_mnemonic=\u5b8c
wizard.cancel=\u53d6\u6d88
wizard.cancel_mnemonic=\u53d6
wizard.help=\u5e2e\u52a9
wizard.help_mnemonic=\u5e2e
wizard.close=\u5173\u95ed
wizard.close_mnemonic=\u5173
wizard.summary=\u6982\u8981
wizard.failed=\u5931\u8d25
wizard.steps=\u6b65\u9aa4

View File

@@ -208,14 +208,22 @@ settings.custom=Custom
settings.choose_gamedir=Choose Game Directory settings.choose_gamedir=Choose Game Directory
settings.failed_load=Failed to load settings file. Remove it? settings.failed_load=Failed to load settings file. Remove it?
settings.modpack=Mod pack modpack=Mod pack
settings.modpack.choose=Choose a modpack zip file which you want to import. modpack.choose=Choose a modpack zip file which you want to import.
settings.modpack.install.task=Import the modpack modpack.install.task=Import the modpack
settings.modpack.install_error=Failed to install the modpack, maybe the modpack file is incorrect or failed to manage files. modpack.install_error=Failed to install the modpack, maybe the modpack file is incorrect or failed to manage files.
settings.modpack.save=Choose a location which you want to export the game files to. modpack.save=Choose a location which you want to export the game files to.
settings.modpack.save.task=Export the modpack modpack.save.task=Export the modpack
settings.modpack.export_error=Failed to export the modpack, maybe the format of your game directory is incorrect or failed to manage files. modpack.export_error=Failed to export the modpack, maybe the format of your game directory is incorrect or failed to manage files.
settings.modpack.enter_name=Give this game a name which is your favorite. modpack.enter_name=Give this game a name which is your favorite.
modpack.wizard=Exporting the modpack wizard
modpack.wizard.step.1=Basic options
modpack.wizard.step.1.title=Set the basic options to the modpack.
modpack.incorrect_format.no_json=The format of the modpack is incorrect, pack.json is missing.
modpack.incorrect_format.no_jar=The format of the modpack is incorrect, pack.json does not have attribute 'jar'
modpack.cannot_read_version=Failed to gather the game version
modpack.not_a_valid_location=Not a valid modpack location
modpack.warning=<html>Before making modpack, you should ensure that your game can launch successfully,<br/>and that your Minecraft is release, not snapshot.<br/>and that it is not allowed to add mods which is not allowed to distribute to the modpack.</html>
mods=Mods mods=Mods
mods.choose_mod=Choose your mods mods.choose_mod=Choose your mods
@@ -341,4 +349,20 @@ color.blue=Blue
color.green=Green color.green=Green
color.orange=Orange color.orange=Orange
color.dark_blue=Dark Blue color.dark_blue=Dark Blue
color.purple=Purple color.purple=Purple
wizard.next_>=Next >
wizard.next_mnemonic=N
wizard.<_prev=< Prev
wizard.prev_mnemonic=P
wizard.finish=Finish
wizard.finish_mnemonic=F
wizard.cancel=Cancel
wizard.cancel_mnemonic=C
wizard.help=Help
wizard.help_mnemonic=H
wizard.close=Close
wizard.close_mnemonic=C
wizard.summary=Summary
wizard.failed=Failed
wizard.steps=Steps

View File

@@ -208,14 +208,22 @@ settings.custom=\u81ea\u5b9a\u7fa9
settings.choose_gamedir=\u9009\u62e9\u6e38\u620f\u8def\u5f84 settings.choose_gamedir=\u9009\u62e9\u6e38\u620f\u8def\u5f84
settings.failed_load=\u8a2d\u5b9a\u6587\u4ef6\u52a0\u8f09\u5931\u6557\uff0c\u53ef\u80fd\u662f\u5347\u7d1a\u4e86\u555f\u52d5\u5668\u6216\u88ab\u4eba\u5de5\u4fee\u6539\u9020\u6210\u932f\u8aa4\uff0c\u662f\u5426\u6e05\u9664\uff1f settings.failed_load=\u8a2d\u5b9a\u6587\u4ef6\u52a0\u8f09\u5931\u6557\uff0c\u53ef\u80fd\u662f\u5347\u7d1a\u4e86\u555f\u52d5\u5668\u6216\u88ab\u4eba\u5de5\u4fee\u6539\u9020\u6210\u932f\u8aa4\uff0c\u662f\u5426\u6e05\u9664\uff1f
settings.modpack=\u61f6\u4eba\u5305 modpack=\u61f6\u4eba\u5305
settings.modpack.choose=\u9078\u64c7\u8981\u5c0e\u5165\u7684\u904a\u6232\u61f6\u4eba\u5305\u6587\u4ef6 modpack.choose=\u9078\u64c7\u8981\u5c0e\u5165\u7684\u904a\u6232\u61f6\u4eba\u5305\u6587\u4ef6
settings.modpack.install.task=\u5c0e\u5165\u61f6\u4eba\u5305 modpack.install.task=\u5c0e\u5165\u61f6\u4eba\u5305
settings.modpack.install_error=\u5b89\u88dd\u5931\u6557\uff0c\u53ef\u80fd\u662f\u6574\u5408\u5305\u683c\u5f0f\u4e0d\u6b63\u78ba\u6216\u64cd\u4f5c\u6587\u4ef6\u5931\u6557 modpack.install_error=\u5b89\u88dd\u5931\u6557\uff0c\u53ef\u80fd\u662f\u6574\u5408\u5305\u683c\u5f0f\u4e0d\u6b63\u78ba\u6216\u64cd\u4f5c\u6587\u4ef6\u5931\u6557
settings.modpack.save=\u9078\u64c7\u8981\u5c0e\u51fa\u5230\u7684\u904a\u6232\u61f6\u4eba\u5305\u4f4d\u7f6e modpack.save=\u9078\u64c7\u8981\u5c0e\u51fa\u5230\u7684\u904a\u6232\u61f6\u4eba\u5305\u4f4d\u7f6e
settings.modpack.save.task=\u5c0e\u51fa\u61f6\u4eba\u5305 modpack.save.task=\u5c0e\u51fa\u61f6\u4eba\u5305
settings.modpack.export_error=\u5c0e\u51fa\u5931\u6557\uff0c\u53ef\u80fd\u662f\u60a8\u7684\u904a\u6232\u6587\u4ef6\u593e\u683c\u5f0f\u4e0d\u6b63\u78ba\u6216\u64cd\u4f5c\u6587\u4ef6\u5931\u6557 modpack.export_error=\u5c0e\u51fa\u5931\u6557\uff0c\u53ef\u80fd\u662f\u60a8\u7684\u904a\u6232\u6587\u4ef6\u593e\u683c\u5f0f\u4e0d\u6b63\u78ba\u6216\u64cd\u4f5c\u6587\u4ef6\u5931\u6557
settings.modpack.enter_name=\u7d66\u904a\u6232\u8d77\u500b\u4f60\u559c\u6b61\u7684\u540d\u5b57 modpack.enter_name=\u7d66\u904a\u6232\u8d77\u500b\u4f60\u559c\u6b61\u7684\u540d\u5b57
modpack.wizard=\u5c0e\u51fa\u61f6\u4eba\u5305\u56ae\u5c0e
modpack.wizard.step.1=\u57fa\u672c\u8a2d\u5b9a
modpack.wizard.step.1.title=\u8a2d\u7f6e\u61f6\u4eba\u5305\u7684\u4e3b\u8981\u4fe1\u606f
modpack.incorrect_format.no_json=\u61f6\u4eba\u5305\u683c\u5f0f\u932f\u8aa4\uff0cpack.json\u4e1f\u5931
modpack.incorrect_format.no_jar=\u61f6\u4eba\u5305\u683c\u5f0f\u932f\u8aa4\uff0cpack.json\u4e1f\u5931jar\u5b57\u6bb5
modpack.cannot_read_version=\u8b80\u53d6\u904a\u6232\u7248\u672c\u5931\u6557
modpack.not_a_valid_location=\u4e0d\u662f\u4e00\u4e2a\u6709\u6548\u61d2\u4eba\u5305\u4f4d\u7f6e
modpack.warning=<html>\u5728\u88fd\u4f5c\u6574\u5408\u5305\u524d,\u8acb\u60a8\u78ba\u8a8d\u60a8\u9078\u64c7\u7684\u7248\u672c\u53ef\u4ee5\u6b63\u5e38\u555f\u52d5,\u200b\u200b<br/>\u4e26\u4fdd\u8b49\u60a8\u7684Minecraft\u662f\u6b63\u5f0f\u7248\u800c\u975e\u5feb\u7167\u7248,<br/>\u800c\u4e14\u4e0d\u61c9\u7576\u5c07\u4e0d\u5141\u8a31\u975e\u5b98\u65b9\u9014\u5f91\u50b3\u64ad\u7684Mod\u7d0d\u5165\u6574\u5408\u5305\u3002 </html>
mods=Mod\u7ba1\u7406 mods=Mod\u7ba1\u7406
mods.choose_mod=\u9009\u62e9\u6a21\u7ec4 mods.choose_mod=\u9009\u62e9\u6a21\u7ec4
@@ -341,4 +349,20 @@ color.blue=\u85cd\u8272
color.green=\u7da0\u8272 color.green=\u7da0\u8272
color.orange=\u6a59\u8272 color.orange=\u6a59\u8272
color.dark_blue=\u6df1\u85cd\u8272 color.dark_blue=\u6df1\u85cd\u8272
color.purple=\u7d2b\u8272 color.purple=\u7d2b\u8272
wizard.next_>=\u4e0b\u4e00\u6b65 >
wizard.next_mnemonic=\u4e0b
wizard.<_prev=< \u4e0a\u4e00\u6b65
wizard.prev_mnemonic=\u4e0a
wizard.finish=\u5b8c\u6210
wizard.finish_mnemonic=\u5b8c
wizard.cancel=\u53d6\u6d88
wizard.cancel_mnemonic=\u53d6
wizard.help=\u5e6b\u52a9
wizard.help_mnemonic=\u5e6b
wizard.close=\u95dc\u9589
wizard.close_mnemonic=\u95dc
wizard.summary=\u6982\u8981
wizard.failed=\u5931\u8d25
wizard.steps=\u6b65\u9a5f

View File

@@ -208,18 +208,28 @@ settings.custom=\u81ea\u5b9a\u4e49
settings.choose_gamedir=\u9009\u62e9\u6e38\u620f\u8def\u5f84 settings.choose_gamedir=\u9009\u62e9\u6e38\u620f\u8def\u5f84
settings.failed_load=\u8bbe\u7f6e\u6587\u4ef6\u52a0\u8f7d\u5931\u8d25\uff0c\u53ef\u80fd\u662f\u5347\u7ea7\u4e86\u542f\u52a8\u5668\u6216\u88ab\u4eba\u5de5\u4fee\u6539\u9020\u6210\u9519\u8bef\uff0c\u662f\u5426\u6e05\u9664\uff1f settings.failed_load=\u8bbe\u7f6e\u6587\u4ef6\u52a0\u8f7d\u5931\u8d25\uff0c\u53ef\u80fd\u662f\u5347\u7ea7\u4e86\u542f\u52a8\u5668\u6216\u88ab\u4eba\u5de5\u4fee\u6539\u9020\u6210\u9519\u8bef\uff0c\u662f\u5426\u6e05\u9664\uff1f
settings.modpack=\u6574\u5408\u5305 modpack=\u6574\u5408\u5305
settings.modpack.choose=\u9009\u62e9\u8981\u5bfc\u5165\u7684\u6e38\u620f\u6574\u5408\u5305\u6587\u4ef6 modpack.choose=\u9009\u62e9\u8981\u5bfc\u5165\u7684\u6e38\u620f\u6574\u5408\u5305\u6587\u4ef6
settings.modpack.install.task=\u5bfc\u5165\u6574\u5408\u5305 modpack.install.task=\u5bfc\u5165\u6574\u5408\u5305
settings.modpack.install_error=\u5b89\u88c5\u5931\u8d25\uff0c\u53ef\u80fd\u662f\u6574\u5408\u5305\u683c\u5f0f\u4e0d\u6b63\u786e\u6216\u64cd\u4f5c\u6587\u4ef6\u5931\u8d25 modpack.install_error=\u5b89\u88c5\u5931\u8d25\uff0c\u53ef\u80fd\u662f\u6574\u5408\u5305\u683c\u5f0f\u4e0d\u6b63\u786e\u6216\u64cd\u4f5c\u6587\u4ef6\u5931\u8d25
settings.modpack.save=\u9009\u62e9\u8981\u5bfc\u51fa\u5230\u7684\u6e38\u620f\u6574\u5408\u5305\u4f4d\u7f6e modpack.save=\u9009\u62e9\u8981\u5bfc\u51fa\u5230\u7684\u6e38\u620f\u6574\u5408\u5305\u4f4d\u7f6e
settings.modpack.save.task=\u5bfc\u51fa\u6574\u5408\u5305 modpack.save.task=\u5bfc\u51fa\u6574\u5408\u5305
settings.modpack.export_error=\u5bfc\u51fa\u5931\u8d25\uff0c\u53ef\u80fd\u662f\u60a8\u7684\u6e38\u620f\u6587\u4ef6\u5939\u683c\u5f0f\u4e0d\u6b63\u786e\u6216\u64cd\u4f5c\u6587\u4ef6\u5931\u8d25 modpack.export_error=\u5bfc\u51fa\u5931\u8d25\uff0c\u53ef\u80fd\u662f\u60a8\u7684\u6e38\u620f\u6587\u4ef6\u5939\u683c\u5f0f\u4e0d\u6b63\u786e\u6216\u64cd\u4f5c\u6587\u4ef6\u5931\u8d25
settings.modpack.enter_name=\u7ed9\u6e38\u620f\u8d77\u4e2a\u4f60\u559c\u6b22\u7684\u540d\u5b57 modpack.enter_name=\u7ed9\u6e38\u620f\u8d77\u4e2a\u4f60\u559c\u6b22\u7684\u540d\u5b57
modpack.wizard=\u5bfc\u51fa\u6574\u5408\u5305\u5411\u5bfc
modpack.wizard.step.1=\u57fa\u672c\u8bbe\u7f6e
modpack.wizard.step.1.title=\u8bbe\u7f6e\u6574\u5408\u5305\u7684\u4e3b\u8981\u4fe1\u606f
modpack.incorrect_format.no_json=\u6574\u5408\u5305\u683c\u5f0f\u9519\u8bef\uff0cpack.json\u4e22\u5931
modpack.incorrect_format.no_jar=\u6574\u5408\u5305\u683c\u5f0f\u9519\u8bef\uff0cpack.json\u4e22\u5931jar\u5b57\u6bb5
modpack.cannot_read_version=\u8bfb\u53d6\u6e38\u620f\u7248\u672c\u5931\u8d25
modpack.not_a_valid_location=\u4e0d\u662f\u4e00\u4e2a\u6709\u6548\u6574\u5408\u5305\u4f4d\u7f6e
modpack.warning=<html>\u5728\u5236\u4f5c\u6574\u5408\u5305\u524d\uff0c\u8bf7\u60a8\u786e\u8ba4\u60a8\u9009\u62e9\u7684\u7248\u672c\u53ef\u4ee5\u6b63\u5e38\u542f\u52a8\uff0c<br/>\u5e76\u4fdd\u8bc1\u60a8\u7684Minecraft\u662f\u6b63\u5f0f\u7248\u800c\u975e\u5feb\u7167\u7248\uff0c<br/>\u800c\u4e14\u4e0d\u5e94\u5f53\u5c06\u4e0d\u5141\u8bb8\u975e\u5b98\u65b9\u9014\u5f84\u4f20\u64ad\u7684Mod\u7eb3\u5165\u6574\u5408\u5305\u3002</html>
mods=Mod\u7ba1\u7406 mods=Mod\u7ba1\u7406
mods.choose_mod=\u9009\u62e9\u6a21\u7ec4 mods.choose_mod=\u9009\u62e9\u6a21\u7ec4
mods.failed=\u6dfb\u52a0\u5931\u8d25 mods.failed=\u6dfb\u52a0\u5931\u8d25
mods.add=\u6dfb\u52a0
mods.remove=\u5220\u9664
mods.default_information=<html><font color=#c0392b>\u5b89\u88c5Mod\u524d\u4f60\u9700\u8981\u786e\u4fdd\u5df2\u5b89\u88c5Forge\u6216LiteLoader!<br>\u60a8\u53ef\u4ee5\u4ece\u8d44\u6e90\u7ba1\u7406\u5668\u62d6\u52a8mod\u6587\u4ef6\u5230\u5217\u8868\u4e2d\u6765\u6dfb\u52a0mod\uff0c\u540c\u65f6\u4f7f\u7528\u5220\u9664\u952e\u53ef\u5feb\u901f\u5220\u9664\u9009\u4e2dmod<br>\u70b9\u6389mod\u524d\u9762\u7684\u52fe\u53ef\u7981\u7528mod\uff0c\u4e0d\u4f1a\u52a0\u8f7d\uff1b\u9009\u62e9mod\u53ef\u4ee5\u83b7\u53d6mod\u4fe1\u606f</font></html> mods.default_information=<html><font color=#c0392b>\u5b89\u88c5Mod\u524d\u4f60\u9700\u8981\u786e\u4fdd\u5df2\u5b89\u88c5Forge\u6216LiteLoader!<br>\u60a8\u53ef\u4ee5\u4ece\u8d44\u6e90\u7ba1\u7406\u5668\u62d6\u52a8mod\u6587\u4ef6\u5230\u5217\u8868\u4e2d\u6765\u6dfb\u52a0mod\uff0c\u540c\u65f6\u4f7f\u7528\u5220\u9664\u952e\u53ef\u5feb\u901f\u5220\u9664\u9009\u4e2dmod<br>\u70b9\u6389mod\u524d\u9762\u7684\u52fe\u53ef\u7981\u7528mod\uff0c\u4e0d\u4f1a\u52a0\u8f7d\uff1b\u9009\u62e9mod\u53ef\u4ee5\u83b7\u53d6mod\u4fe1\u606f</font></html>
advancedsettings=\u9ad8\u7ea7\u8bbe\u7f6e advancedsettings=\u9ad8\u7ea7\u8bbe\u7f6e
@@ -236,8 +246,9 @@ advancedsettings.game_dir.default=\u9ed8\u8ba4(.minecraft/)
advancedsettings.game_dir.independent=\u5404\u7248\u672c\u72ec\u7acb(.minecraft/versions/<\u7248\u672c\u540d>/,\u9664assets,libraries) advancedsettings.game_dir.independent=\u5404\u7248\u672c\u72ec\u7acb(.minecraft/versions/<\u7248\u672c\u540d>/,\u9664assets,libraries)
advancedsettings.no_jvm_args=\u4e0d\u6dfb\u52a0JVM\u53c2\u6570(\u4f7f\u7528Java9\u65f6\u5fc5\u52fe) advancedsettings.no_jvm_args=\u4e0d\u6dfb\u52a0JVM\u53c2\u6570(\u4f7f\u7528Java9\u65f6\u5fc5\u52fe)
advancedsettings.java_args_default=\u542f\u52a8\u5668\u9ed8\u8ba4\u6dfb\u52a0\u7684\u53c2\u6570\uff08\u8bf7\u4e0d\u8981\u91cd\u590d\u6dfb\u52a0\uff09\uff1a-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -XX:MaxPermSize=???m -Xmx???m -Dfml.ignoreInvalidMinecraftCertificates=true -Dfml.ignorePatchDiscrepancies=true advancedsettings.java_args_default=\u542f\u52a8\u5668\u9ed8\u8ba4\u6dfb\u52a0\u7684\u53c2\u6570\uff08\u8bf7\u4e0d\u8981\u91cd\u590d\u6dfb\u52a0\uff09\uff1a-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -XX:MaxPermSize=???m -Xmx???m -Dfml.ignoreInvalidMinecraftCertificates=true -Dfml.ignorePatchDiscrepancies=true
advancedsettings.wrapper_launcher=\u524d\u7f6e\u542f\u52a8\u6307\u4ee4(\u4e0d\u5fc5\u586b\u5199\uff0c\u5185\u5bb9\u5c06\u52a0\u5728\u542f\u52a8\u811a\u672c\u6700\u524d\uff0c\u5982optirun...) advancedsettings.wrapper_launcher=\u542f\u52a8\u524d\u6267\u884c\u547d\u4ee4(\u4e0d\u5fc5\u586b\u5199\uff0c\u5c06\u5728\u6e38\u620f\u542f\u52a8\u524d\u8c03\u7528)
advancedsettings.server_ip=\u76f4\u5165\u670d\u52a1\u5668ip\u5730\u5740(\u4e0d\u5fc5\u586b\u5199\uff0c\u542f\u52a8\u6e38\u620f\u540e\u76f4\u63a5\u8fdb\u5165\u5bf9\u5e94\u670d\u52a1\u5668) advancedsettings.server_ip=\u76f4\u5165\u670d\u52a1\u5668ip\u5730\u5740(\u4e0d\u5fc5\u586b\u5199\uff0c\u542f\u52a8\u6e38\u620f\u540e\u76f4\u63a5\u8fdb\u5165\u5bf9\u5e94\u670d\u52a1\u5668)
advancedsettings.cancel_wrapper_launcher=\u53d6\u6d88\u5305\u88f9\u542f\u52a8\u5668\uff08\u51fa\u73b0\u5947\u602a\u95ee\u9898\u65f6\u53ef\u5c1d\u8bd5\u4f7f\u7528,\u4e0e\u8c03\u8bd5\u6a21\u5f0f\u51b2\u7a81\uff09
mainwindow.show_log=\u67e5\u770b\u65e5\u5fd7 mainwindow.show_log=\u67e5\u770b\u65e5\u5fd7
mainwindow.make_launch_script=\u751f\u6210\u542f\u52a8\u811a\u672c mainwindow.make_launch_script=\u751f\u6210\u542f\u52a8\u811a\u672c
@@ -246,7 +257,7 @@ mainwindow.enter_script_name=\u8f93\u5165\u8981\u751f\u6210\u811a\u672c\u7684\u6
mainwindow.make_launch_succeed=\u542f\u52a8\u811a\u672c\u5df2\u751f\u6210\u5b8c\u6bd5: mainwindow.make_launch_succeed=\u542f\u52a8\u811a\u672c\u5df2\u751f\u6210\u5b8c\u6bd5:
mainwindow.no_version=\u672a\u627e\u5230\u4efb\u4f55\u7248\u672c\uff0c\u662f\u5426\u8fdb\u5165\u6e38\u620f\u4e0b\u8f7d\uff1f mainwindow.no_version=\u672a\u627e\u5230\u4efb\u4f55\u7248\u672c\uff0c\u662f\u5426\u8fdb\u5165\u6e38\u620f\u4e0b\u8f7d\uff1f
launcher.about=<html>\u9ed8\u8ba4\u80cc\u666f\u56fe\u6765\u81eaLiberty Dome\u670d\u52a1\u5668\u3002<br/>\u5173\u4e8e\u4f5c\u8005\uff1a<br/>\n\u767e\u5ea6ID\uff1ahuanghongxun20<br/>\nmcbbs\uff1ahuanghongxun<br/>\n\u90ae\u7bb1\uff1ahuanghongxun2008@126.com<br/>\nMinecraft Forum ID: klkl6523<br/>\n\u6b22\u8fce\u63d0\u4ea4Bug\u54e6<br/>\nCopyright (c) 2013-2015 huangyuhui.<br/>\u514d\u8d23\u58f0\u660e\uff1aMinecraft\u8f6f\u4ef6\u7248\u6743\u5f52Mojang AB\u6240\u6709\uff0c\u6e38\u620f\u7531\u4e8e\u8bef\u64cd\u4f5c\u672c\u542f\u52a8\u5668\u800c\u4e22\u5931\u6570\u636e\u7684\u6982\u4e0d\u8d1f\u8d23\u3002<br/>\u672c\u542f\u52a8\u5668\u5728GPLv3\u534f\u8bae\u4e0b\u5f00\u6e90:http://github.com/huanghongxun/HMCL/<br/>\u672c\u8f6f\u4ef6\u4f7f\u7528\u4e86\u57fa\u4e8eApache License 2.0\u7684RxJava\u548cGson\u9879\u76ee\uff0c\u611f\u8c22\u8d21\u732e\u8005\u3002</html> launcher.about=<html>\u9ed8\u8ba4\u80cc\u666f\u56fe\u6765\u81eaLiberty Dome\u670d\u52a1\u5668\u3002<br/>\u5173\u4e8e\u4f5c\u8005\uff1a<br/>\n\u767e\u5ea6ID\uff1ahuanghongxun20<br/>\nmcbbs\uff1ahuanghongxun<br/>\n\u90ae\u7bb1\uff1ahuanghongxun2008@126.com<br/>\nMinecraft Forum ID: klkl6523<br/>\n\u6b22\u8fce\u63d0\u4ea4Bug\u54e6<br/>\nCopyright (c) 2013-2015 huangyuhui.<br/>\u514d\u8d23\u58f0\u660e\uff1aMinecraft\u8f6f\u4ef6\u7248\u6743\u5f52Mojang AB\u6240\u6709\uff0c\u6e38\u620f\u7531\u4e8e\u8bef\u64cd\u4f5c\u672c\u542f\u52a8\u5668\u800c\u4e22\u5931\u6570\u636e\u7684\u6982\u4e0d\u8d1f\u8d23\u3002<br/>\u672c\u542f\u52a8\u5668\u5728GPLv3\u534f\u8bae\u4e0b\u5f00\u6e90:https://github.com/huanghongxun/HMCL/<br/>\u672c\u8f6f\u4ef6\u4f7f\u7528\u4e86\u57fa\u4e8eApache License 2.0\u7684RxJava\u548cGson\u9879\u76ee\uff0c\u611f\u8c22\u8d21\u732e\u8005\u3002</html>
launcher.download_source=\u4e0b\u8f7d\u6e90 launcher.download_source=\u4e0b\u8f7d\u6e90
launcher.background_location=\u80cc\u666f\u5730\u5740 launcher.background_location=\u80cc\u666f\u5730\u5740
launcher.exit_failed=\u5f3a\u5236\u9000\u51fa\u5931\u8d25\uff0c\u53ef\u80fd\u662fForge 1.7.10\u53ca\u66f4\u9ad8\u7248\u672c\u5bfc\u81f4\u7684\uff0c\u65e0\u6cd5\u89e3\u51b3\u3002 launcher.exit_failed=\u5f3a\u5236\u9000\u51fa\u5931\u8d25\uff0c\u53ef\u80fd\u662fForge 1.7.10\u53ca\u66f4\u9ad8\u7248\u672c\u5bfc\u81f4\u7684\uff0c\u65e0\u6cd5\u89e3\u51b3\u3002
@@ -338,4 +349,20 @@ color.blue=\u84dd\u8272
color.green=\u7eff\u8272 color.green=\u7eff\u8272
color.orange=\u6a59\u8272 color.orange=\u6a59\u8272
color.dark_blue=\u6df1\u84dd\u8272 color.dark_blue=\u6df1\u84dd\u8272
color.purple=\u7d2b\u8272 color.purple=\u7d2b\u8272
wizard.next_>=\u4e0b\u4e00\u6b65 >
wizard.next_mnemonic=\u4e0b
wizard.<_prev=< \u4e0a\u4e00\u6b65
wizard.prev_mnemonic=\u4e0a
wizard.finish=\u5b8c\u6210
wizard.finish_mnemonic=\u5b8c
wizard.cancel=\u53d6\u6d88
wizard.cancel_mnemonic=\u53d6
wizard.help=\u5e2e\u52a9
wizard.help_mnemonic=\u5e2e
wizard.close=\u5173\u95ed
wizard.close_mnemonic=\u5173
wizard.summary=\u6982\u8981
wizard.failed=\u5931\u8d25
wizard.steps=\u6b65\u9aa4

View File

@@ -1,25 +0,0 @@
#The contents of this file are subject to the terms of the Common Development
#and Distribution License (the License). You may not use this file except in
#compliance with the License.
# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
#or http://www.netbeans.org/cddl.txt.
# When distributing Covered Code, include this CDDL Header Notice in each file
#and include the License file at http://www.netbeans.org/cddl.txt.
#If applicable, add the following below the CDDL Header, with the fields
#enclosed by brackets [] replaced by your own identifying information:
#"Portions Copyrighted [year] [name of copyright owner]"
Next_>=Next >
Next_mnemonic=N
<_Prev=< Prev
Prev_mnemonic=P
Finish=Finish
Finish_mnemonic=F
Cancel=Cancel
Cancel_mnemonic=C
Help=Help
Help_mnemonic=H
Close=Close
Close_mnemonic=C
Summary=Summary
Failed=Failed

View File

@@ -1,25 +0,0 @@
#The contents of this file are subject to the terms of the Common Development
#and Distribution License (the License). You may not use this file except in
#compliance with the License.
# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
#or http://www.netbeans.org/cddl.txt.
# When distributing Covered Code, include this CDDL Header Notice in each file
#and include the License file at http://www.netbeans.org/cddl.txt.
#If applicable, add the following below the CDDL Header, with the fields
#enclosed by brackets [] replaced by your own identifying information:
#"Portions Copyrighted [year] [name of copyright owner]"
Next_>=Weiter >
Next_mnemonic=W
<_Prev=< Zur\u00FCck
Prev_mnemonic=Z
Finish=Fertig
Finish_mnemonic=F
Cancel=Abbrechen
Cancel_mnemonic=A
Help=Hilfe
Help_mnemonic=H
Close=Schlie\u00DFen
Close_mnemonic=S
Summary=Zusammenfassung
Failed=Fehler

View File

@@ -1,30 +0,0 @@
#The contents of this file are subject to the terms of the Common Development
#and Distribution License (the License). You may not use this file except in
#compliance with the License.
# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
#or http://www.netbeans.org/cddl.txt.
# When distributing Covered Code, include this CDDL Header Notice in each file
#and include the License file at http://www.netbeans.org/cddl.txt.
#If applicable, add the following below the CDDL Header, with the fields
#enclosed by brackets [] replaced by your own identifying information:
#"Portions Copyrighted [year] [name of copyright owner]"
Next_>=\u0395\u03C0\u03CC\u03BC\u03B5\u03BD\u03BF >
Next_mnemonic=\u0395
<_Prev=< \u03A0\u03C1\u03BF\u03B7\u03B3\u03BF\u03CD\u03BC\u03B5\u03BD\u03BF
Prev_mnemonic=\u03A0
Finish=\u03A4\u03AD\u03BB\u03BF\u03C2
Finish_mnemonic=\u03A4
Cancel=\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7
Cancel_mnemonic=\u0391
Help=\u0392\u03BF\u03AE\u03B8\u03B5\u03B9\u03B1
Help_mnemonic=\u0392
Close=\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF
Close_mnemonic=\u039A
Summary=\u03A0\u03B5\u03C1\u03AF\u03BB\u03B7\u03C8\u03B7
Failed=\u0391\u03C0\u03AD\u03C4\u03C5\u03C7\u03B5
HELP=\u0392\u039F\u0397\u0398\u0395\u0399\u0391
FINISH=\u03A4\u0395\u039B\u039F\u03A3
NEXT=\u0395\u03A0\u039F\u039C\u0395\u039D\u039F
PREV=\u03A0\u03A1\u039F\u0397\u0393\u039F\u03A5\u039C\u0395\u039D\u039F
CANCEL=\u0391\u039A\u03A5\u03A1\u03A9\u03A3\u0397

View File

@@ -1,25 +0,0 @@
#The contents of this file are subject to the terms of the Common Development
#and Distribution License (the License). You may not use this file except in
#compliance with the License.
# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
#or http://www.netbeans.org/cddl.txt.
# When distributing Covered Code, include this CDDL Header Notice in each file
#and include the License file at http://www.netbeans.org/cddl.txt.
#If applicable, add the following below the CDDL Header, with the fields
#enclosed by brackets [] replaced by your own identifying information:
#"Portions Copyrighted [year] [name of copyright owner]"
Next_>=Suivant >
Next_mnemonic=S
<_Prev=< Pr\u00E9c\u00E9dent
Prev_mnemonic=P
Finish=Terminer
Finish_mnemonic=T
Cancel=Annuler
Cancel_mnemonic=n
Help=Aide
Help_mnemonic=A
Close=Fermer
Close_mnemonic=F
Summary=Sommaire
Failed=\u00C9chec

View File

@@ -1,25 +0,0 @@
#The contents of this file are subject to the terms of the Common Development
#and Distribution License (the License). You may not use this file except in
#compliance with the License.
# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
#or http://www.netbeans.org/cddl.txt.
# When distributing Covered Code, include this CDDL Header Notice in each file
#and include the License file at http://www.netbeans.org/cddl.txt.
#If applicable, add the following below the CDDL Header, with the fields
#enclosed by brackets [] replaced by your own identifying information:
#"Portions Copyrighted [year] [name of copyright owner]"
Next_>=Avanti >
Next_mnemonic=v
<_Prev=< Indietro
Prev_mnemonic=I
Finish=Fine
Finish_mnemonic=F
Cancel=Annulla
Cancel_mnemonic=n
Help=Aiuto
Help_mnemonic=A
Close=Chiudi
Close_mnemonic=C
Summary=Riassunto
Failed=Fallimento

View File

@@ -1,25 +0,0 @@
#The contents of this file are subject to the terms of the Common Development
#and Distribution License (the License). You may not use this file except in
#compliance with the License.
# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
#or http://www.netbeans.org/cddl.txt.
# When distributing Covered Code, include this CDDL Header Notice in each file
#and include the License file at http://www.netbeans.org/cddl.txt.
#If applicable, add the following below the CDDL Header, with the fields
#enclosed by brackets [] replaced by your own identifying information:
#"Portions Copyrighted [year] [name of copyright owner]"
Next_>=Volgende >
Next_mnemonic=g
<_Prev=< Vorige
Prev_mnemonic=r
Finish=Be\u00EBindigen
Finish_mnemonic=B
Cancel=Annuleren
Cancel_mnemonic=A
Help=Help
Help_mnemonic=H
Close=Sluiten
Close_mnemonic=S
Summary=Sammenvatting
Failed=Gefaald

View File

@@ -1,27 +0,0 @@
#The contents of this file are subject to the terms of the Common Development
#and Distribution License (the License). You may not use this file except in
#compliance with the License.
# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
#or http://www.netbeans.org/cddl.txt.
# When distributing Covered Code, include this CDDL Header Notice in each file
#and include the License file at http://www.netbeans.org/cddl.txt.
#If applicable, add the following below the CDDL Header, with the fields
#enclosed by brackets [] replaced by your own identifying information:
#"Portions Copyrighted [year] [name of copyright owner]"
Next_>=Pr\u00F3ximo >
Next_mnemonic=P
<_Prev=< Previs\u00E3o
Prev_mnemonic=r
Finish=Fim
Finish_mnemonic=F
Cancel=Cancelar
Cancel_mnemonic=C
Help=Ajudar
Help_mnemonic=A
Close=Fechar
Close_mnemonic=F
Summary=Sum\u00E1rio
Failed=Falhou

View File

@@ -1,31 +0,0 @@
#The contents of this file are subject to the terms of the Common Development
#and Distribution License (the License). You may not use this file except in
#compliance with the License.
# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
#or http://www.netbeans.org/cddl.txt.
# When distributing Covered Code, include this CDDL Header Notice in each file
#and include the License file at http://www.netbeans.org/cddl.txt.
#If applicable, add the following below the CDDL Header, with the fields
#enclosed by brackets [] replaced by your own identifying information:
#"Portions Copyrighted [year] [name of copyright owner]"
Next_>=N\u00E4sta >
Next_mnemonic=N
<_Prev=< F\u00F6reg\u00E5ende
Prev_mnemonic=P
Finish=Avsluta
Finish_mnemonic=F
Cancel=Avbryt
Cancel_mnemonic=C
Help=Hj\u00E4lp
Help_mnemonic=H
Close=St\u00E4ng
Close_mnemonic=C
Summary=Sammanfatning
Failed=Misslyckades
HELP=HJ\u00C4LP
FINISH=AVSLUTA
NEXT=N\u00C4STA
PREV=F\u00D6REG\u00C5ENDE
CANCEL=AVBRYT

View File

@@ -1,18 +0,0 @@
#The contents of this file are subject to the terms of the Common Development
#and Distribution License (the License). You may not use this file except in
#compliance with the License.
# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
#or http://www.netbeans.org/cddl.txt.
# When distributing Covered Code, include this CDDL Header Notice in each file
#and include the License file at http://www.netbeans.org/cddl.txt.
#If applicable, add the following below the CDDL Header, with the fields
#enclosed by brackets [] replaced by your own identifying information:
#"Portions Copyrighted [year] [name of copyright owner]"
Cannot_back_out_past_first_entry=Cannot back out past first entry
elipsis=...
Steps=Steps
Summary=Summary
ACN_InstructionsPanel=Wizard Step List
ACSD_InstructionsPanel=List of the panels in this wizard, which can change \
based on the choices made on individual panels within it

View File

@@ -1,17 +0,0 @@
#The contents of this file are subject to the terms of the Common Development
#and Distribution License (the License). You may not use this file except in
#compliance with the License.
# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
#or http://www.netbeans.org/cddl.txt.
# When distributing Covered Code, include this CDDL Header Notice in each file
#and include the License file at http://www.netbeans.org/cddl.txt.
#If applicable, add the following below the CDDL Header, with the fields
#enclosed by brackets [] replaced by your own identifying information:
#"Portions Copyrighted [year] [name of copyright owner]"
elipsis=...
Steps=Arbeitsschritte
Summary=Zusammenfassung
ACN_InstructionsPanel=Arbeitsschritte des Assistenten
ACSD_InstructionsPanel=Seiten\u00FCbersicht dieses Assistenten; sie kann sich \u00E4ndern \
je nach dem, welche Entscheidungen Sie treffen.

View File

@@ -1,26 +0,0 @@
#The contents of this file are subject to the terms of the Common Development
#and Distribution License (the License). You may not use this file except in
#compliance with the License.
# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
#or http://www.netbeans.org/cddl.txt.
# When distributing Covered Code, include this CDDL Header Notice in each file
#and include the License file at http://www.netbeans.org/cddl.txt.
#If applicable, add the following below the CDDL Header, with the fields
#enclosed by brackets [] replaced by your own identifying information:
#"Portions Copyrighted [year] [name of copyright owner]"
OpenIDE-Module-Name=Wizards API
OpenIDE-Module-Display-Category=Infrastructure
OpenIDE-Module-Short-Description=Provides the Wizards API
OpenIDE-Module-Long-Description=Provides the Wizards API and a basic implementation of it
Cannot_back_out_past_first_entry=Cannot back out past first entry
elipsis=...
elipsis.=...
Steps=\u0392\u03AE\u03BC\u03B1\u03C4\u03B1
Summary=\u03A0\u03B5\u03C1\u03AF\u03BB\u03B7\u03C8\u03B7
ACN_InstructionsPanel=\u039A\u03B1\u03C4\u03AC\u03BB\u03BF\u03B3\u03BF\u03C2 \u03B2\u03B7\u03BC\u03AC\u03C4\u03C9\u03BD \u03BF\u03B4\u03B7\u03B3\u03BF\u03CD
ACSD_InstructionsPanel=\u039A\u03B1\u03C4\u03AC\u03BB\u03BF\u03B3\u03BF\u03C2 \u03C4\u03C9\u03BD \u03C0\u03AC\u03BD\u03B5\u03BB \u03C3\u03B5 \u03B1\u03C5\u03C4\u03CC\u03BD \u03C4\u03BF\u03BD \u03BF\u03B4\u03B7\u03B3\u03CC, \u03BF \u03BF\u03C0\u03BF\u03AF\u03BF\u03C2 \u03BC\u03C0\u03BF\u03C1\u03B5\u03AF \u03BD\u03B1 \u03B1\u03BB\u03BB\u03AC\u03BE\u03B5\u03B9 \u03B1\u03BD\u03AC\u03BB\u03BF\u03B3\u03B1 \u03BC\u03B5 \u03C4\u03B9\u03C2 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2 \u03C3\u03C4\u03BF \u03BA\u03AC\u03B8\u03B5 \u03C0\u03AC\u03BD\u03B5\u03BB.

View File

@@ -1,18 +0,0 @@
#The contents of this file are subject to the terms of the Common Development
#and Distribution License (the License). You may not use this file except in
#compliance with the License.
# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
#or http://www.netbeans.org/cddl.txt.
# When distributing Covered Code, include this CDDL Header Notice in each file
#and include the License file at http://www.netbeans.org/cddl.txt.
#If applicable, add the following below the CDDL Header, with the fields
#enclosed by brackets [] replaced by your own identifying information:
#"Portions Copyrighted [year] [name of copyright owner]"
Cannot_back_out_past_first_entry=Cannot back out past first entry
elipsis=...
Steps=\u00C9tapes
Summary=Sommaire
ACN_InstructionsPanel=Liste des \u00E9tapes de l'assistant
ACSD_InstructionsPanel=La liste des \u00E9tapes de l'assistant \
qui peuvent changer selon les choix de l'utilisateur

View File

@@ -1,26 +0,0 @@
#The contents of this file are subject to the terms of the Common Development
#and Distribution License (the License). You may not use this file except in
#compliance with the License.
# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
#or http://www.netbeans.org/cddl.txt.
# When distributing Covered Code, include this CDDL Header Notice in each file
#and include the License file at http://www.netbeans.org/cddl.txt.
#If applicable, add the following below the CDDL Header, with the fields
#enclosed by brackets [] replaced by your own identifying information:
#"Portions Copyrighted [year] [name of copyright owner]"
OpenIDE-Module-Name=Wizards API
OpenIDE-Module-Display-Category=Infrastructure
OpenIDE-Module-Short-Description=Provides the Wizards API
OpenIDE-Module-Long-Description=Provides the Wizards API and a basic implementation of it
Cannot_back_out_past_first_entry=Cannot back out past first entry
elipsis=...
elipsis.=...
Steps=Steg
Summary=Sammanfattning
ACN_InstructionsPanel=Steg i guiden
ACSD_InstructionsPanel=Lista med steg i guiden, som kan \u00E4ndras beroende p\u00E5 valen som g\u00F6rs i indivuduella paneler

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB