diff options
author | Eduardo Pedroni <e.pedroni91@gmail.com> | 2016-08-12 22:27:26 +0200 |
---|---|---|
committer | Eduardo Pedroni <e.pedroni91@gmail.com> | 2016-08-12 22:27:26 +0200 |
commit | 78e369043f95e78b27c265f7eab4d766e54054f4 (patch) | |
tree | 4298ac164cb09c4ce6bfe12f4d1a59b7ccb2ca32 /src/eu/equalparts/cardbase/gui | |
parent | 0db469d9ae90ad5b72eb0c93952e9ecc68a6d4e7 (diff) |
Refactored a lot of things, started adding the rest of the filtering
Diffstat (limited to 'src/eu/equalparts/cardbase/gui')
-rw-r--r-- | src/eu/equalparts/cardbase/gui/CardView.java | 29 | ||||
-rw-r--r-- | src/eu/equalparts/cardbase/gui/CardbaseGUI.java | 79 | ||||
-rw-r--r-- | src/eu/equalparts/cardbase/gui/CardbaseViewer.java | 11 |
3 files changed, 0 insertions, 119 deletions
diff --git a/src/eu/equalparts/cardbase/gui/CardView.java b/src/eu/equalparts/cardbase/gui/CardView.java deleted file mode 100644 index 9774537..0000000 --- a/src/eu/equalparts/cardbase/gui/CardView.java +++ /dev/null @@ -1,29 +0,0 @@ -package eu.equalparts.cardbase.gui; - -import eu.equalparts.cardbase.card.Card; -import javafx.event.EventHandler; -import javafx.scene.image.ImageView; -import javafx.scene.input.MouseEvent; - -public class CardView extends ImageView { - - private static final String BASE_IMG_URL = "http://magiccards.info/scans/en/"; - - public CardView(Card card) { - super(makeUrl(card)); - - addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() { - - @Override - public void handle(MouseEvent event) { - setVisible(false); - } - }); - - } - - public static String makeUrl(Card card) { - return BASE_IMG_URL + card.imageCode + "/" + card.number + ".jpg"; - } - -} diff --git a/src/eu/equalparts/cardbase/gui/CardbaseGUI.java b/src/eu/equalparts/cardbase/gui/CardbaseGUI.java deleted file mode 100644 index bbbb97c..0000000 --- a/src/eu/equalparts/cardbase/gui/CardbaseGUI.java +++ /dev/null @@ -1,79 +0,0 @@ -package eu.equalparts.cardbase.gui; - -import java.awt.Button; -import java.awt.Frame; -import java.awt.Panel; -import java.awt.event.WindowEvent; -import java.awt.event.WindowListener; - - -@SuppressWarnings("serial") -public class CardbaseGUI extends Panel { - - /** - * Run the GUI. - * - * @param args arguments passed down to {@code Application.launch()}. - */ - public static void main(String... args) { - Frame f = new Frame("Test"); - - CardbaseGUI c = new CardbaseGUI(); - - f.add(c); - f.pack(); - - f.addWindowListener(new WindowListener() { - @Override - public void windowOpened(WindowEvent e) { - // TODO Auto-generated method stub - - } - - @Override - public void windowIconified(WindowEvent e) { - // TODO Auto-generated method stub - - } - - @Override - public void windowDeiconified(WindowEvent e) { - // TODO Auto-generated method stub - - } - - @Override - public void windowDeactivated(WindowEvent e) { - // TODO Auto-generated method stub - - } - - @Override - public void windowClosing(WindowEvent e) { - System.exit(0); - } - - @Override - public void windowClosed(WindowEvent e) { - // TODO Auto-generated method stub - - } - - @Override - public void windowActivated(WindowEvent e) { - // TODO Auto-generated method stub - - } - }); - - f.setVisible(true); - } - - - public void init() { - add(new Button("one")); - add(new Button("two")); - } - - -} diff --git a/src/eu/equalparts/cardbase/gui/CardbaseViewer.java b/src/eu/equalparts/cardbase/gui/CardbaseViewer.java deleted file mode 100644 index 30b32fb..0000000 --- a/src/eu/equalparts/cardbase/gui/CardbaseViewer.java +++ /dev/null @@ -1,11 +0,0 @@ -package eu.equalparts.cardbase.gui; - -import javafx.scene.Parent; - -public class CardbaseViewer extends Parent { - - - - - -} |