Skip to content

Commit

Permalink
Move GUI resources into a GUI package.
Browse files Browse the repository at this point in the history
  • Loading branch information
depryf committed Jul 5, 2016
1 parent d36adbd commit f8ee314
Show file tree
Hide file tree
Showing 18 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
# virtual machine crash logs, see http://www.java.com/en/download/gui.help/error_hotspot.xml
hs_err_pid*

# generic
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/imsweb/naaccrxml/gui/Standalone.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ private static String getVersion() {
@SuppressWarnings("ConstantConditions")
private JButton createToolbarButton(final String text, final String pageId, final String description) {
JButton btn = new JButton();
btn.setIcon(new ImageIcon(Thread.currentThread().getContextClassLoader().getResource("icons/" + pageId + "_inactive.png")));
btn.setIcon(new ImageIcon(Thread.currentThread().getContextClassLoader().getResource("gui/icons/" + pageId + "_inactive.png")));
btn.setOpaque(false);
btn.setFocusPainted(false);
btn.setFocusable(false);
Expand All @@ -199,11 +199,11 @@ public void actionPerformed(ActionEvent e) {
_layout.show(_centerPnl, pageId);
for (JButton btn : _buttons) {
if (btn.getActionCommand().equals(pageId)) {
btn.setIcon(new ImageIcon(Thread.currentThread().getContextClassLoader().getResource("icons/" + btn.getActionCommand() + "_active.png")));
btn.setIcon(new ImageIcon(Thread.currentThread().getContextClassLoader().getResource("gui/icons/" + btn.getActionCommand() + "_active.png")));
btn.setForeground(Color.BLACK);
}
else {
btn.setIcon(new ImageIcon(Thread.currentThread().getContextClassLoader().getResource("icons/" + btn.getActionCommand() + "_inactive.png")));
btn.setIcon(new ImageIcon(Thread.currentThread().getContextClassLoader().getResource("gui/icons/" + btn.getActionCommand() + "_inactive.png")));
btn.setForeground(Color.GRAY);
}
}
Expand All @@ -222,7 +222,7 @@ else if ("menu-help".equals(cmd)) {
try {
File targetFile = File.createTempFile("naaccr-xml-help", ".html");
targetFile.deleteOnExit();
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("help/help.html");
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("gui/help/help.html");
OutputStream os = new FileOutputStream(targetFile);
IOUtils.copy(is, os);
is.close();
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Free icons set: https://www.iconfinder.com/iconsets/ellegant
Free gui.icons set: https://www.iconfinder.com/iconsets/ellegant

Downloaded PNG transparent ones.

Expand Down

0 comments on commit f8ee314

Please sign in to comment.