Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/main/java/edu/rpi/legup/ui/HomePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import edu.rpi.legup.app.LegupPreferences;
import edu.rpi.legup.controller.CursorController;
import edu.rpi.legup.model.PuzzleExporter;
import edu.rpi.legup.utility.SVGImage;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
Expand Down Expand Up @@ -88,7 +89,7 @@ public JMenuBar getMenuBar() {
settings.addSeparator();
settings.add(preferences);

JMenuItem contribute = new JMenuItem("Contribute to Legup");
JMenuItem contribute = new JMenuItem("Contribute to LEGUP");
contribute.addActionListener(
l -> {
try {
Expand Down Expand Up @@ -138,10 +139,10 @@ private void initButtons() {

URL button0IconLocation =
ClassLoader.getSystemClassLoader()
.getResource("edu/rpi/legup/images/Legup/homepanel/proof_file.png");
ImageIcon button0Icon = new ImageIcon(button0IconLocation);
.getResource("edu/rpi/legup/images/Legup/homepanel/proof_file.svg");
SVGImage button0Icon = new SVGImage(button0IconLocation);
this.buttons[0].setFocusPainted(false);
this.buttons[0].setIcon(resizeButtonIcon(button0Icon, this.buttonSize, this.buttonSize));
this.buttons[0].setIcon(button0Icon.getIcon(this.buttonSize, this.buttonSize));
this.buttons[0].setHorizontalTextPosition(AbstractButton.CENTER);
this.buttons[0].setVerticalTextPosition(AbstractButton.BOTTOM);
this.buttons[0].addActionListener(CursorController.createListener(this, openProofListener));
Expand All @@ -155,10 +156,10 @@ private void initButtons() {
};
URL button1IconLocation =
ClassLoader.getSystemClassLoader()
.getResource("edu/rpi/legup/images/Legup/homepanel/new_puzzle_file.png");
ImageIcon button1Icon = new ImageIcon(button1IconLocation);
.getResource("edu/rpi/legup/images/Legup/homepanel/new_puzzle_file.svg");
SVGImage button1Icon = new SVGImage(button1IconLocation);
this.buttons[1].setFocusPainted(false);
this.buttons[1].setIcon(resizeButtonIcon(button1Icon, this.buttonSize, this.buttonSize));
this.buttons[1].setIcon(button1Icon.getIcon(this.buttonSize, this.buttonSize));
this.buttons[1].setHorizontalTextPosition(AbstractButton.CENTER);
this.buttons[1].setVerticalTextPosition(AbstractButton.BOTTOM);
this.buttons[1].addActionListener(l -> this.openPuzzleEditorDialog());
Expand Down
24 changes: 12 additions & 12 deletions src/main/java/edu/rpi/legup/ui/ProofEditorPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public class ProofEditorPanel extends LegupPanel implements IHistoryListener {
private JMenuItem add, delete, merge, collapse;
private JCheckBoxMenuItem allowDefault, caseRuleGen, imdFeedback;
private JMenu about, help;
private JMenuItem helpLegup, aboutLegup;
private JMenuItem legupWiki, aboutLegup;

private JToolBar toolBar1;
private JToolBar toolBar2;
Expand Down Expand Up @@ -285,8 +285,8 @@ public JMenuBar getMenuBar() {
proof.add(imdFeedback);

about = new JMenu("About");
helpLegup = new JMenuItem("Help Legup");
aboutLegup = new JMenuItem("About Legup");
legupWiki = new JMenuItem("LEGUP Wiki");
aboutLegup = new JMenuItem("About LEGUP");

mBar.add(file);
file.add(newPuzzle);
Expand Down Expand Up @@ -480,11 +480,11 @@ public void actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(null, "Version: 5.1.0");
});

about.add(helpLegup);
helpLegup.addActionListener(
about.add(legupWiki);
legupWiki.addActionListener(
l -> {
try {
java.awt.Desktop.getDesktop()
Desktop.getDesktop()
.browse(URI.create("https://github.com/Bram-Hub/LEGUP/wiki"));
} catch (IOException e) {
LOGGER.error("Can't open web page");
Expand Down Expand Up @@ -722,7 +722,7 @@ private void helpTutorial() {
url = "https://github.com/Bram-Hub/Legup/wiki/LEGUP-Tutorial";
}
try {
java.awt.Desktop.getDesktop().browse(java.net.URI.create(url));
Desktop.getDesktop().browse(java.net.URI.create(url));
} catch (IOException e) {
e.printStackTrace();
}
Expand Down Expand Up @@ -1044,27 +1044,27 @@ private void directionsToolButton() {
// System.out.println(puzzleName);
try {
if (puzzleName.equals("Fillapix")) {
java.awt.Desktop.getDesktop()
Desktop.getDesktop()
.browse(
URI.create(
"https://github.com/Bram-Hub/LEGUP/wiki/Fill-a-pix-rules"));
} else if (puzzleName.equals("LightUp")) {
java.awt.Desktop.getDesktop()
Desktop.getDesktop()
.browse(
URI.create(
"https://github.com/Bram-Hub/LEGUP/wiki/Light-up-rules"));
} else if (puzzleName.equals("TreeTent")) {
java.awt.Desktop.getDesktop()
Desktop.getDesktop()
.browse(
URI.create(
"https://github.com/Bram-Hub/LEGUP/wiki/Tree-tent-rules"));
} else if (puzzleName.equals("ShortTruthTables")) {
java.awt.Desktop.getDesktop()
Desktop.getDesktop()
.browse(
URI.create(
"https://github.com/Bram-Hub/LEGUP/wiki/Short-truth-table-rules"));
} else {
java.awt.Desktop.getDesktop()
Desktop.getDesktop()
.browse(
URI.create(
"https://github.com/Bram-Hub/LEGUP/wiki/"
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/edu/rpi/legup/ui/PuzzleEditorPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class PuzzleEditorPanel extends LegupPanel implements IHistoryListener {

private static final Logger LOGGER = LogManager.getLogger(PuzzleEditorPanel.class.getName());
private JMenu[] menus;
private JMenuItem helpLegup, aboutLegup;
private JMenuItem legupWiki, aboutLegup;
private JMenuBar menuBar;
private JToolBar toolBar1;
private JToolBar toolBar2;
Expand Down Expand Up @@ -240,14 +240,14 @@ public void actionPerformed(ActionEvent e) {

// HELP
menus[2] = new JMenu("Help");
helpLegup = new JMenuItem("Help Legup");
aboutLegup = new JMenuItem("About Legup");
menus[2].add(helpLegup);
legupWiki = new JMenuItem("LEGUP Wiki");
aboutLegup = new JMenuItem("About LEGUP");
menus[2].add(legupWiki);
menus[2].add(aboutLegup);
helpLegup.addActionListener(
legupWiki.addActionListener(
l -> {
try {
java.awt.Desktop.getDesktop()
Desktop.getDesktop()
.browse(URI.create("https://github.com/Bram-Hub/LEGUP/wiki"));
} catch (IOException e) {
LOGGER.error("Can't open web page");
Expand Down
Loading
Loading