mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
hook up LQ pic downloader, Quest Images downloader in New GUI home
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -10755,6 +10755,7 @@ src/main/java/forge/control/ControlWinLose.java -text
|
|||||||
src/main/java/forge/control/home/ControlConstructed.java -text
|
src/main/java/forge/control/home/ControlConstructed.java -text
|
||||||
src/main/java/forge/control/home/ControlQuest.java -text
|
src/main/java/forge/control/home/ControlQuest.java -text
|
||||||
src/main/java/forge/control/home/ControlSettings.java -text
|
src/main/java/forge/control/home/ControlSettings.java -text
|
||||||
|
src/main/java/forge/control/home/ControlUtilities.java -text
|
||||||
src/main/java/forge/control/home/package-info.java -text svneol=native#text/plain
|
src/main/java/forge/control/home/package-info.java -text svneol=native#text/plain
|
||||||
src/main/java/forge/control/match/ControlDetail.java -text
|
src/main/java/forge/control/match/ControlDetail.java -text
|
||||||
src/main/java/forge/control/match/ControlDock.java -text
|
src/main/java/forge/control/match/ControlDock.java -text
|
||||||
|
|||||||
69
src/main/java/forge/control/home/ControlUtilities.java
Normal file
69
src/main/java/forge/control/home/ControlUtilities.java
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
package forge.control.home;
|
||||||
|
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
|
||||||
|
import forge.GuiDownloadPicturesLQ;
|
||||||
|
import forge.GuiDownloadQuestImages;
|
||||||
|
import forge.GuiDownloadSetPicturesLQ;
|
||||||
|
import forge.view.home.ViewUtilities;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controls logic and listeners for Utilities panel of the home screen.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ControlUtilities {
|
||||||
|
private ViewUtilities view;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Controls logic and listeners for Utilities panel of the home screen.
|
||||||
|
*
|
||||||
|
* @param v0   ViewUtilities
|
||||||
|
*/
|
||||||
|
public ControlUtilities(ViewUtilities v0) {
|
||||||
|
this.view = v0;
|
||||||
|
addListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @return ViewUtilities */
|
||||||
|
public ViewUtilities getView() {
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** */
|
||||||
|
public void addListeners() {
|
||||||
|
this.view.getBtnDownloadPics().addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(final ActionEvent arg0) {
|
||||||
|
doDownloadPics();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.view.getBtnDownloadSetPics().addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(final ActionEvent arg0) {
|
||||||
|
doDownloadSetPics();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.view.getBtnDownloadQuestImages().addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(final ActionEvent arg0) {
|
||||||
|
doDownloadQuestImages();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void doDownloadPics() {
|
||||||
|
new GuiDownloadPicturesLQ(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void doDownloadSetPics() {
|
||||||
|
new GuiDownloadSetPicturesLQ(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void doDownloadQuestImages() {
|
||||||
|
new GuiDownloadQuestImages(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ import javax.swing.JPanel;
|
|||||||
import javax.swing.border.MatteBorder;
|
import javax.swing.border.MatteBorder;
|
||||||
|
|
||||||
import forge.AllZone;
|
import forge.AllZone;
|
||||||
|
import forge.control.home.ControlUtilities;
|
||||||
|
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
|
|
||||||
@@ -14,6 +15,9 @@ import net.miginfocom.swing.MigLayout;
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class ViewUtilities extends JPanel {
|
public class ViewUtilities extends JPanel {
|
||||||
|
private ControlUtilities control;
|
||||||
|
|
||||||
|
private SubButton btnDownloadSetPics, btnDownloadPics, btnDownloadQuestImages;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* TODO: Write javadoc for Constructor.
|
* TODO: Write javadoc for Constructor.
|
||||||
@@ -24,13 +28,13 @@ public class ViewUtilities extends JPanel {
|
|||||||
this.setOpaque(false);
|
this.setOpaque(false);
|
||||||
this.setLayout(new MigLayout("insets 0, gap 0, wrap, ay center"));
|
this.setLayout(new MigLayout("insets 0, gap 0, wrap, ay center"));
|
||||||
|
|
||||||
SubButton btnDownloadPics = new SubButton("Download LQ Card Pictures");
|
btnDownloadPics = new SubButton("Download LQ Card Pictures");
|
||||||
this.add(btnDownloadPics, "h 30px!, w 50%!, gapleft 25%, gapbottom 2%, gaptop 5%");
|
this.add(btnDownloadPics, "h 30px!, w 50%!, gapleft 25%, gapbottom 2%, gaptop 5%");
|
||||||
|
|
||||||
SubButton btnDownloadSetPics = new SubButton("Download LQ Set Pictures");
|
btnDownloadSetPics = new SubButton("Download LQ Set Pictures");
|
||||||
this.add(btnDownloadSetPics, "h 30px!, w 50%!, gapleft 25%, gapbottom 2%");
|
this.add(btnDownloadSetPics, "h 30px!, w 50%!, gapleft 25%, gapbottom 2%");
|
||||||
|
|
||||||
SubButton btnDownloadQuestImages = new SubButton("Download Quest Images");
|
btnDownloadQuestImages = new SubButton("Download Quest Images");
|
||||||
this.add(btnDownloadQuestImages, "h 30px!, w 50%!, gapleft 25%, gapbottom 2%");
|
this.add(btnDownloadQuestImages, "h 30px!, w 50%!, gapleft 25%, gapbottom 2%");
|
||||||
|
|
||||||
SubButton btnDownloadPrices = new SubButton("Download Card Prices");
|
SubButton btnDownloadPrices = new SubButton("Download Card Prices");
|
||||||
@@ -51,5 +55,32 @@ public class ViewUtilities extends JPanel {
|
|||||||
JLabel lblAbout = new JLabel("About Forge here: Licensing, etc.");
|
JLabel lblAbout = new JLabel("About Forge here: Licensing, etc.");
|
||||||
lblAbout.setBorder(new MatteBorder(1, 0, 0, 0, AllZone.getSkin().getColor("borders")));
|
lblAbout.setBorder(new MatteBorder(1, 0, 0, 0, AllZone.getSkin().getColor("borders")));
|
||||||
this.add(lblAbout, "w 80%, gapleft 10%, gaptop 5%");
|
this.add(lblAbout, "w 80%, gapleft 10%, gaptop 5%");
|
||||||
|
|
||||||
|
ViewUtilities.this.control = new ControlUtilities(this);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
/** @return SubButton */
|
||||||
|
public SubButton getBtnDownloadPics() {
|
||||||
|
return btnDownloadPics;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @return SubButton */
|
||||||
|
public SubButton getBtnDownloadSetPics() {
|
||||||
|
return btnDownloadSetPics;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @return SubButton */
|
||||||
|
public SubButton getBtnDownloadQuestImages() {
|
||||||
|
return btnDownloadQuestImages;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* TODO: Write javadoc for this method.
|
||||||
|
* @return the ControlUtilities
|
||||||
|
*/
|
||||||
|
public ControlUtilities getController() {
|
||||||
|
return ViewUtilities.this.control;
|
||||||
|
}
|
||||||
|
|
||||||
|
} //end class ViewUtilities
|
||||||
|
|||||||
Reference in New Issue
Block a user