Improve guided tours UI
This commit is contained in:
parent
30c6b607d0
commit
79f9363b40
@ -1952,9 +1952,9 @@ SlideShowLinkListener.error.msg = Sorry, de geselecteerde tour is nog niet gesch
|
|||||||
|
|
||||||
GuidedTourSelectionDialog.title = Rondleiding
|
GuidedTourSelectionDialog.title = Rondleiding
|
||||||
GuidedTourSelectionDialog.lbl.selectTour = Selecteer rondleiding:
|
GuidedTourSelectionDialog.lbl.selectTour = Selecteer rondleiding:
|
||||||
GuidedTourSelectionDialog.lbl.description = Tour omschrijving:
|
GuidedTourSelectionDialog.lbl.description = Omschrijving rondleiding:
|
||||||
GuidedTourSelectionDialog.lbl.length = Aantal slides:
|
GuidedTourSelectionDialog.lbl.length = Aantal slides:
|
||||||
GuidedTourSelectionDialog.btn.start = Start tour!
|
GuidedTourSelectionDialog.btn.start = Start rondleiding!
|
||||||
|
|
||||||
|
|
||||||
! Custom Fin BMP Importer
|
! Custom Fin BMP Importer
|
||||||
|
@ -15,6 +15,7 @@ import javax.swing.JLabel;
|
|||||||
import javax.swing.JList;
|
import javax.swing.JList;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.JScrollPane;
|
import javax.swing.JScrollPane;
|
||||||
|
import javax.swing.JTextPane;
|
||||||
import javax.swing.ListSelectionModel;
|
import javax.swing.ListSelectionModel;
|
||||||
import javax.swing.event.ListSelectionEvent;
|
import javax.swing.event.ListSelectionEvent;
|
||||||
import javax.swing.event.ListSelectionListener;
|
import javax.swing.event.ListSelectionListener;
|
||||||
@ -25,10 +26,12 @@ import net.miginfocom.swing.MigLayout;
|
|||||||
import net.sf.openrocket.gui.components.StyledLabel;
|
import net.sf.openrocket.gui.components.StyledLabel;
|
||||||
import net.sf.openrocket.gui.components.StyledLabel.Style;
|
import net.sf.openrocket.gui.components.StyledLabel.Style;
|
||||||
import net.sf.openrocket.gui.util.GUIUtil;
|
import net.sf.openrocket.gui.util.GUIUtil;
|
||||||
|
import net.sf.openrocket.gui.util.Icons;
|
||||||
import net.sf.openrocket.l10n.Translator;
|
import net.sf.openrocket.l10n.Translator;
|
||||||
import net.sf.openrocket.startup.Application;
|
import net.sf.openrocket.startup.Application;
|
||||||
import net.sf.openrocket.util.Named;
|
import net.sf.openrocket.util.Named;
|
||||||
import net.sf.openrocket.gui.widgets.SelectColorButton;
|
import net.sf.openrocket.gui.widgets.SelectColorButton;
|
||||||
|
import org.fife.ui.rtextarea.IconGroup;
|
||||||
|
|
||||||
public class GuidedTourSelectionDialog extends JDialog {
|
public class GuidedTourSelectionDialog extends JDialog {
|
||||||
private static final long serialVersionUID = -3643116444821710259L;
|
private static final long serialVersionUID = -3643116444821710259L;
|
||||||
@ -84,6 +87,7 @@ public class GuidedTourSelectionDialog extends JDialog {
|
|||||||
|
|
||||||
tourDescription = new JEditorPane("text/html", "");
|
tourDescription = new JEditorPane("text/html", "");
|
||||||
tourDescription.setEditable(false);
|
tourDescription.setEditable(false);
|
||||||
|
tourDescription.putClientProperty(JTextPane.HONOR_DISPLAY_PROPERTIES, true);
|
||||||
StyleSheet ss = slideSetManager.getSlideSet(tourNames.get(0)).getStyleSheet();
|
StyleSheet ss = slideSetManager.getSlideSet(tourNames.get(0)).getStyleSheet();
|
||||||
((HTMLDocument) tourDescription.getDocument()).getStyleSheet().addStyleSheet(ss);
|
((HTMLDocument) tourDescription.getDocument()).getStyleSheet().addStyleSheet(ss);
|
||||||
sub.add(new JScrollPane(tourDescription), "grow, wrap rel");
|
sub.add(new JScrollPane(tourDescription), "grow, wrap rel");
|
||||||
@ -92,6 +96,7 @@ public class GuidedTourSelectionDialog extends JDialog {
|
|||||||
sub.add(tourLength, "wrap unrel");
|
sub.add(tourLength, "wrap unrel");
|
||||||
|
|
||||||
JButton start = new SelectColorButton(trans.get("btn.start"));
|
JButton start = new SelectColorButton(trans.get("btn.start"));
|
||||||
|
start.setIcon(Icons.HELP_TOURS);
|
||||||
start.addActionListener(new ActionListener() {
|
start.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
package net.sf.openrocket.gui.help.tours;
|
package net.sf.openrocket.gui.help.tours;
|
||||||
|
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
|
import java.awt.Insets;
|
||||||
|
|
||||||
import javax.swing.JEditorPane;
|
import javax.swing.JEditorPane;
|
||||||
import javax.swing.JScrollPane;
|
import javax.swing.JScrollPane;
|
||||||
import javax.swing.JSplitPane;
|
import javax.swing.JSplitPane;
|
||||||
|
import javax.swing.JTextPane;
|
||||||
import javax.swing.event.HyperlinkListener;
|
import javax.swing.event.HyperlinkListener;
|
||||||
import javax.swing.text.html.HTMLDocument;
|
import javax.swing.text.html.HTMLDocument;
|
||||||
import javax.swing.text.html.StyleSheet;
|
import javax.swing.text.html.StyleSheet;
|
||||||
@ -37,6 +39,8 @@ public class SlideShowComponent extends JSplitPane {
|
|||||||
|
|
||||||
textPane = new JEditorPane("text/html", "");
|
textPane = new JEditorPane("text/html", "");
|
||||||
textPane.setEditable(false);
|
textPane.setEditable(false);
|
||||||
|
textPane.setMargin(new Insets(10, 10, 40, 10));
|
||||||
|
textPane.putClientProperty(JTextPane.HONOR_DISPLAY_PROPERTIES, true);
|
||||||
textPane.setPreferredSize(new Dimension(WIDTH, HEIGHT_TEXT));
|
textPane.setPreferredSize(new Dimension(WIDTH, HEIGHT_TEXT));
|
||||||
|
|
||||||
JScrollPane scrollPanel = new JScrollPane(textPane);
|
JScrollPane scrollPanel = new JScrollPane(textPane);
|
||||||
|
@ -48,7 +48,7 @@ public class SlideShowDialog extends JDialog {
|
|||||||
|
|
||||||
slideShowComponent = new SlideShowComponent();
|
slideShowComponent = new SlideShowComponent();
|
||||||
slideShowComponent.addHyperlinkListener(new SlideShowLinkListener(parent));
|
slideShowComponent.addHyperlinkListener(new SlideShowLinkListener(parent));
|
||||||
panel.add(slideShowComponent, "spanx, grow, wrap para");
|
panel.add(slideShowComponent, "spanx, pushy, grow, wrap para");
|
||||||
|
|
||||||
|
|
||||||
JPanel sub = new JPanel(new MigLayout("ins 0, fill"));
|
JPanel sub = new JPanel(new MigLayout("ins 0, fill"));
|
||||||
@ -77,7 +77,8 @@ public class SlideShowDialog extends JDialog {
|
|||||||
|
|
||||||
|
|
||||||
sub.add(new JPanel(), "growx");
|
sub.add(new JPanel(), "growx");
|
||||||
|
|
||||||
|
panel.add(sub, "pushx, center");
|
||||||
|
|
||||||
closeButton = new SelectColorButton(trans.get("button.close"));
|
closeButton = new SelectColorButton(trans.get("button.close"));
|
||||||
closeButton.addActionListener(new ActionListener() {
|
closeButton.addActionListener(new ActionListener() {
|
||||||
@ -86,11 +87,8 @@ public class SlideShowDialog extends JDialog {
|
|||||||
SlideShowDialog.this.dispose();
|
SlideShowDialog.this.dispose();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
sub.add(closeButton, "right");
|
panel.add(closeButton, "wrap");
|
||||||
|
|
||||||
|
|
||||||
panel.add(sub, "growx");
|
|
||||||
|
|
||||||
this.add(panel);
|
this.add(panel);
|
||||||
updateEnabled();
|
updateEnabled();
|
||||||
addKeyActions();
|
addKeyActions();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user