Skip to content

Commit

Permalink
empty
Browse files Browse the repository at this point in the history
  • Loading branch information
rjolly committed Sep 25, 2024
1 parent 15ca954 commit 8500efd
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/linoleum
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/sh
LINOLEUM=`readlink -f $0`
LINOLEUM_HOME=`dirname $LINOLEUM`/..
until
java -Djava.system.class.loader=linoleum.application.ClassLoader -Dscala.usejavacp=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false -jar $LINOLEUM_HOME/linoleum.jar
do :
done
2 changes: 2 additions & 0 deletions bin/linoleum.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@echo off
set LINOLEUM_HOME=%~dp0..
:loop
java -Dfile.encoding=UTF-8 -Djava.system.class.loader=linoleum.application.ClassLoader -Dscala.usejavacp=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false -jar %LINOLEUM_HOME%\linoleum.jar
if %ERRORLEVEL% GTR 0 goto loop
9 changes: 9 additions & 0 deletions src/main/java/linoleum/Desktop.form
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
</Property>
</Properties>
</MenuItem>
<MenuItem class="javax.swing.JPopupMenu$Separator" name="jSeparator1">
</MenuItem>
<MenuItem class="javax.swing.JMenuItem" name="restartMenuItem">
<Properties>
<Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="restartAction" type="code"/>
</Property>
</Properties>
</MenuItem>
<MenuItem class="javax.swing.JPopupMenu$Separator" name="separator">
</MenuItem>
<MenuItem class="javax.swing.JMenuItem" name="exitMenuItem">
Expand Down
22 changes: 22 additions & 0 deletions src/main/java/linoleum/Desktop.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public class Desktop extends JFrame {
+ "%s";
private final Action openAction = new OpenAction();
private final Action saveAction = new SaveAction();
private final Action restartAction = new RestartAction();
private final Action exitAction = new ExitAction();
private final Action fullScreenAction = new FullScreenAction();
private final Action screenshotAction = new ScreenshotAction();
Expand Down Expand Up @@ -106,6 +107,19 @@ public void run() {
}
}

private class RestartAction extends AbstractAction {
public RestartAction() {
super("Restart");
putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_R, InputEvent.ALT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK));
putValue(MNEMONIC_KEY, (int) 'r');
}

@Override
public void actionPerformed(final ActionEvent e) {
System.exit(1);
}
}

private class ExitAction extends AbstractAction {
public ExitAction() {
super("Exit");
Expand Down Expand Up @@ -322,6 +336,8 @@ private void initComponents() {
fileMenu = new javax.swing.JMenu();
openMenuItem = new javax.swing.JMenuItem();
saveMenuItem = new javax.swing.JMenuItem();
jSeparator1 = new javax.swing.JPopupMenu.Separator();
restartMenuItem = new javax.swing.JMenuItem();
separator = new javax.swing.JPopupMenu.Separator();
exitMenuItem = new javax.swing.JMenuItem();
viewMenu = new javax.swing.JMenu();
Expand Down Expand Up @@ -351,6 +367,10 @@ public void componentMoved(java.awt.event.ComponentEvent evt) {

saveMenuItem.setAction(saveAction);
fileMenu.add(saveMenuItem);
fileMenu.add(jSeparator1);

restartMenuItem.setAction(restartAction);
fileMenu.add(restartMenuItem);
fileMenu.add(separator);

exitMenuItem.setAction(exitAction);
Expand Down Expand Up @@ -420,8 +440,10 @@ public void run() {
private javax.swing.JMenu fileMenu;
private javax.swing.JCheckBoxMenuItem fullScreenMenuItem;
private javax.swing.JMenu helpMenu;
private javax.swing.JPopupMenu.Separator jSeparator1;
private javax.swing.JMenuBar menuBar;
private javax.swing.JMenuItem openMenuItem;
private javax.swing.JMenuItem restartMenuItem;
private javax.swing.JMenuItem saveMenuItem;
private javax.swing.JMenuItem screenshotMenuItem;
private javax.swing.JPopupMenu.Separator separator;
Expand Down

0 comments on commit 8500efd

Please sign in to comment.