Guided tour updates

This commit is contained in:
Sampo Niskanen 2012-03-10 15:03:02 +00:00
parent 11339d16fb
commit a406956b06
12 changed files with 63 additions and 46 deletions

View File

@ -3,7 +3,6 @@
<classpathentry excluding="net/sf/openrocket/android/" kind="src" path="src"/>
<classpathentry kind="src" path="src-extra"/>
<classpathentry kind="src" path="test"/>
<classpathentry kind="src" path="resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<accessrules>
<accessrule kind="nonaccessible" pattern="com/sun/**"/>
@ -25,5 +24,6 @@
<classpathentry kind="lib" path="lib-test/jmock-junit4-2.6.0-RC2.jar"/>
<classpathentry kind="lib" path="lib-test/junit-dep-4.8.2.jar"/>
<classpathentry kind="lib" path="lib-test/uispec4j-2.3-jdk16.jar"/>
<classpathentry kind="lib" path="resources"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -16,14 +16,14 @@ overview of the OpenRocket screens and features.
arrows</em> on your keyboard.
[none]
# FIXME: Add screenshot after dialog is complete
<p>This is the startup screen from which you can create a new rocket
design or open existing designs.
<p>For this tour, let's open an example design called <em>A simple model
rocket</em>.
#[none]
## FIXME: Add screenshot after dialog is complete
#
#<p>This is the startup screen from which you can create a new rocket
#design or open existing designs.
#
#<p>For this tour, let's open an example design called <em>A simple model
#rocket</em>.
[main_window.jpg]
@ -77,7 +77,7 @@ on the last two tabs you can plot or export the results.
<p>Other advanced features include component analysis and automatic
design optimization, which are covered by separate tours.
<p>Next you can take a tour on <a href="FIXME">Creating a rocket
<p>Next you can take a tour on <a href="creating_design/creating_design.tour">Creating a rocket
design</a>, browse other tours or start experimenting with the
software.

View File

@ -11,12 +11,12 @@ Introducción
<p>Puede navegar utilizando los botones <b>Siguiente</b> y <b>Anterior</b>, o utilizando las flechas de desplazamiento <b><em>izq.</em></b> y <b><em>der.</em></b> de su teclado.
[none]
# FIXME: Añadir pantallas después de completar el diálogo
<p>Esta es la pantalla de inicio desde la cual puede crear un nuevo diseño de cohete, o abrir diseños ya existentes.
<p>En esta ocasión abra un diseño de ejemplo llamado <b><em>A simple model rocket</em></b>.
#[none]
## FIXME: Añadir pantallas después de completar el diálogo
#
#<p>Esta es la pantalla de inicio desde la cual puede crear un nuevo diseño de cohete, o abrir diseños ya existentes.
#
#<p>En esta ocasión abra un diseño de ejemplo llamado <b><em>A simple model rocket</em></b>.
[main_window.jpg]
@ -56,7 +56,7 @@ Introducción
<p>Otras características más avanzadas son: el <em>Análisis de componentes</em> y la <em>Optimización</em> automática del diseño.
<p>Seguidamente puede hacer un recorrido por <a href="FIXME">Crear un diseño de cohete</a>, navegar por otros apartados, o comenzar a experimentar con la aplicación creando su propio diseño de cohete.
<p>Seguidamente puede hacer un recorrido por <a href="creating_design/creating_design.tour">Crear un diseño de cohete</a>, navegar por otros apartados, o comenzar a experimentar con la aplicación creando su propio diseño de cohete.

View File

@ -15,14 +15,14 @@ et <b>Précédant</b>, ou en utilisant les flèches <em>gauche</em> et <em>droit
</em> sur votre clavier.
[none]
# FIXME: Add screenshot after dialog is complete
<p>Ceci est l'écran de démarrage depuis lequel vous pouvez créer une nouvelle fusée
ou ouvrir des projets existant.
<p>Pour ce tour d'horizon, ouvrons le projet exemple nommé <em>A simple model
rocket</em>.
#[none]
## FIXME: Add screenshot after dialog is complete
#
#<p>Ceci est l'écran de démarrage depuis lequel vous pouvez créer une nouvelle fusée
#ou ouvrir des projets existant.
#
#<p>Pour ce tour d'horizon, ouvrons le projet exemple nommé <em>A simple model
#rocket</em>.
[main_window.jpg]
@ -77,7 +77,7 @@ dans les deux derniers onglets vous pouvez tracer ou exporter les résultats.
<p>D'autres fonctionnalités avancées incluant l'analyse des pièces et une
optimisation automatique du projet sont traités dans d'autres tours d'horizon.
<p>Ensuite vous pouvez voir <a href="FIXME">Créer un projet fusée
<p>Ensuite vous pouvez voir <a href="creating_design/creating_design.tour">Créer un projet fusée
</a>, survoler d'autres tours d'horizons ou commencer à expérimenter le
logiciel.

View File

@ -11,13 +11,13 @@ Introduzione
<b>Precedente</b> , o usando le frecce <em>sinistra</em> e <em>destra</em> della tua tastiera.
[none]
# FIXME: Add screenshot after dialog is complete
<p>Questa è la finestra di avvio dalla quale puoi creare il disegno di un nuovo razzo o aprirne uno esistente.
<p>Per questo tour, lasciami aprire un esempio chiamato <em>A simple model
rocket</em>.
#[none]
## FIXME: Add screenshot after dialog is complete
#
#<p>Questa è la finestra di avvio dalla quale puoi creare il disegno di un nuovo razzo o aprirne uno esistente.
#
#<p>Per questo tour, lasciami aprire un esempio chiamato <em>A simple model
#rocket</em>.
[main_window.jpg]
@ -62,7 +62,7 @@ Mostra le connessioni tra i componenti.
<p>Altri tour trattano nello specifico diverse caratteristiche avanzate tra le quali l'analisi dei compononti e l'ottimizzazione automatica del progetto.
<p>Puoi cominciare un tour da <a href="FIXME">Creating a rocket
<p>Puoi cominciare un tour da <a href="creating_design/creating_design.tour">Creating a rocket
design</a>, fai altri tour e comincia a prendere confidenza col programma.

View File

@ -4,6 +4,3 @@
introduction/introduction.tour
creating_design/creating_design.tour
test1/test.tour
test2/test2.tour

View File

@ -1558,6 +1558,9 @@ CompassSelectionButton.lbl.NW = NW
SlideShowDialog.btn.next = Next
SlideShowDialog.btn.prev = Previous
SlideShowLinkListener.error.title = Guided tour not found
SlideShowLinkListener.error.msg = Sorry, the selected tour has not yet been written.
GuidedTourSelectionDialog.title = Guided tours
GuidedTourSelectionDialog.lbl.selectTour = Select guided tour:
GuidedTourSelectionDialog.lbl.description = Tour description:

View File

@ -33,6 +33,7 @@ public class GuidedTourSelectionDialog extends JDialog {
private static final Translator trans = Application.getTranslator();
private static GuidedTourSelectionDialog instance = null;
private final SlideSetManager slideSetManager;
@ -178,5 +179,14 @@ public class GuidedTourSelectionDialog extends JDialog {
}
public static void showDialog(Window parent) {
if (instance != null && instance.isVisible()) {
instance.setVisible(true);
instance.toFront();
} else {
instance = new GuidedTourSelectionDialog(parent);
instance.setVisible(true);
}
}
}

View File

@ -7,6 +7,8 @@ import java.net.URL;
import javax.imageio.ImageIO;
import net.sf.openrocket.util.BugException;
/**
* An individual slide in a guided tour. It contains a image (or reference to an
* image file) plus a text description (in HTML).
@ -65,12 +67,10 @@ public class Slide {
if (url != null) {
img = ImageIO.read(url);
} else {
//FIXME
img = null;
throw new BugException("Could not find image " + imageFile);
}
} catch (IOException e) {
// FIXME
img = null;
throw new BugException("Error reading image " + imageFile, e);
}
return img;

View File

@ -42,7 +42,7 @@ public class SlideShowDialog extends JDialog {
JPanel panel = new JPanel(new MigLayout("fill"));
slideShowComponent = new SlideShowComponent();
slideShowComponent.addHyperlinkListener(new SlideShowLinkListener(parent));
slideShowComponent.addHyperlinkListener(new SlideShowLinkListener(this));
panel.add(slideShowComponent, "spanx, grow, wrap para");
@ -93,7 +93,7 @@ public class SlideShowDialog extends JDialog {
nextButton.grabFocus();
GUIUtil.rememberWindowPosition(this);
GUIUtil.rememberWindowSize(this);
this.setAlwaysOnTop(true);
// this.setAlwaysOnTop(true);
}
public void setSlideSet(SlideSet slideSet, int position) {

View File

@ -4,14 +4,20 @@ import java.awt.Desktop;
import java.awt.Window;
import java.net.URL;
import javax.swing.JOptionPane;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkEvent.EventType;
import javax.swing.event.HyperlinkListener;
import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.logging.LogHelper;
import net.sf.openrocket.startup.Application;
public class SlideShowLinkListener implements HyperlinkListener {
private static final LogHelper log = Application.getLogger();
private static final Translator trans = Application.getTranslator();
private final Window parent;
public SlideShowLinkListener(Window parent) {
@ -46,7 +52,9 @@ public class SlideShowLinkListener implements HyperlinkListener {
dialog.setSlideSet(ss, 0);
dialog.setVisible(true);
} catch (IllegalArgumentException e) {
Application.getExceptionHandler().handleErrorCondition("Guided tour '" + name + "' not found.");
log.warn("Guided tour '" + name + "' not found");
JOptionPane.showMessageDialog(parent,
trans.get("error.msg"), trans.get("error.title"), JOptionPane.WARNING_MESSAGE);
}
}

View File

@ -683,8 +683,7 @@ public class BasicFrame extends JFrame {
@Override
public void actionPerformed(ActionEvent e) {
log.user("Guided tours selected");
// FIXME: Singleton
new GuidedTourSelectionDialog(BasicFrame.this).setVisible(true);
GuidedTourSelectionDialog.showDialog(BasicFrame.this);
}
});
menu.add(item);