mirror of
https://github.com/nasa/trick.git
synced 2024-12-22 14:32:24 +00:00
Wiki button (#1755)
* Added a wiki button * Removed commented code * Updated SCP image --------- Co-authored-by: Pherring04 <plherrin@JSLRL0523040929.ndc.nasa.gov>
This commit is contained in:
parent
de1cb6740b
commit
d2ec14dc02
Binary file not shown.
Before Width: | Height: | Size: 234 KiB After Width: | Height: | Size: 103 KiB |
@ -17,6 +17,7 @@ import java.awt.event.ActionEvent;
|
|||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.ItemEvent;
|
import java.awt.event.ItemEvent;
|
||||||
import java.awt.event.ItemListener;
|
import java.awt.event.ItemListener;
|
||||||
|
import java.awt.Desktop;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
@ -30,6 +31,7 @@ import java.net.InetSocketAddress;
|
|||||||
import java.net.MulticastSocket;
|
import java.net.MulticastSocket;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.net.SocketTimeoutException;
|
import java.net.SocketTimeoutException;
|
||||||
|
import java.net.URI;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.CharBuffer;
|
import java.nio.CharBuffer;
|
||||||
import java.nio.channels.NotYetConnectedException;
|
import java.nio.channels.NotYetConnectedException;
|
||||||
@ -240,6 +242,18 @@ public class SimControlApplication extends TrickApplication implements PropertyC
|
|||||||
launchTrickApplication("mtv", host + " " + port);
|
launchTrickApplication("mtv", host + " " + port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Action
|
||||||
|
public void openWiki() {
|
||||||
|
if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
|
||||||
|
try {
|
||||||
|
Desktop.getDesktop().browse(new URI("https://nasa.github.io/trick/index"));
|
||||||
|
}
|
||||||
|
catch(Exception e) {
|
||||||
|
System.out.println("Exception occurred while opening wiki: " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Action
|
@Action
|
||||||
public void freezeAt() {
|
public void freezeAt() {
|
||||||
actionController.handleFreezeAt(simState.getExecOutTime(), getMainFrame());
|
actionController.handleFreezeAt(simState.getExecOutTime(), getMainFrame());
|
||||||
@ -979,9 +993,11 @@ public class SimControlApplication extends TrickApplication implements PropertyC
|
|||||||
"---",
|
"---",
|
||||||
"startMTV",
|
"startMTV",
|
||||||
"---",
|
"---",
|
||||||
"throttle"
|
"throttle",
|
||||||
|
"---",
|
||||||
|
"openWiki"
|
||||||
};
|
};
|
||||||
JToolBar toolBar = new JToolBar();
|
JToolBar toolBar = new JToolBar();
|
||||||
for (String actionName : toolbarActionNames) {
|
for (String actionName : toolbarActionNames) {
|
||||||
if (actionName.equals("---")) {
|
if (actionName.equals("---")) {
|
||||||
toolBar.addSeparator();
|
toolBar.addSeparator();
|
||||||
|
@ -237,7 +237,7 @@ public class SimControlActionController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invoked when the users presses the Step button.
|
* Invoked when the users presses the Step button.
|
||||||
* @param debug_flag single step the sim
|
* @param debug_flag single step the sim
|
||||||
|
@ -24,6 +24,10 @@ startMTV.Action.text = Start &Event/Malfunction Trick View
|
|||||||
startMTV.Action.shortDescription = Start Event/Malfunction Trick View (MTV)
|
startMTV.Action.shortDescription = Start Event/Malfunction Trick View (MTV)
|
||||||
startMTV.Action.icon = mtv_22x22.png
|
startMTV.Action.icon = mtv_22x22.png
|
||||||
|
|
||||||
|
openWiki.Action.text = Open Trick Wiki
|
||||||
|
openWiki.Action.shortDescription = Open Trick Wiki in default browser
|
||||||
|
openWiki.Action.icon = question_22x22.png
|
||||||
|
|
||||||
freezeAt.Action.text = Freeze &At...
|
freezeAt.Action.text = Freeze &At...
|
||||||
freezeAt.Action.shortDescription = Freeze At
|
freezeAt.Action.shortDescription = Freeze At
|
||||||
|
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 378 B |
Loading…
Reference in New Issue
Block a user