Icons werden nun auch aus der Jar-Datei heraus angezeigt.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry kind="src" path="assets"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||||
<classpathentry kind="lib" path="lib/mysql-connector-java-5.1.32-bin.jar"/>
|
<classpathentry kind="lib" path="lib/mysql-connector-java-5.1.32-bin.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/sqlite-jdbc-3.7.2.jar"/>
|
<classpathentry kind="lib" path="lib/sqlite-jdbc-3.7.2.jar"/>
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ import java.text.DateFormat;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import de.katho.kBorrow.db.DbConnector;
|
||||||
|
|
||||||
|
|
||||||
public class Util {
|
public class Util {
|
||||||
public static String getCurrentDate(){
|
public static String getCurrentDate(){
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ public class SqliteConnector implements DbConnector {
|
|||||||
for (Entry<String, String> pEntry : pScheme.entrySet()){
|
for (Entry<String, String> pEntry : pScheme.entrySet()){
|
||||||
st.executeUpdate(pEntry.getValue());
|
st.executeUpdate(pEntry.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (SQLException e){
|
catch (SQLException e){
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import javax.swing.UnsupportedLookAndFeelException;
|
|||||||
import org.jdesktop.swingx.JXErrorPane;
|
import org.jdesktop.swingx.JXErrorPane;
|
||||||
import org.jdesktop.swingx.error.ErrorInfo;
|
import org.jdesktop.swingx.error.ErrorInfo;
|
||||||
|
|
||||||
|
|
||||||
import java.awt.BorderLayout;
|
import java.awt.BorderLayout;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -45,7 +46,7 @@ public class MainWindow {
|
|||||||
* @throws ClassNotFoundException
|
* @throws ClassNotFoundException
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
public MainWindow() {
|
public MainWindow() throws IOException {
|
||||||
set = new Settings();
|
set = new Settings();
|
||||||
frame = new JFrame();
|
frame = new JFrame();
|
||||||
frame.setResizable(false);
|
frame.setResizable(false);
|
||||||
@@ -87,7 +88,7 @@ public class MainWindow {
|
|||||||
this.frame.setVisible(true);
|
this.frame.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args){
|
public static void main(String[] args) throws IOException{
|
||||||
new MainWindow();
|
new MainWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ package de.katho.kBorrow.listener;
|
|||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
|
||||||
import javax.swing.ImageIcon;
|
import javax.swing.ImageIcon;
|
||||||
import javax.swing.JTable;
|
import javax.swing.JTable;
|
||||||
|
|
||||||
|
import sun.tools.jar.Main;
|
||||||
import de.katho.kBorrow.controller.ArticleController;
|
import de.katho.kBorrow.controller.ArticleController;
|
||||||
import de.katho.kBorrow.gui.ArticlePanel;
|
import de.katho.kBorrow.gui.ArticlePanel;
|
||||||
|
|
||||||
@@ -21,7 +21,8 @@ public class ArticleDeleteTableButton extends TableButton {
|
|||||||
|
|
||||||
public ArticleDeleteTableButton(String pLabel, final JTable pTable, final ArticlePanel pPanel, final ArticleController pController) throws IOException {
|
public ArticleDeleteTableButton(String pLabel, final JTable pTable, final ArticlePanel pPanel, final ArticleController pController) throws IOException {
|
||||||
super(pLabel);
|
super(pLabel);
|
||||||
ImageIcon icon = new ImageIcon(ImageIO.read(new File("assets/icons/edit-delete.png")));
|
URL url = Main.class.getResource("/icons/edit-delete.png");
|
||||||
|
ImageIcon icon = new ImageIcon(url);
|
||||||
|
|
||||||
this.buttonE.setIcon(icon);
|
this.buttonE.setIcon(icon);
|
||||||
this.buttonR.setIcon(icon);
|
this.buttonR.setIcon(icon);
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ package de.katho.kBorrow.listener;
|
|||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
|
||||||
import javax.swing.ImageIcon;
|
import javax.swing.ImageIcon;
|
||||||
import javax.swing.JTable;
|
import javax.swing.JTable;
|
||||||
|
|
||||||
|
import sun.tools.jar.Main;
|
||||||
import de.katho.kBorrow.gui.ArticlePanel;
|
import de.katho.kBorrow.gui.ArticlePanel;
|
||||||
|
|
||||||
public class ArticleEditTableButton extends TableButton {
|
public class ArticleEditTableButton extends TableButton {
|
||||||
@@ -20,7 +20,8 @@ public class ArticleEditTableButton extends TableButton {
|
|||||||
|
|
||||||
public ArticleEditTableButton(String pLabel, final JTable pTable, final ArticlePanel articleTab) throws IOException {
|
public ArticleEditTableButton(String pLabel, final JTable pTable, final ArticlePanel articleTab) throws IOException {
|
||||||
super(pLabel);
|
super(pLabel);
|
||||||
ImageIcon icon = new ImageIcon(ImageIO.read(new File("assets/icons/accessories-text-editor.png")));
|
URL url = Main.class.getResource("/icons/accessories-text-editor.png");
|
||||||
|
ImageIcon icon = new ImageIcon(url);
|
||||||
|
|
||||||
this.buttonE.setIcon(icon);
|
this.buttonE.setIcon(icon);
|
||||||
this.buttonR.setIcon(icon);
|
this.buttonR.setIcon(icon);
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ package de.katho.kBorrow.listener;
|
|||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
|
||||||
import javax.swing.ImageIcon;
|
import javax.swing.ImageIcon;
|
||||||
import javax.swing.JTable;
|
import javax.swing.JTable;
|
||||||
|
|
||||||
|
import sun.tools.jar.Main;
|
||||||
import de.katho.kBorrow.controller.ManageLendingsController;
|
import de.katho.kBorrow.controller.ManageLendingsController;
|
||||||
|
|
||||||
public class LendingReturnTableButton extends TableButton {
|
public class LendingReturnTableButton extends TableButton {
|
||||||
@@ -20,8 +20,8 @@ public class LendingReturnTableButton extends TableButton {
|
|||||||
|
|
||||||
public LendingReturnTableButton(String pLabel, final JTable pTable, final ManageLendingsController pController) throws IOException {
|
public LendingReturnTableButton(String pLabel, final JTable pTable, final ManageLendingsController pController) throws IOException {
|
||||||
super(pLabel);
|
super(pLabel);
|
||||||
|
URL url = Main.class.getResource("/icons/edit-undo.png");
|
||||||
ImageIcon icon = new ImageIcon(ImageIO.read(new File("assets/icons/edit-undo.png")));
|
ImageIcon icon = new ImageIcon(url);
|
||||||
|
|
||||||
this.buttonE.setIcon(icon);
|
this.buttonE.setIcon(icon);
|
||||||
this.buttonR.setIcon(icon);
|
this.buttonR.setIcon(icon);
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ package de.katho.kBorrow.listener;
|
|||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
|
||||||
import javax.swing.ImageIcon;
|
import javax.swing.ImageIcon;
|
||||||
import javax.swing.JTable;
|
import javax.swing.JTable;
|
||||||
|
|
||||||
|
import sun.tools.jar.Main;
|
||||||
import de.katho.kBorrow.gui.NewLendingPanel;
|
import de.katho.kBorrow.gui.NewLendingPanel;
|
||||||
|
|
||||||
public class NewLendingTableButton extends TableButton {
|
public class NewLendingTableButton extends TableButton {
|
||||||
@@ -20,7 +20,8 @@ public class NewLendingTableButton extends TableButton {
|
|||||||
|
|
||||||
public NewLendingTableButton(String pLabel, final JTable pTable, final NewLendingPanel pPanel) throws IOException {
|
public NewLendingTableButton(String pLabel, final JTable pTable, final NewLendingPanel pPanel) throws IOException {
|
||||||
super(pLabel);
|
super(pLabel);
|
||||||
ImageIcon icon = new ImageIcon(ImageIO.read(new File("assets/icons/go-down.png")));
|
URL url = Main.class.getResource("/icons/go-down.png");
|
||||||
|
ImageIcon icon = new ImageIcon(url);
|
||||||
|
|
||||||
this.buttonE.setIcon(icon);
|
this.buttonE.setIcon(icon);
|
||||||
this.buttonR.setIcon(icon);
|
this.buttonR.setIcon(icon);
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ package de.katho.kBorrow.listener;
|
|||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
|
||||||
import javax.swing.ImageIcon;
|
import javax.swing.ImageIcon;
|
||||||
import javax.swing.JTable;
|
import javax.swing.JTable;
|
||||||
|
|
||||||
|
import sun.tools.jar.Main;
|
||||||
import de.katho.kBorrow.controller.UserController;
|
import de.katho.kBorrow.controller.UserController;
|
||||||
import de.katho.kBorrow.gui.UserPanel;
|
import de.katho.kBorrow.gui.UserPanel;
|
||||||
|
|
||||||
@@ -18,7 +18,8 @@ public class UserDeleteTableButton extends TableButton {
|
|||||||
|
|
||||||
public UserDeleteTableButton(String pLabel, final JTable pTable, final UserPanel pPanel, final UserController pController ) throws IOException{
|
public UserDeleteTableButton(String pLabel, final JTable pTable, final UserPanel pPanel, final UserController pController ) throws IOException{
|
||||||
super(pLabel);
|
super(pLabel);
|
||||||
ImageIcon icon = new ImageIcon(ImageIO.read(new File("assets/icons/edit-delete.png")));
|
URL url = Main.class.getResource("/icons/edit-delete.png");
|
||||||
|
ImageIcon icon = new ImageIcon(url);
|
||||||
|
|
||||||
this.buttonE.setIcon(icon);
|
this.buttonE.setIcon(icon);
|
||||||
this.buttonR.setIcon(icon);
|
this.buttonR.setIcon(icon);
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ package de.katho.kBorrow.listener;
|
|||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
|
||||||
import javax.swing.ImageIcon;
|
import javax.swing.ImageIcon;
|
||||||
import javax.swing.JTable;
|
import javax.swing.JTable;
|
||||||
|
|
||||||
|
import sun.tools.jar.Main;
|
||||||
import de.katho.kBorrow.gui.UserPanel;
|
import de.katho.kBorrow.gui.UserPanel;
|
||||||
|
|
||||||
public class UserEditTableButton extends TableButton {
|
public class UserEditTableButton extends TableButton {
|
||||||
@@ -20,7 +20,8 @@ public class UserEditTableButton extends TableButton {
|
|||||||
|
|
||||||
public UserEditTableButton(String pLabel, final JTable pTable, final UserPanel pPanel) throws IOException{
|
public UserEditTableButton(String pLabel, final JTable pTable, final UserPanel pPanel) throws IOException{
|
||||||
super(pLabel);
|
super(pLabel);
|
||||||
ImageIcon icon = new ImageIcon(ImageIO.read(new File("assets/icons/accessories-text-editor.png")));
|
URL url = Main.class.getResource("/icons/accessories-text-editor.png");
|
||||||
|
ImageIcon icon = new ImageIcon(url);
|
||||||
|
|
||||||
this.buttonE.setIcon(icon);
|
this.buttonE.setIcon(icon);
|
||||||
this.buttonR.setIcon(icon);
|
this.buttonR.setIcon(icon);
|
||||||
|
|||||||
Reference in New Issue
Block a user