forked from External/mage
UI: added new download images dialog:
* new option to download all modern cards; * new option with language selection; * new button for sets fast search; * new language support: Chinese Traditional; * all sets are sorted by date and have released date; * fixed selection reset on source changes;
This commit is contained in:
parent
79370108eb
commit
617f4d4b4b
5 changed files with 1151 additions and 269 deletions
|
|
@ -47,7 +47,7 @@ import net.java.truevfs.access.TConfig;
|
|||
import net.java.truevfs.kernel.spec.FsAccessOption;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.mage.card.arcane.ManaSymbols;
|
||||
import org.mage.plugins.card.images.DownloadPictures;
|
||||
import org.mage.plugins.card.images.DownloadPicturesService;
|
||||
import org.mage.plugins.card.info.CardInfoPaneImpl;
|
||||
import org.mage.plugins.card.utils.impl.ImageManagerImpl;
|
||||
|
||||
|
|
@ -1010,7 +1010,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
}//GEN-LAST:event_btnImagesActionPerformed
|
||||
|
||||
public void downloadImages() {
|
||||
DownloadPictures.startDownload();
|
||||
DownloadPicturesService.startDownload();
|
||||
}
|
||||
|
||||
public void exitApp() {
|
||||
|
|
@ -1380,7 +1380,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
Plugins.instance.downloadSymbols();
|
||||
break;
|
||||
case CLIENT_DOWNLOAD_CARD_IMAGES:
|
||||
DownloadPictures.startDownload();
|
||||
DownloadPicturesService.startDownload();
|
||||
break;
|
||||
case CLIENT_DISCONNECT:
|
||||
if (SessionHandler.isConnected()) {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import mage.view.PlaneView;
|
|||
import org.apache.log4j.Logger;
|
||||
import org.mage.card.arcane.ManaSymbols;
|
||||
import org.mage.plugins.card.images.CardDownloadData;
|
||||
import static org.mage.plugins.card.images.DownloadPictures.getTokenCardUrls;
|
||||
import static org.mage.plugins.card.images.DownloadPicturesService.getTokenCardUrls;
|
||||
|
||||
/**
|
||||
* Mage book with cards and page flipping.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,514 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.8" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JInternalFrameFormInfo">
|
||||
<Properties>
|
||||
<Property name="title" type="java.lang.String" value="Downloading images"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[600, 400]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||
</SyntheticProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,73,0,0,2,65"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="panelGlobal">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="North"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout">
|
||||
<Property name="axis" type="int" value="1"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.Box$Filler" name="fillerGlobal1">
|
||||
<Properties>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[32767, 5]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 5]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 5]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.VerticalStrut"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="labelGlobal">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Initializing image download..."/>
|
||||
<Property name="alignmentX" type="float" value="0.5"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.Box$Filler" name="fillerglobal2">
|
||||
<Properties>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[32767, 5]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 5]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 5]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.VerticalStrut"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JTabbedPane" name="tabsList">
|
||||
<Properties>
|
||||
<Property name="tabLayoutPolicy" type="int" value="1"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="tabMain">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
|
||||
<JTabbedPaneConstraints tabName="Standard download">
|
||||
<Property name="tabTitle" type="java.lang.String" value="Standard download"/>
|
||||
<Property name="tabIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/buttons/card_panel.png"/>
|
||||
</Property>
|
||||
</JTabbedPaneConstraints>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout">
|
||||
<Property name="axis" type="int" value="1"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="panelInfo">
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout">
|
||||
<Property name="axis" type="int" value="1"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.Box$Filler" name="fillerInfo1">
|
||||
<Properties>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[32767, 5]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 5]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 5]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.VerticalStrut"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="labelInfo">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Missing: 12345 card images / 789 token images"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
|
||||
<EmptyBorder bottom="0" left="7" right="0" top="0"/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.Box$Filler" name="fillerInfo2">
|
||||
<Properties>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[32767, 5]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 5]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 5]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.VerticalStrut"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="panelSource">
|
||||
<Properties>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[65536, 55]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[352, 55]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[593, 55]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout">
|
||||
<Property name="axis" type="int" value="0"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="panelSourceLeft">
|
||||
<Properties>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[430, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout">
|
||||
<Property name="alignment" type="int" value="3"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="labelSource">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Images source to download:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="comboSource">
|
||||
<Properties>
|
||||
<Property name="maximumRowCount" type="int" value="10"/>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="4">
|
||||
<StringItem index="0" value="Item 1"/>
|
||||
<StringItem index="1" value="Item 2"/>
|
||||
<StringItem index="2" value="Item 3"/>
|
||||
<StringItem index="3" value="Item 4"/>
|
||||
</StringArray>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[300, 20]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[400, 25]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="panelSourceRight">
|
||||
<Properties>
|
||||
<Property name="alignmentX" type="float" value="0.0"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[130, 32767]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[130, 30]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[130, 100]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout">
|
||||
<Property name="alignment" type="int" value="3"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="labelLanguage">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Language:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="comboLanguage">
|
||||
<Properties>
|
||||
<Property name="maximumRowCount" type="int" value="20"/>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="4">
|
||||
<StringItem index="0" value="Item 1"/>
|
||||
<StringItem index="1" value="Item 2"/>
|
||||
<StringItem index="2" value="Item 3"/>
|
||||
<StringItem index="3" value="Item 4"/>
|
||||
</StringArray>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[90, 25]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="panelMode">
|
||||
<Properties>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[32869, 55]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[322, 55]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[100, 55]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="panelModeInner">
|
||||
<Properties>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[430, 43]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout">
|
||||
<Property name="alignment" type="int" value="0"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="labelMode">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Sets to download:"/>
|
||||
<Property name="alignmentY" type="float" value="0.0"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="panelModeSelect">
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout">
|
||||
<Property name="axis" type="int" value="0"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JComboBox" name="comboSets">
|
||||
<Properties>
|
||||
<Property name="maximumRowCount" type="int" value="20"/>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="4">
|
||||
<StringItem index="0" value="Item 1"/>
|
||||
<StringItem index="1" value="Item 2"/>
|
||||
<StringItem index="2" value="Item 3"/>
|
||||
<StringItem index="3" value="Item 4"/>
|
||||
</StringArray>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[373, 25]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.Box$Filler" name="fillerMode1">
|
||||
<Properties>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[5, 32767]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[5, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[5, 0]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.HorizontalStrut"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="buttonSearchSet">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/buttons/search_24.png"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Fast search your flag"/>
|
||||
<Property name="alignmentX" type="float" value="1.0"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[25, 25]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonSearchSetActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.Box$Filler" name="fillerMode">
|
||||
<Properties>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[130, 32767]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[130, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[130, 0]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.HorizontalStrut"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.Box$Filler" name="fillerMain1">
|
||||
<Properties>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[32767, 10]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 10]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 10]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.VerticalStrut"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="panelProgress">
|
||||
<Properties>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[32777, 30]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[20, 30]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[564, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout">
|
||||
<Property name="axis" type="int" value="0"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.Box$Filler" name="fillerProgress1">
|
||||
<Properties>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[5, 32767]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[5, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[5, 0]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.HorizontalStrut"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JProgressBar" name="progress">
|
||||
<Properties>
|
||||
<Property name="value" type="int" value="75"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[32767, 25]"/>
|
||||
</Property>
|
||||
<Property name="string" type="java.lang.String" value="123 of 12313 (120 cards/546 tokens) image downloads finished! Please wait! [123 Mb]"/>
|
||||
<Property name="stringPainted" type="boolean" value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.Box$Filler" name="fillerProgress2">
|
||||
<Properties>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[5, 32767]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[5, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[5, 0]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.HorizontalStrut"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.Box$Filler" name="fillerMain2">
|
||||
<Properties>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[32767, 32767]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.Glue"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="tabCustom">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
|
||||
<JTabbedPaneConstraints tabName="Custom download">
|
||||
<Property name="tabTitle" type="java.lang.String" value="Custom download"/>
|
||||
<Property name="tabIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/buttons/list_panel.png"/>
|
||||
</Property>
|
||||
</JTabbedPaneConstraints>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout">
|
||||
<Property name="axis" type="int" value="1"/>
|
||||
</Layout>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="panelCommands">
|
||||
<Properties>
|
||||
<Property name="alignmentX" type="float" value="0.0"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="South"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout">
|
||||
<Property name="alignment" type="int" value="4"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="buttonOK">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Start download"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[120, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_AddingCodePost" type="java.lang.String" value="getRootPane().setDefaultButton(buttonOK);"/>
|
||||
<AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value="DownloadImagesDialog_buttonOK"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="buttonCancel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Cancel"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
|
@ -0,0 +1,401 @@
|
|||
package mage.client.dialog;
|
||||
|
||||
import mage.client.MageFrame;
|
||||
import mage.client.util.gui.FastSearchUtil;
|
||||
import mage.client.util.gui.MageDialogState;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
/**
|
||||
* @author JayDi85
|
||||
*/
|
||||
public class DownloadImagesDialog extends MageDialog {
|
||||
|
||||
public static final int RET_CANCEL = 0;
|
||||
public static final int RET_OK = 1;
|
||||
|
||||
private Dimension sizeModeMessageOnly;
|
||||
private Dimension sizeModeMessageAndControls;
|
||||
|
||||
|
||||
/**
|
||||
* Creates new form DownloadImagesDialog
|
||||
*/
|
||||
public DownloadImagesDialog() {
|
||||
initComponents();
|
||||
this.setModal(true);
|
||||
|
||||
// save default sizes
|
||||
//
|
||||
this.sizeModeMessageAndControls = new Dimension(580, 330); // dialog -> properties -> designer size
|
||||
//
|
||||
this.sizeModeMessageOnly = new Dimension(this.sizeModeMessageAndControls.getSize());
|
||||
sizeModeMessageOnly.height = 25 * 3;
|
||||
sizeModeMessageOnly.width = sizeModeMessageOnly.width / 2;
|
||||
|
||||
// Close the dialog when Esc is pressed
|
||||
String cancelName = "cancel";
|
||||
InputMap inputMap = getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
|
||||
inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), cancelName);
|
||||
ActionMap actionMap = getRootPane().getActionMap();
|
||||
actionMap.put(cancelName, new AbstractAction() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
doClose(RET_CANCEL);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void setWindowSize(int width, int heigth) {
|
||||
this.setSize(new Dimension(width, heigth));
|
||||
}
|
||||
|
||||
public void showDialog() {
|
||||
showDialog(null);
|
||||
}
|
||||
|
||||
public void showDialog(MageDialogState mageDialogState) {
|
||||
showDownloadControls(false); // call to change window size
|
||||
|
||||
// window settings
|
||||
if (this.isModal()) {
|
||||
MageFrame.getDesktop().add(this, JLayeredPane.MODAL_LAYER);
|
||||
} else {
|
||||
MageFrame.getDesktop().add(this, JLayeredPane.PALETTE_LAYER);
|
||||
}
|
||||
if (mageDialogState != null) {
|
||||
mageDialogState.setStateToDialog(this);
|
||||
} else {
|
||||
this.makeWindowCentered();
|
||||
}
|
||||
this.setVisible(true);
|
||||
}
|
||||
|
||||
public void setGlobalInfo(String info) {
|
||||
this.labelGlobal.setText(info);
|
||||
}
|
||||
|
||||
public void setCurrentInfo(String info) {
|
||||
this.labelInfo.setText(info);
|
||||
}
|
||||
|
||||
public JComboBox getSourcesCombo() {
|
||||
return this.comboSource;
|
||||
}
|
||||
|
||||
public JComboBox getLaunguagesCombo() {
|
||||
return this.comboLanguage;
|
||||
}
|
||||
|
||||
public JComboBox getSetsCombo() {
|
||||
return this.comboSets;
|
||||
}
|
||||
|
||||
public JButton getStartButton() {
|
||||
return this.buttonOK;
|
||||
}
|
||||
|
||||
public JButton getCancelButton() {
|
||||
return this.buttonCancel;
|
||||
}
|
||||
|
||||
public JProgressBar getProgressBar() {
|
||||
return this.progress;
|
||||
}
|
||||
|
||||
public void showLanguagesSupport(boolean haveSupport) {
|
||||
labelLanguage.setEnabled(haveSupport);
|
||||
comboLanguage.setEnabled(haveSupport);
|
||||
}
|
||||
|
||||
private void setTabTitle(int tabIndex, String title, String iconResourceName) {
|
||||
// tab caption with left sided icon
|
||||
// https://stackoverflow.com/questions/1782224/jtabbedpane-icon-on-left-side-of-tabs
|
||||
JLabel lbl = new JLabel(title);
|
||||
Icon icon = new ImageIcon(getClass().getResource(iconResourceName));
|
||||
lbl.setIcon(icon);
|
||||
lbl.setIconTextGap(5);
|
||||
lbl.setHorizontalTextPosition(SwingConstants.RIGHT);
|
||||
tabsList.setTabComponentAt(tabIndex, lbl);
|
||||
}
|
||||
|
||||
public void showDownloadControls(boolean needToShow) {
|
||||
// 2 modes:
|
||||
// - only message;
|
||||
// - message + download controls and buttons
|
||||
this.panelGlobal.setVisible(true);
|
||||
this.tabsList.setVisible(needToShow);
|
||||
this.panelCommands.setVisible(needToShow);
|
||||
|
||||
// auto-size form
|
||||
if (needToShow) {
|
||||
this.setWindowSize(this.sizeModeMessageAndControls.width, this.sizeModeMessageAndControls.height);
|
||||
} else {
|
||||
this.setWindowSize(this.sizeModeMessageOnly.width, this.sizeModeMessageOnly.height);
|
||||
}
|
||||
//this.setLocationRelativeTo(null); // center screen //FIX
|
||||
|
||||
// icons on tabs left side
|
||||
setTabTitle(0, "Standard download", "/buttons/card_panel.png");
|
||||
setTabTitle(1, "Custom download", "/buttons/list_panel.png");
|
||||
|
||||
// TODO: add manual mode as tab
|
||||
this.tabsList.getTabComponentAt(1).setEnabled(false);
|
||||
this.tabsList.setEnabledAt(1, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the return status of this dialog - one of RET_OK or RET_CANCEL
|
||||
*/
|
||||
public int getReturnStatus() {
|
||||
return returnStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
panelGlobal = new javax.swing.JPanel();
|
||||
fillerGlobal1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 5), new java.awt.Dimension(0, 5), new java.awt.Dimension(32767, 5));
|
||||
labelGlobal = new javax.swing.JLabel();
|
||||
fillerglobal2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 5), new java.awt.Dimension(0, 5), new java.awt.Dimension(32767, 5));
|
||||
tabsList = new javax.swing.JTabbedPane();
|
||||
tabMain = new javax.swing.JPanel();
|
||||
panelInfo = new javax.swing.JPanel();
|
||||
fillerInfo1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 5), new java.awt.Dimension(0, 5), new java.awt.Dimension(32767, 5));
|
||||
labelInfo = new javax.swing.JLabel();
|
||||
fillerInfo2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 5), new java.awt.Dimension(0, 5), new java.awt.Dimension(32767, 5));
|
||||
panelSource = new javax.swing.JPanel();
|
||||
panelSourceLeft = new javax.swing.JPanel();
|
||||
labelSource = new javax.swing.JLabel();
|
||||
comboSource = new javax.swing.JComboBox<>();
|
||||
panelSourceRight = new javax.swing.JPanel();
|
||||
labelLanguage = new javax.swing.JLabel();
|
||||
comboLanguage = new javax.swing.JComboBox<>();
|
||||
panelMode = new javax.swing.JPanel();
|
||||
panelModeInner = new javax.swing.JPanel();
|
||||
labelMode = new javax.swing.JLabel();
|
||||
panelModeSelect = new javax.swing.JPanel();
|
||||
comboSets = new javax.swing.JComboBox<>();
|
||||
fillerMode1 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767));
|
||||
buttonSearchSet = new javax.swing.JButton();
|
||||
fillerMode = new javax.swing.Box.Filler(new java.awt.Dimension(130, 0), new java.awt.Dimension(130, 0), new java.awt.Dimension(130, 32767));
|
||||
fillerMain1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 10), new java.awt.Dimension(0, 10), new java.awt.Dimension(32767, 10));
|
||||
panelProgress = new javax.swing.JPanel();
|
||||
fillerProgress1 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767));
|
||||
progress = new javax.swing.JProgressBar();
|
||||
fillerProgress2 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767));
|
||||
fillerMain2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767));
|
||||
tabCustom = new javax.swing.JPanel();
|
||||
panelCommands = new javax.swing.JPanel();
|
||||
buttonOK = new javax.swing.JButton();
|
||||
buttonCancel = new javax.swing.JButton();
|
||||
|
||||
setTitle("Downloading images");
|
||||
setPreferredSize(new java.awt.Dimension(600, 400));
|
||||
getContentPane().setLayout(new java.awt.BorderLayout());
|
||||
|
||||
panelGlobal.setLayout(new javax.swing.BoxLayout(panelGlobal, javax.swing.BoxLayout.Y_AXIS));
|
||||
panelGlobal.add(fillerGlobal1);
|
||||
|
||||
labelGlobal.setText("Initializing image download...");
|
||||
labelGlobal.setAlignmentX(0.5F);
|
||||
panelGlobal.add(labelGlobal);
|
||||
panelGlobal.add(fillerglobal2);
|
||||
|
||||
getContentPane().add(panelGlobal, java.awt.BorderLayout.NORTH);
|
||||
|
||||
tabsList.setTabLayoutPolicy(javax.swing.JTabbedPane.SCROLL_TAB_LAYOUT);
|
||||
|
||||
tabMain.setLayout(new javax.swing.BoxLayout(tabMain, javax.swing.BoxLayout.Y_AXIS));
|
||||
|
||||
panelInfo.setLayout(new javax.swing.BoxLayout(panelInfo, javax.swing.BoxLayout.Y_AXIS));
|
||||
panelInfo.add(fillerInfo1);
|
||||
|
||||
labelInfo.setText("Missing: 12345 card images / 789 token images");
|
||||
labelInfo.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 7, 0, 0));
|
||||
panelInfo.add(labelInfo);
|
||||
panelInfo.add(fillerInfo2);
|
||||
|
||||
tabMain.add(panelInfo);
|
||||
|
||||
panelSource.setMaximumSize(new java.awt.Dimension(65536, 55));
|
||||
panelSource.setMinimumSize(new java.awt.Dimension(352, 55));
|
||||
panelSource.setPreferredSize(new java.awt.Dimension(593, 55));
|
||||
panelSource.setLayout(new javax.swing.BoxLayout(panelSource, javax.swing.BoxLayout.X_AXIS));
|
||||
|
||||
panelSourceLeft.setMinimumSize(new java.awt.Dimension(430, 30));
|
||||
panelSourceLeft.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEADING));
|
||||
|
||||
labelSource.setText("Images source to download:");
|
||||
panelSourceLeft.add(labelSource);
|
||||
|
||||
comboSource.setMaximumRowCount(10);
|
||||
comboSource.setModel(new javax.swing.DefaultComboBoxModel<>(new String[]{"Item 1", "Item 2", "Item 3", "Item 4"}));
|
||||
comboSource.setMinimumSize(new java.awt.Dimension(300, 20));
|
||||
comboSource.setPreferredSize(new java.awt.Dimension(400, 25));
|
||||
panelSourceLeft.add(comboSource);
|
||||
|
||||
panelSource.add(panelSourceLeft);
|
||||
|
||||
panelSourceRight.setAlignmentX(0.0F);
|
||||
panelSourceRight.setMaximumSize(new java.awt.Dimension(130, 32767));
|
||||
panelSourceRight.setMinimumSize(new java.awt.Dimension(130, 30));
|
||||
panelSourceRight.setPreferredSize(new java.awt.Dimension(130, 100));
|
||||
panelSourceRight.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEADING));
|
||||
|
||||
labelLanguage.setText("Language:");
|
||||
panelSourceRight.add(labelLanguage);
|
||||
|
||||
comboLanguage.setMaximumRowCount(20);
|
||||
comboLanguage.setModel(new javax.swing.DefaultComboBoxModel<>(new String[]{"Item 1", "Item 2", "Item 3", "Item 4"}));
|
||||
comboLanguage.setPreferredSize(new java.awt.Dimension(90, 25));
|
||||
panelSourceRight.add(comboLanguage);
|
||||
|
||||
panelSource.add(panelSourceRight);
|
||||
|
||||
tabMain.add(panelSource);
|
||||
|
||||
panelMode.setMaximumSize(new java.awt.Dimension(32869, 55));
|
||||
panelMode.setMinimumSize(new java.awt.Dimension(322, 55));
|
||||
panelMode.setPreferredSize(new java.awt.Dimension(100, 55));
|
||||
panelMode.setLayout(new javax.swing.BoxLayout(panelMode, javax.swing.BoxLayout.LINE_AXIS));
|
||||
|
||||
panelModeInner.setMinimumSize(new java.awt.Dimension(430, 43));
|
||||
panelModeInner.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
|
||||
|
||||
labelMode.setText("Sets to download:");
|
||||
labelMode.setAlignmentY(0.0F);
|
||||
panelModeInner.add(labelMode);
|
||||
|
||||
panelModeSelect.setLayout(new javax.swing.BoxLayout(panelModeSelect, javax.swing.BoxLayout.X_AXIS));
|
||||
|
||||
comboSets.setMaximumRowCount(20);
|
||||
comboSets.setModel(new javax.swing.DefaultComboBoxModel<>(new String[]{"Item 1", "Item 2", "Item 3", "Item 4"}));
|
||||
comboSets.setPreferredSize(new java.awt.Dimension(373, 25));
|
||||
panelModeSelect.add(comboSets);
|
||||
panelModeSelect.add(fillerMode1);
|
||||
|
||||
buttonSearchSet.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/search_24.png"))); // NOI18N
|
||||
buttonSearchSet.setToolTipText("Fast search your flag");
|
||||
buttonSearchSet.setAlignmentX(1.0F);
|
||||
buttonSearchSet.setPreferredSize(new java.awt.Dimension(25, 25));
|
||||
buttonSearchSet.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonSearchSetActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
panelModeSelect.add(buttonSearchSet);
|
||||
|
||||
panelModeInner.add(panelModeSelect);
|
||||
|
||||
panelMode.add(panelModeInner);
|
||||
panelMode.add(fillerMode);
|
||||
|
||||
tabMain.add(panelMode);
|
||||
tabMain.add(fillerMain1);
|
||||
|
||||
panelProgress.setMaximumSize(new java.awt.Dimension(32777, 30));
|
||||
panelProgress.setMinimumSize(new java.awt.Dimension(20, 30));
|
||||
panelProgress.setPreferredSize(new java.awt.Dimension(564, 30));
|
||||
panelProgress.setLayout(new javax.swing.BoxLayout(panelProgress, javax.swing.BoxLayout.X_AXIS));
|
||||
panelProgress.add(fillerProgress1);
|
||||
|
||||
progress.setValue(75);
|
||||
progress.setMaximumSize(new java.awt.Dimension(32767, 25));
|
||||
progress.setString("123 of 12313 (120 cards/546 tokens) image downloads finished! Please wait! [123 Mb]");
|
||||
progress.setStringPainted(true);
|
||||
panelProgress.add(progress);
|
||||
panelProgress.add(fillerProgress2);
|
||||
|
||||
tabMain.add(panelProgress);
|
||||
tabMain.add(fillerMain2);
|
||||
|
||||
tabsList.addTab("Standard download", new javax.swing.ImageIcon(getClass().getResource("/buttons/card_panel.png")), tabMain); // NOI18N
|
||||
|
||||
tabCustom.setLayout(new javax.swing.BoxLayout(tabCustom, javax.swing.BoxLayout.Y_AXIS));
|
||||
tabsList.addTab("Custom download", new javax.swing.ImageIcon(getClass().getResource("/buttons/list_panel.png")), tabCustom); // NOI18N
|
||||
|
||||
getContentPane().add(tabsList, java.awt.BorderLayout.CENTER);
|
||||
|
||||
panelCommands.setAlignmentX(0.0F);
|
||||
panelCommands.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.TRAILING));
|
||||
|
||||
buttonOK.setText("Start download");
|
||||
buttonOK.setPreferredSize(new java.awt.Dimension(120, 30));
|
||||
panelCommands.add(buttonOK);
|
||||
getRootPane().setDefaultButton(buttonOK);
|
||||
|
||||
buttonCancel.setText("Cancel");
|
||||
buttonCancel.setPreferredSize(new java.awt.Dimension(80, 30));
|
||||
panelCommands.add(buttonCancel);
|
||||
|
||||
getContentPane().add(panelCommands, java.awt.BorderLayout.SOUTH);
|
||||
|
||||
pack();
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
/**
|
||||
* Closes the dialog
|
||||
*/
|
||||
private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
|
||||
doClose(RET_CANCEL);
|
||||
}//GEN-LAST:event_closeDialog
|
||||
|
||||
private void buttonSearchSetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSearchSetActionPerformed
|
||||
FastSearchUtil.showFastSearchForStringComboBox(comboSets, FastSearchUtil.DEFAULT_EXPANSION_SEARCH_MESSAGE);
|
||||
}//GEN-LAST:event_buttonSearchSetActionPerformed
|
||||
|
||||
private void doClose(int retStatus) {
|
||||
returnStatus = retStatus;
|
||||
setVisible(false);
|
||||
dispose();
|
||||
}
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton buttonCancel;
|
||||
private javax.swing.JButton buttonOK;
|
||||
private javax.swing.JButton buttonSearchSet;
|
||||
private javax.swing.JComboBox<String> comboLanguage;
|
||||
private javax.swing.JComboBox<String> comboSets;
|
||||
private javax.swing.JComboBox<String> comboSource;
|
||||
private javax.swing.Box.Filler fillerGlobal1;
|
||||
private javax.swing.Box.Filler fillerInfo1;
|
||||
private javax.swing.Box.Filler fillerInfo2;
|
||||
private javax.swing.Box.Filler fillerMain1;
|
||||
private javax.swing.Box.Filler fillerMain2;
|
||||
private javax.swing.Box.Filler fillerMode;
|
||||
private javax.swing.Box.Filler fillerMode1;
|
||||
private javax.swing.Box.Filler fillerProgress1;
|
||||
private javax.swing.Box.Filler fillerProgress2;
|
||||
private javax.swing.Box.Filler fillerglobal2;
|
||||
private javax.swing.JLabel labelGlobal;
|
||||
private javax.swing.JLabel labelInfo;
|
||||
private javax.swing.JLabel labelLanguage;
|
||||
private javax.swing.JLabel labelMode;
|
||||
private javax.swing.JLabel labelSource;
|
||||
private javax.swing.JPanel panelCommands;
|
||||
private javax.swing.JPanel panelGlobal;
|
||||
private javax.swing.JPanel panelInfo;
|
||||
private javax.swing.JPanel panelMode;
|
||||
private javax.swing.JPanel panelModeInner;
|
||||
private javax.swing.JPanel panelModeSelect;
|
||||
private javax.swing.JPanel panelProgress;
|
||||
private javax.swing.JPanel panelSource;
|
||||
private javax.swing.JPanel panelSourceLeft;
|
||||
private javax.swing.JPanel panelSourceRight;
|
||||
private javax.swing.JProgressBar progress;
|
||||
private javax.swing.JPanel tabCustom;
|
||||
private javax.swing.JPanel tabMain;
|
||||
private javax.swing.JTabbedPane tabsList;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
private int returnStatus = RET_CANCEL;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue