<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/**"/>
<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>
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]
<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.
<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]
<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.
</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]
<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.
<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]
<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.
introduction/introduction.tour
creating_design/creating_design.tour
-test1/test.tour
-test2/test2.tour
-
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:
private static final Translator trans = Application.getTranslator();
+ private static GuidedTourSelectionDialog instance = null;
private final SlideSetManager slideSetManager;
}
+ public static void showDialog(Window parent) {
+ if (instance != null && instance.isVisible()) {
+ instance.setVisible(true);
+ instance.toFront();
+ } else {
+ instance = new GuidedTourSelectionDialog(parent);
+ instance.setVisible(true);
+ }
+ }
}
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).
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;
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");
nextButton.grabFocus();
GUIUtil.rememberWindowPosition(this);
GUIUtil.rememberWindowSize(this);
- this.setAlwaysOnTop(true);
+ // this.setAlwaysOnTop(true);
}
public void setSlideSet(SlideSet slideSet, int position) {
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) {
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);
}
}
@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);